3ds Max C++ API Reference
NodeDisplayCallback Class Referenceabstract

#include <nodedisp.h>

+ Inheritance diagram for NodeDisplayCallback:

Public Member Functions

virtual void StartDisplay (TimeValue t, ViewExp *vpt, int flags)=0
 
virtual void EndDisplay (TimeValue t, ViewExp *vpt, int flags)=0
 
virtual bool Display (TimeValue t, ViewExp *vpt, int flags, INode *node, Object *pObj)=0
 
virtual bool SuspendObjectDisplay (TimeValue t, INode *node)=0
 
virtual void AddNodeCallbackBox (TimeValue t, INode *node, ViewExp *vpt, Box3 &box, Object *pObj)=0
 
virtual bool HitTest (TimeValue t, INode *node, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt, Object *pObj)=0
 
virtual void Activate ()=0
 
virtual void Deactivate ()=0
 
virtual MSTR GetName () const =0
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- 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...
 

Detailed Description

See also
Class InterfaceServer, Class INodeDisplayControl, Class INode, Class ViewExp, Class IPoint2.

Description:
A callback to allow plug-ins that aren't actually objects (such as utilities) to control a Node's display.

This class enables you to display extra information on top of a node in a viewport. Once activated, a plug-in will control the display (on/off) of a node's world space representation as well as add data in a viewport on a per node basis. This approach allows you to replace the drawing code of every node without adding modifiers on top of each of them.

Member Function Documentation

◆ StartDisplay()

virtual void StartDisplay ( TimeValue  t,
ViewExp vpt,
int  flags 
)
pure virtual
Remarks
This method is called just before 3ds Max draws the nodes in the scene.
Parameters:
TimeValue t

The time at which the nodes are being drawn.

ViewExp *vpt

Points to an interface for the viewport the node is being drawn in.

int flags

These flags are used internally.

◆ EndDisplay()

virtual void EndDisplay ( TimeValue  t,
ViewExp vpt,
int  flags 
)
pure virtual
Remarks
This method is called just after 3ds Max draws the nodes in the scene.
Parameters:
TimeValue t

The time at which the nodes were drawn.

ViewExp *vpt

Points to an interface for the viewport the node is being drawn in.

int flags

These flags are used internally.

◆ Display()

virtual bool Display ( TimeValue  t,
ViewExp vpt,
int  flags,
INode node,
Object pObj 
)
pure virtual
Remarks
This method is called for every node to allow it display itself.
Parameters:
TimeValue t

The time at which the node is to be drawn.

ViewExp *vpt

Points to an interface for the viewport in which the node is being drawn in.

int flags

The display flags, which are;

USE_DAMAGE_RECT

If this flag is set, only the damaged area needs to be displayed. The damaged rectangle may be retrieved using INode::GetDamagedRect(). See Class INode.

DISP_SHOWSUBOBJECT

This indicates if an item should display its sub-object selection state. The system will set this flag is the item is selected, the user is in the modify branch, and the item is in sub-object selection mode.

INode *node

Points to the node being drawn.
Returns
true if displayed, otherwise false.

◆ SuspendObjectDisplay()

virtual bool SuspendObjectDisplay ( TimeValue  t,
INode node 
)
pure virtual
Remarks
This method is called to determine if the node mesh should be displayed. It should return true; otherwise return false.
Parameters:
TimeValue t

The time at which to check if the node should be displayed.

INode *node

The node to check.

◆ AddNodeCallbackBox()

virtual void AddNodeCallbackBox ( TimeValue  t,
INode node,
ViewExp vpt,
Box3 box,
Object pObj 
)
pure virtual
Remarks
This method will ask the callback to participate in the bounding box calculation.
Parameters:
TimeValue t

The time at which to calculate the bounding box.

INode *node

The node to calculate the bounding box for.

ViewExp *vpt

Points to an interface for the viewport in which the node is being drawn in.

Box3& box

A reference to the bounding box.

◆ HitTest()

virtual bool HitTest ( TimeValue  t,
INode node,
int  type,
int  crossing,
int  flags,
IPoint2 p,
ViewExp vpt,
Object pObj 
)
pure virtual
Remarks
This method hit tests the callback's mesh.
Parameters:
TimeValue t

The time at which to hit test.

INode *node

A pointer to the node to test.

int type

The type of hit testing to perform. See Scene and Node Hit Test Types..

int crossing

The state of the crossing setting. If TRUE crossing selection is on.

int flags

The hit test flags. See Scene and Node Hit Testing Flags for details.

IPoint2 *p

The screen point to test.

ViewExp* vpt

An interface pointer that may be used to call methods associated with the viewports.
Returns
true if the item was hit, otherwise false.

◆ Activate()

virtual void Activate ( )
pure virtual
Remarks
This method is called when the callback gets activated. It is up to the callback to invalidate the screen.

◆ Deactivate()

virtual void Deactivate ( )
pure virtual
Remarks
This method is called when the callback is deactivated.

◆ GetName()

virtual MSTR GetName ( ) const
pure virtual
Remarks
This method returns the name of the callback which is used for display in the menu. The user must delete the string returned.