3ds Max C++ API Reference
|
IRenderGeometry is a representation of a geometry. More...
#include <IRenderGeometry.h>
Public Member Functions | |
virtual void | Display (DrawContext &drawContext, int start, int count, int lod)=0 |
This function might be called multiple times in a frame, such as when we use shadow maps. More... | |
virtual PrimitiveType | GetPrimitiveType ()=0 |
Get the type of primitives in the geometry. More... | |
virtual void | SetPrimitiveType (PrimitiveType type)=0 |
Sets type of primitives in the geometry. More... | |
virtual size_t | GetPrimitiveCount ()=0 |
Number of primitives the mesh represents. More... | |
virtual size_t | GetVertexCount ()=0 |
Number of vertices in the mesh. More... | |
virtual int | GetStartPrimitive () const =0 |
Get start primitive of this geometry. More... | |
virtual MaterialRequiredStreams & | GetSteamRequirement ()=0 |
Get the stream requirement of this render geometry. More... | |
virtual VertexBufferHandleArray & | GetVertexBuffers ()=0 |
Get the vertex streams of this geometry. More... | |
virtual IndexBufferHandle & | GetIndexBuffer ()=0 |
Get index buffer of this geometry. More... | |
![]() | |
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 IRefObject * | QueryInterface (Interface_ID classID) |
Try query an interface from the ref object using a given interface id. More... | |
![]() | |
GraphicsUtilityAPI | IRefObject () |
virtual GraphicsUtilityAPI | ~IRefObject () |
![]() | |
virtual UtilExport BaseInterface * | GetInterface (Interface_ID id) |
virtual UtilExport int | NumInterfaces () const |
virtual UtilExport BaseInterface * | GetInterfaceAt (int i) const |
virtual UtilExport | ~BaseInterfaceServer () |
![]() | |
virtual UtilExport | ~InterfaceServer () |
Destructor. More... | |
template<class InterfaceType > | |
InterfaceType * | GetTypedInterface () |
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... | |
![]() | |
virtual GraphicsUtilityAPI void | DeleteThis () |
This function will be called when the reference count of an ARefObject equals zero. More... | |
virtual GraphicsUtilityAPI | ~ARefObject () |
![]() | |
Tab< BaseInterface * > | interfaces |
IRenderGeometry is a representation of a geometry.
|
pure virtual |
This function might be called multiple times in a frame, such as when we use shadow maps.
Inherited classes need to use in the pipeline context to render the geometry. It's recommend to prepare the geometry data in another function like the constructor, and only do rendering tasks in the Display() function. Furthermore, sub-classes are not allowed to change current material parameters. So for multiple material instance, you should use multiple render items to store them. Note: the vertex buffers' format must match current stream requirement in pipeline context. /param drawContext the context for display /param start start primitive to render /param count primitive count to render /param lod current lod value from adaptive degradation system
Implemented in SimpleRenderGeometry.
|
pure virtual |
Get the type of primitives in the geometry.
/return the geometry's primitive type
Implemented in SimpleRenderGeometry.
|
pure virtual |
Sets type of primitives in the geometry.
/param type the geometry's primitive type
Implemented in SimpleRenderGeometry.
|
pure virtual |
Number of primitives the mesh represents.
/return geometry's primitive count
Implemented in SimpleRenderGeometry.
|
pure virtual |
Number of vertices in the mesh.
/return number of vertices in the mesh.
Implemented in SimpleRenderGeometry.
|
pure virtual |
Get start primitive of this geometry.
Implemented in SimpleRenderGeometry.
|
pure virtual |
Get the stream requirement of this render geometry.
To optimize performance, it's better to create a requirement-geometry mapping. And make the render geometry read-only after created.
Implemented in SimpleRenderGeometry.
|
pure virtual |
Get the vertex streams of this geometry.
Implemented in SimpleRenderGeometry.
|
pure virtual |
Get index buffer of this geometry.
Implemented in SimpleRenderGeometry.