3ds Max C++ API Reference
IRenderMesh Class Referenceabstract

Maintains a Dx version of the current mesh in the cache. It will render either the 3ds Max mesh or a screen aligned quad. More...

#include <RTMax.h>

+ Inheritance diagram for IRenderMesh:

Public Types

enum  MeshType { kMesh , kScreenQuad }
 

Public Member Functions

virtual ~IRenderMesh ()
 Destructor. More...
 
virtual void SetMeshType (MeshType type)=0
 Defines what the mesh represents. More...
 
virtual bool Evaluate (LPVOID Device, int width, int height, int texWidth, int texHeight)=0
 Used to update the Quad version of the mesh. More...
 
virtual bool Evaluate (LPVOID Device, Mesh *aMesh, int MatIndex, bool NegScale)=0
 Setting the node parameter to non NULL, will make sure the Normals are transformed correctly. More...
 
virtual void SetMappingData (Tab< int > &map)=0
 Store relevant mapping data. More...
 
virtual bool Render (LPVOID Device)=0
 Renders the current object. More...
 
virtual void Invalidate ()=0
 force an invalidation of the internal data structures More...
 
virtual bool GetVertexFormat (void **pFormat, int *itemCount)=0
 Get the current Vertex format for the mesh. More...
 

Static Public Member Functions

static DllExport IRenderMeshGetRenderMesh ()
 Exported function to access the IRenderMesh interface. More...
 
- 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

Maintains a Dx version of the current mesh in the cache. It will render either the 3ds Max mesh or a screen aligned quad.

Member Enumeration Documentation

◆ MeshType

enum MeshType
Enumerator
kMesh 
kScreenQuad 
583  {
584  kMesh,
585  kScreenQuad,
586  };
@ kMesh
Definition: RTMax.h:584
@ kScreenQuad
Definition: RTMax.h:585

Constructor & Destructor Documentation

◆ ~IRenderMesh()

virtual ~IRenderMesh ( )
inlinevirtual

Destructor.

589 {;}

Member Function Documentation

◆ GetRenderMesh()

static DllExport IRenderMesh* GetRenderMesh ( )
static

Exported function to access the IRenderMesh interface.

◆ SetMeshType()

virtual void SetMeshType ( MeshType  type)
pure virtual

Defines what the mesh represents.

Parameters
typespecify whether it is a mesh or a full screen quad

◆ Evaluate() [1/2]

virtual bool Evaluate ( LPVOID  Device,
int  width,
int  height,
int  texWidth,
int  texHeight 
)
pure virtual

Used to update the Quad version of the mesh.

Parameters
*DeviceA Pointer to the main DX interface
widthThe width of the render target
heightThe height of the render target
texWidthThe width of the texture being used
texHeightThe height of the texture being used
Returns
TRUE if successful

◆ Evaluate() [2/2]

virtual bool Evaluate ( LPVOID  Device,
Mesh aMesh,
int  MatIndex,
bool  NegScale 
)
pure virtual

Setting the node parameter to non NULL, will make sure the Normals are transformed correctly.

Parameters
*DeviceA Pointer to the main DX interface
*aMeshThe mesh whose data is to be extracted
MatIndexThe material index for the faces to be rendered. This provides support for multi subobject materials
NegScaleUsed to determine if negative scale is being used on the object.
Returns
TRUE if successful

◆ SetMappingData()

virtual void SetMappingData ( Tab< int > &  map)
pure virtual

Store relevant mapping data.

Allows the app to provide up to 8 mapping channels, this is used to extract the texcoord data from the mesh

Parameters
mapA tab of active mapping channels

◆ Render()

virtual bool Render ( LPVOID  Device)
pure virtual

Renders the current object.

Parameters
*DeviceA Pointer to the main DX interface
Returns
TRUE if successful

◆ Invalidate()

virtual void Invalidate ( )
pure virtual

force an invalidation of the internal data structures

◆ GetVertexFormat()

virtual bool GetVertexFormat ( void **  pFormat,
int itemCount 
)
pure virtual

Get the current Vertex format for the mesh.

This retrieves the current active vertex format for the mesh. The return value will be false if DirectX9 is running or true and an itemCount >0 if DirectX 10 is running.

Parameters
**pFormatA pointer to vertex descriptor - this will be different for Dx9 and Dx10
*itemCountThe number of items in the vertex descriptor
Returns
TRUE if successful. In Dx9 and 3ds Max 9 this will be false.