Public Types | Public Member Functions | Static Public Member Functions

IRenderMesh Class Reference

This reference page is linked to from the following overview topics: Hardware Rendered Materials.


Search for all occurrences

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.

#include <RTMax.h>

Inheritance diagram for IRenderMesh:
Inheritance graph
[legend]

List of all members.

Public Types

enum   MeshType { kMesh, kScreenQuad }

Public Member Functions

virtual  ~IRenderMesh ()
  Destructor.
virtual void  SetMeshType (MeshType type)=0
  Defines what the mesh represents.
virtual bool  Evaluate (LPVOID Device, int width, int height, int texWidth, int texHeight)=0
  Used to update the Quad version of the mesh.
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.
virtual void  SetMappingData (Tab< int > &map)=0
  Store relevant mapping data.
virtual bool  Render (LPVOID Device)=0
  Renders the current object.
virtual void  Invalidate ()=0
  force an invalidation of the internal data structures
virtual bool  GetVertexFormat (void **pFormat, int *itemCount)=0
  Get the current Vertex format for the mesh.

Static Public Member Functions

static DllExport IRenderMesh GetRenderMesh ()
  Exported function to access the IRenderMesh interface.

Member Enumeration Documentation

enum MeshType

Constructor & Destructor Documentation

virtual ~IRenderMesh ( ) [inline, virtual]

Destructor.

{;}

Member Function Documentation

static DllExport IRenderMesh* GetRenderMesh ( ) [static]

Exported function to access the IRenderMesh interface.

virtual void SetMeshType ( MeshType  type ) [pure virtual]

Defines what the mesh represents.

Parameters:
type specify whether it is a mesh or a full screen quad
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:
*Device A Pointer to the main DX interface
width The width of the render target
height The height of the render target
texWidth The width of the texture being used
texHeight The height of the texture being used
Returns:
TRUE if successful
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:
*Device A Pointer to the main DX interface
*aMesh The mesh whose data is to be extracted
MatIndex The material index for the faces to be rendered. This provides support for multi subobject materials
NegScale Used to determine if negative scale is being used on the object.
Returns:
TRUE if successful
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:
map A tab of active mapping channels
virtual bool Render ( LPVOID  Device ) [pure virtual]

Renders the current object.

Parameters:
*Device A Pointer to the main DX interface
Returns:
TRUE if successful
virtual void Invalidate ( ) [pure virtual]

force an invalidation of the internal data structures

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:
**pFormat A pointer to vertex descriptor - this will be different for Dx9 and Dx10
*itemCount The number of items in the vertex descriptor
Returns:
TRUE if successful. In Dx9 and 3ds Max 9 this will be false.

IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh
IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh IRenderMesh