3ds Max C++ API Reference
IPointCloud Class Referenceabstract

The interface for interacting with point cloud objects. More...

#include <IPointCloud.h>

+ Inheritance diagram for IPointCloud:

Public Member Functions

virtual bool CreateIPointCloudVisibleVoxelNodes (TimeValue t, INode *pNode, const MaxSDK::Graphics::Matrix44 &viewMatrix, const MaxSDK::Graphics::Matrix44 &projectMatrix, int width, int height, MaxSDK::Array< IPointCloudVisibleVoxelNode * > &visibleNodesList)=0
 Creates an IPointCloudVisibleVoxelNode array based on the current point cloud settings and input parameters. More...
 
virtual unsigned long GetTotalPointCount ()=0
 Return the total point count of the current point cloud file. More...
 
virtual unsigned long GetVisiblePointCount (ViewExp &vpt)=0
 Return the visible point count in a specified viewport. More...
 
virtual bool HitTestPointCloud (const IPoint2 *pPoint, const int width, const int height, ViewExp *pViewExp, MaxSDK::Array< PointCloudVertex > *pHitListOut, PointCloudVertex *pNearestHitPoint)=0
 Return the hit test result for a point cloud. More...
 
virtual FPInterfaceDescGetDesc ()
 Returns a pointer to the interface metadata for this class. More...
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

The interface for interacting with point cloud objects.

This interface provides methods for interacting with point cloud objects. For example, it provides a method to perform hit tests on point cloud objects and a method to get information about all visible point cloud vertices from a specified view. Users can get this interface by calling the GetInterface(IID_POINT_CLOUD) method for classes that implement this interface.

const ObjectState& os = node->EvalWorldState( t );
IPointCloud* pPointCloud = dynamic_cast<IPointCloud*>(os.obj->GetInterface(IID_POINT_CLOUD));
if (pPointCloud)
{
// your code...
}
#define IID_POINT_CLOUD
Defines the interface ID for the IPointCloud interface.
Definition: IPointCloud.h:28
CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.
The ObjectState is the structure that flows up the geometry pipeline.
Definition: object.h:284
Object * obj
Pointer to the object in the pipeline.
Definition: object.h:295

Member Function Documentation

◆ CreateIPointCloudVisibleVoxelNodes()

virtual bool CreateIPointCloudVisibleVoxelNodes ( TimeValue  t,
INode pNode,
const MaxSDK::Graphics::Matrix44 viewMatrix,
const MaxSDK::Graphics::Matrix44 projectMatrix,
int  width,
int  height,
MaxSDK::Array< IPointCloudVisibleVoxelNode * > &  visibleNodesList 
)
pure virtual

Creates an IPointCloudVisibleVoxelNode array based on the current point cloud settings and input parameters.

IPointCloudVisibleVoxelNode contains methods to get information about points (position, normal, color, etc). After creating this object, you are responsible for destroying the IPointCloudVisibleVoxelNode in the array.

Parameters
[in]t- time
[in]pNode- point cloud object node
[in]viewMatrix- world to view transformation matrix
[in]projectMatrix- view to screen transformation matrix
[in]width- display output target width
[in]height- display output target height
[out]visibleNodesList- the result based on all the input parameters and point cloud settings
Returns
true if the operation succeeded, false otherwise.

◆ GetTotalPointCount()

virtual unsigned long GetTotalPointCount ( )
pure virtual

Return the total point count of the current point cloud file.

◆ GetVisiblePointCount()

virtual unsigned long GetVisiblePointCount ( ViewExp vpt)
pure virtual

Return the visible point count in a specified viewport.

◆ HitTestPointCloud()

virtual bool HitTestPointCloud ( const IPoint2 pPoint,
const int  width,
const int  height,
ViewExp pViewExp,
MaxSDK::Array< PointCloudVertex > *  pHitListOut,
PointCloudVertex pNearestHitPoint 
)
pure virtual

Return the hit test result for a point cloud.

If you just want to know whether the hit test ray hits the point cloud object, and do not need to get the hit points, the last two parameters of this function can be assigned as NULL.

Parameters
[in]pPoint- The screen point hit by the ray.
[in]width- The extent in width for the screen point hit by the test ray.
[in]height- The extent in height for the screen point hit by the test ray.
[in]pViewExp- The viewport for the screen point hit by the test ray.
[out]pHitListOut- The unsorted vertices of the point cloud hit by the test ray.
[out]pNearestHitPoint- The nearest vertex of the point cloud hit by the test ray.

◆ GetDesc()

virtual FPInterfaceDesc* GetDesc ( )
inlinevirtual

Returns a pointer to the interface metadata for this class.

See also
FPMixinInterface::GetDesc

Implements FPInterface.

122 { return this->GetDescByID(IID_POINT_CLOUD); }
virtual FPInterfaceDesc * GetDescByID(Interface_ID id)
Definition: ifnpub.h:613