3ds Max C++ API Reference
|
This class describes a graphics node. More...
#include <RenderNodeHandle.h>
Public Member Functions | |
GraphicsDriverAPI | RenderNodeHandle () |
GraphicsDriverAPI | RenderNodeHandle (const RenderNodeHandle &from) |
GraphicsDriverAPI RenderNodeHandle & | operator= (const RenderNodeHandle &from) |
virtual GraphicsDriverAPI | ~RenderNodeHandle () |
GraphicsDriverAPI bool | Initialize () |
Initialize this graphics node. More... | |
virtual GraphicsDriverAPI const Matrix44 & | GetWorldMatrix () const |
Returns the world matrix of this node. More... | |
GraphicsDriverAPI void | SetWorldMatrix (const Matrix44 &matWorld) |
Set the world matrix of this node. More... | |
GraphicsDriverAPI void | SetObjectBox (const Box3 &bbox) |
Set the bounding box of this node in its own space. More... | |
GraphicsDriverAPI INode * | GetMaxNode () const |
Returns the max node. More... | |
GraphicsDriverAPI bool | GetPrimaryVisibility () const |
Returns whether this node would be visible to cameras in the scene. More... | |
GraphicsDriverAPI bool | GetSecondaryVisibility () const |
Returns whether this node would appear in rendered reflections and refractions. More... | |
GraphicsDriverAPI bool | GetReceiveShadows () const |
Returns whether this node could receive shadows. More... | |
GraphicsDriverAPI bool | GetCastShadows () const |
Returns whether this node could case shadows. More... | |
GraphicsDriverAPI bool | GetNoCulling () const |
Returns whether this node should not be culled when rendering. More... | |
GraphicsDriverAPI void | SetNoCulling (bool onOff) |
GraphicsDriverAPI bool | GetSelected () const |
Returns whether this node is selected. More... | |
GraphicsDriverAPI bool | GetBoxMode () const |
Returns whether this node is in bounding box mode. More... | |
GraphicsDriverAPI bool | GetBackFaceCull () const |
Returns whether back face cull is enabled on this node. More... | |
GraphicsDriverAPI DWORD | GetWireColor () const |
Returns the wire color of this node. More... | |
GraphicsDriverAPI float | GetOpacity () const |
Returns the opacity of this node. More... | |
GraphicsDriverAPI size_t | GetNumberOfRenderItems () const |
Get the number of render items that this node contains. More... | |
GraphicsDriverAPI RenderItemHandle | GetRenderItem (size_t i) const |
Get the i-th render item of this node. More... | |
GraphicsDriverAPI void | AddRenderItem (const RenderItemHandle &pRenderItem) |
Add a render item to this node. More... | |
GraphicsDriverAPI void | RemoveRenderItem (size_t i) |
Remove the render item with the specified index from this node. More... | |
GraphicsDriverAPI void | SetRenderItemDefaultMaterial (size_t i, const BaseMaterialHandle &hMaterial) |
Set the default material for the given render item. More... | |
GraphicsDriverAPI BaseMaterialHandle | GetSolidMaterial () const |
Get the solid material assigned to the current node. More... | |
GraphicsDriverAPI void | SetSolidMaterial (const BaseMaterialHandle &solidMaterial) |
Set the solid material. More... | |
GraphicsDriverAPI BaseMaterialHandle | GetWireframeMaterial () const |
Get the wireframe material assigned to the current node. More... | |
GraphicsDriverAPI void | SetWireframeMaterial (const BaseMaterialHandle &wireframeMaterial) |
Set the wirefrmame material. More... | |
GraphicsDriverAPI void | ClearAllRenderItems () |
Remove all render items from this node. More... | |
![]() | |
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 IRefObject * | GetPointer () 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 SmartHandle & | operator= (const SmartHandle &) |
Additional Inherited Members | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. More... | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. More... | |
static UtilExport void * | aligned_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... | |
![]() | |
GraphicsDriverAPI | SmartHandle () |
![]() | |
IRefObject * | mpObject |
This class describes a graphics node.
A graphics node is the container of render items. It also contains a material to shade all those render items. One render item could be added to multiple node to share the graphics data.
GraphicsDriverAPI RenderNodeHandle | ( | const RenderNodeHandle & | from | ) |
|
virtual |
GraphicsDriverAPI RenderNodeHandle& operator= | ( | const RenderNodeHandle & | from | ) |
GraphicsDriverAPI bool Initialize | ( | ) |
Initialize this graphics node.
|
virtual |
Returns the world matrix of this node.
GraphicsDriverAPI void SetWorldMatrix | ( | const Matrix44 & | matWorld | ) |
Set the world matrix of this node.
matWorld | the world matrix of this node. |
GraphicsDriverAPI void SetObjectBox | ( | const Box3 & | bbox | ) |
Set the bounding box of this node in its own space.
bbox | the bounding box of this node in its own space. |
GraphicsDriverAPI INode* GetMaxNode | ( | ) | const |
Returns the max node.
GraphicsDriverAPI bool GetPrimaryVisibility | ( | ) | const |
Returns whether this node would be visible to cameras in the scene.
GraphicsDriverAPI bool GetSecondaryVisibility | ( | ) | const |
Returns whether this node would appear in rendered reflections and refractions.
GraphicsDriverAPI bool GetReceiveShadows | ( | ) | const |
Returns whether this node could receive shadows.
GraphicsDriverAPI bool GetCastShadows | ( | ) | const |
Returns whether this node could case shadows.
GraphicsDriverAPI bool GetNoCulling | ( | ) | const |
Returns whether this node should not be culled when rendering.
GraphicsDriverAPI void SetNoCulling | ( | bool | onOff | ) |
GraphicsDriverAPI bool GetSelected | ( | ) | const |
Returns whether this node is selected.
GraphicsDriverAPI bool GetBoxMode | ( | ) | const |
Returns whether this node is in bounding box mode.
A node is in bounding box mode means that only the bounding box of this node would be shown in the view port.
GraphicsDriverAPI bool GetBackFaceCull | ( | ) | const |
Returns whether back face cull is enabled on this node.
GraphicsDriverAPI DWORD GetWireColor | ( | ) | const |
Returns the wire color of this node.
GraphicsDriverAPI float GetOpacity | ( | ) | const |
Returns the opacity of this node.
GraphicsDriverAPI size_t GetNumberOfRenderItems | ( | ) | const |
Get the number of render items that this node contains.
GraphicsDriverAPI RenderItemHandle GetRenderItem | ( | size_t | i | ) | const |
Get the i-th render item of this node.
This function will not modify the reference count of the returned render item.
i | the index to the render item. |
GraphicsDriverAPI void AddRenderItem | ( | const RenderItemHandle & | pRenderItem | ) |
Add a render item to this node.
This function will add reference to the input render item.
pRenderItem | the render item to add. |
GraphicsDriverAPI void RemoveRenderItem | ( | size_t | i | ) |
Remove the render item with the specified index from this node.
i | the index of the render item to be removed. |
GraphicsDriverAPI void SetRenderItemDefaultMaterial | ( | size_t | i, |
const BaseMaterialHandle & | hMaterial | ||
) |
Set the default material for the given render item.
The material for a render item could be determined by three parameters:
According to this priority, the "default" material will be used, if the render item doesn't have an override material.
Different render item could has different "default" material for the same node. For example: the default material for wireframe render item could be a solid white material.
i | the index of the render item. |
hMaterial | the default material of that render item. |
GraphicsDriverAPI BaseMaterialHandle GetSolidMaterial | ( | ) | const |
Get the solid material assigned to the current node.
GraphicsDriverAPI void SetSolidMaterial | ( | const BaseMaterialHandle & | solidMaterial | ) |
Set the solid material.
GraphicsDriverAPI BaseMaterialHandle GetWireframeMaterial | ( | ) | const |
Get the wireframe material assigned to the current node.
GraphicsDriverAPI void SetWireframeMaterial | ( | const BaseMaterialHandle & | wireframeMaterial | ) |
Set the wirefrmame material.
GraphicsDriverAPI void ClearAllRenderItems | ( | ) |
Remove all render items from this node.
Also release reference to those render items.