3ds Max C++ API Reference
RenderItemHandle Class Reference

This is the base wrapper class for all viewport render items. More...

#include <RenderItemHandle.h>

+ Inheritance diagram for RenderItemHandle:

Public Member Functions

GraphicsDriverAPI RenderItemHandle ()
 
GraphicsDriverAPI RenderItemHandle (const RenderItemHandle &from)
 
GraphicsDriverAPI RenderItemHandleoperator= (const RenderItemHandle &from)
 
virtual GraphicsDriverAPI ~RenderItemHandle ()
 
GraphicsDriverAPI void SetVisibilityGroup (RenderItemVisibilityGroup group)
 Set the visibility group of this render item. More...
 
GraphicsDriverAPI RenderItemVisibilityGroup GetVisibilityGroup () const
 Get the visibility group of this render item. More...
 
GraphicsDriverAPI void SetCustomMaterial (const BaseMaterialHandle &hMaterial)
 Set custom material for render item. More...
 
GraphicsDriverAPI BaseMaterialHandle GetCustomMaterial () const
 Get custom material for render item. More...
 
GraphicsDriverAPI unsigned long GetDescriptionBits () const
 Get the description bits of this render item. More...
 
GraphicsDriverAPI void SetDescriptionBits (unsigned long descriptionBits)
 Set the unique ID that corresponds to the mesh element description of this render item. More...
 
GraphicsDriverAPI bool GetTransparentHint () const
 Get the transparent hint of the current render item. More...
 
GraphicsDriverAPI void SetTransparentHint (bool bTransparentHint)
 Set the transparent hint of the current render item. More...
 
GraphicsDriverAPI void SetConsolidationData (const ConsolidationData &data)
 Set consolidation strategy and key used for consolidate this render item. More...
 
GraphicsDriverAPI const ConsolidationDataGetConsolidationData ()
 Returns consolidation data of this render item. More...
 
GraphicsDriverAPI void SetZBias (int bias)
 Set the item's Z bias Can be any int value. More...
 
GraphicsDriverAPI int GetZBias () const
 returns the item's z bias More...
 
- Public Member Functions inherited from SmartHandle
virtual GraphicsDriverAPI ~SmartHandle ()
 destructor More...
 
GraphicsDriverAPI bool IsValid () const
 Check if this handle is valid. More...
 
GraphicsDriverAPI void Release ()
 Release the underlying graphics objects. More...
 
GraphicsDriverAPI Identifier GetObjectID () const
 Get the underlying graphics object id. More...
 
GraphicsDriverAPI void SetPointer (IRefObject *pObject)
 
GraphicsDriverAPI IRefObjectGetPointer () const
 Get the underlying graphics object pointer. More...
 
bool operator== (const SmartHandle &rhs) const
 
bool operator!= (const SmartHandle &rhs) const
 
bool operator< (const SmartHandle &rhs) const
 
bool operator<= (const SmartHandle &rhs) const
 
bool operator> (const SmartHandle &rhs) const
 
bool operator>= (const SmartHandle &rhs) const
 
GraphicsDriverAPI SmartHandle (const SmartHandle &)
 
GraphicsDriverAPI SmartHandleoperator= (const SmartHandle &)
 

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 SmartHandle
GraphicsDriverAPI SmartHandle ()
 
- Protected Attributes inherited from SmartHandle
IRefObjectmpObject
 

Detailed Description

This is the base wrapper class for all viewport render items.

A render item is the primary drawable element that holds the geometry. A plugin object that wants to be displayed in the viewport needs to create and maintain a set of concrete derived render items like TupleMeshRenderItem and expose those render items to max via the IObjectDisplay interface.

See also
Class IObjectDisplay

Constructor & Destructor Documentation

◆ RenderItemHandle() [1/2]

◆ RenderItemHandle() [2/2]

◆ ~RenderItemHandle()

virtual GraphicsDriverAPI ~RenderItemHandle ( )
virtual

Member Function Documentation

◆ operator=()

GraphicsDriverAPI RenderItemHandle& operator= ( const RenderItemHandle from)

◆ SetVisibilityGroup()

GraphicsDriverAPI void SetVisibilityGroup ( RenderItemVisibilityGroup  group)

Set the visibility group of this render item.

Parameters
groupthe visibility group of this render item.

◆ GetVisibilityGroup()

GraphicsDriverAPI RenderItemVisibilityGroup GetVisibilityGroup ( ) const

Get the visibility group of this render item.

Returns
the visibility group of this render item.

◆ SetCustomMaterial()

GraphicsDriverAPI void SetCustomMaterial ( const BaseMaterialHandle hMaterial)

Set custom material for render item.

By default, render item uses the material from node. When a custom material is set, the render item will use the set material.

Parameters
hMaterialThe material handle.

◆ GetCustomMaterial()

GraphicsDriverAPI BaseMaterialHandle GetCustomMaterial ( ) const

Get custom material for render item.

Returns
the custom material.

◆ GetDescriptionBits()

GraphicsDriverAPI unsigned long GetDescriptionBits ( ) const

Get the description bits of this render item.

The description bits correspond to a specific type of mesh element description. Developers may use it to query a render item from an IRenderItemContainer.

See also
MeshElementDescription::GetDescriptionBits()
Returns
the description bits

◆ SetDescriptionBits()

GraphicsDriverAPI void SetDescriptionBits ( unsigned long  descriptionBits)

Set the unique ID that corresponds to the mesh element description of this render item.

Parameters
descriptionBitsthe description bits

◆ GetTransparentHint()

GraphicsDriverAPI bool GetTransparentHint ( ) const

Get the transparent hint of the current render item.

This hint could helper decide whether to place an render item in transparent pass or opaque pass.

Returns
the transparent hint of current render item.
See also
BaseMaterialHandle::GetTransparentHint()

◆ SetTransparentHint()

GraphicsDriverAPI void SetTransparentHint ( bool  bTransparentHint)

Set the transparent hint of the current render item.

Parameters
bTransparentHintThe transparent hint.

◆ SetConsolidationData()

GraphicsDriverAPI void SetConsolidationData ( const ConsolidationData data)

Set consolidation strategy and key used for consolidate this render item.

Parameters
[in]datareference to a ConsolidationData structure

◆ GetConsolidationData()

GraphicsDriverAPI const ConsolidationData& GetConsolidationData ( )

Returns consolidation data of this render item.

Returns
consolidation data of this render item

◆ SetZBias()

GraphicsDriverAPI void SetZBias ( int  bias)

Set the item's Z bias Can be any int value.

Each visibility group has default z bias sets. See ZBiasPresets.

Parameters
[in]biasThe item z bias

◆ GetZBias()

GraphicsDriverAPI int GetZBias ( ) const

returns the item's z bias

Returns
item z bias