3ds Max C++ API Reference
IConsolidationRenderItem Class Referenceabstract

This class defines a consolidation render item, which is used to improve rendering performance by batching similar render items together. More...

#include <IConsolidationRenderItem.h>

+ Inheritance diagram for IConsolidationRenderItem:

Public Member Functions

virtual bool AddSourceItem (ICustomRenderItemPtr &pSourceItem, DrawContext &dc)=0
 This function adds a render item to the consolidation item. More...
 
virtual void ClearSourceItems ()=0
 This function clears all render items held by the consolidation item. More...
 
- Public Member Functions inherited from ICustomRenderItem
virtual void Realize (DrawContext &drawContext)=0
 Realize() might be called once per frame. More...
 
virtual void Display (DrawContext &drawContext)=0
 Display() might be called more than once per frame. More...
 
virtual size_t GetPrimitiveCount () const =0
 Get the number of primitives in this render item. More...
 
virtual void HitTest (HitTestContext &, DrawContext &drawContext)
 This function is called in a hit test pass. More...
 
virtual void OnHit (HitTestContext &, DrawContext &)
 This function will be called when the render item is hit. More...
 
- Public Member Functions inherited from ARefObject
GraphicsUtilityAPI ARefObject ()
 
virtual GraphicsUtilityAPI long AddRef ()
 from IRefObject, see comments in IRefObject More...
 
virtual GraphicsUtilityAPI long Release ()
 decrease reference count of this object by one, if the decreased reference count equals zero, the object will be deleted. More...
 
GraphicsUtilityAPI IRefObjectQueryInterface (Interface_ID classID)
 Try query an interface from the ref object using a given interface id. More...
 
- Public Member Functions inherited from IRefObject
GraphicsUtilityAPI IRefObject ()
 
virtual GraphicsUtilityAPI ~IRefObject ()
 
- Public Member Functions inherited from BaseInterfaceServer
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
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...
 
- Protected Member Functions inherited from ARefObject
virtual GraphicsUtilityAPI void DeleteThis ()
 This function will be called when the reference count of an ARefObject equals zero. More...
 
virtual GraphicsUtilityAPI ~ARefObject ()
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Detailed Description

This class defines a consolidation render item, which is used to improve rendering performance by batching similar render items together.

Member Function Documentation

◆ AddSourceItem()

virtual bool AddSourceItem ( ICustomRenderItemPtr pSourceItem,
DrawContext dc 
)
pure virtual

This function adds a render item to the consolidation item.

The consolidation item should build geometries of these items in the Realize() function. After being consolidated, the render item's Realize() and Display() functions will no longer be called by Max.

Returns
true if the item is added successfully, otherwise false.

Implemented in SplineConsolidationItem, MarkerConsolidationItem, and MeshEdgeConsolidationItemDX11.

◆ ClearSourceItems()

virtual void ClearSourceItems ( )
pure virtual

This function clears all render items held by the consolidation item.

There are many situations that will cause Max call this function, such as adding or removing a render item for a node, moving an object, changing an object's data etc...

Implemented in SplineConsolidationItem, MeshEdgeConsolidationItemDX11, and MarkerConsolidationItem.