This class maintains a list of the meshes and RenderMeshes used per instance. It acts as a factory class.
This is useful for Materials where a single material could be applied to multiple nodes, so a cache is needed so the material can pull the correct mesh data
#include <RTMax.h>

Public Member Functions | 
|
| virtual void | SetMeshType (IRenderMesh::MeshType type)=0 | 
| Set the type of the mesh cache to maintain;.
 | 
|
| virtual int | SetCachedMNMesh (MNMesh *mnMesh, INode *node, TimeValue time, bool &meshChanged)=0 | 
| Fill up the cache with data from 3ds Max.
 | 
|
| virtual int | SetCachedMesh (Mesh *mesh, INode *node, TimeValue time, bool &meshChanged)=0 | 
| Fill up the cache with data from 3ds Max.
 | 
|
| virtual int | GetCacheSize ()=0 | 
| Get the number of cached mesh.  | 
|
| virtual IRenderMesh * | GetActiveRenderMesh (int index)=0 | 
| Get the active render mesh.  | 
|
| virtual INode * | GetActiveNode (int index)=0 | 
| virtual Mesh * | GetActiveMesh (int index)=0 | 
| virtual void | SetDirectXVersion (UINT version)=0 | 
| virtual | ~IRenderMeshCache () | 
| default destructor  | 
|
| virtual void | Release ()=0 | 
| Used to release any data stored by the
cache.  | 
|
| virtual void | DeleteRenderMeshCache (INode *node)=0 | 
| Used to delete the cache for a specific
node.  | 
|
Static Public Member Functions | 
|
| static DllExport IRenderMeshCache * | GetRenderMeshCache () | 
| Exported function to access the 
IRenderMeshCache interface.  | 
|
| virtual ~IRenderMeshCache | ( | ) | [inline, virtual] | 
default destructor
{}
| static DllExport IRenderMeshCache* GetRenderMeshCache | ( | ) | [static] | 
Exported function to access the IRenderMeshCache interface.
| virtual void SetMeshType | ( | IRenderMesh::MeshType | type | ) | [pure virtual] | 
Set the type of the mesh cache to maintain;.
| type | Set the type of object to hold. This can be either a mesh or a quad. | 
| virtual int SetCachedMNMesh | ( | MNMesh * | mnMesh, | 
| INode * | node, | ||
| TimeValue | time, | ||
| bool & | meshChanged | ||
| ) | [pure virtual] | 
Fill up the cache with data from 3ds Max.
This method needs to be called when the node has actually changed. In 3ds Max 8 and before you could call this method at any time and the method would attempt to cache and maintain the data. However this would not work correctly with a MNMesh type object. Now the method expects to only update itself when the object changes. This is easily achieved by only calling this method when IStdDualVSCallback::InitValid() is called. To simply get the cache position for the node you can call this method with a NULL mnMesh pointer.
| *mnMesh | The MNMesh to store in the cache. If this is NULL the system will return the cache entry only | 
| *node | The node to store in the cache | 
| time | The time to use in any evaluations | 
| &meshChanged | If the mesh is different to that in the cache, this specifies the case. | 
| virtual int SetCachedMesh | ( | Mesh * | mesh, | 
| INode * | node, | ||
| TimeValue | time, | ||
| bool & | meshChanged | ||
| ) | [pure virtual] | 
Fill up the cache with data from 3ds Max.
This method needs to be called when the node has actually changed. In 3ds Max 8 and before you could call this method at any time and the method would attempt to cache and maintain the data. However this would not work correctly with a MNMesh type object. Now the method expects to only update itself when the object changes. This is easily achieved by only calling this method when IStdDualVSCallback::InitValid() is called. To simply get the cache position for the node you can call this method with a NULL mesh pointer.
| *mesh | The mesh to store in the cache. If this is NULL the system will return the cache entry only | 
| *node | The node to store in the cache | 
| time | The time to use in any evaluations | 
| &meshChanged | If the mesh is different to that in the cache, this specifies the case. | 
| virtual int GetCacheSize | ( | ) | [pure virtual] | 
| virtual IRenderMesh* GetActiveRenderMesh | ( | int | index | ) | [pure virtual] | 
Get the active render mesh.
| index | The index of the mesh to retrieve | 
| virtual INode* GetActiveNode | ( | int | index | ) | [pure virtual] | 
| index | Get the node for the current cached object | 
| virtual Mesh* GetActiveMesh | ( | int | index | ) | [pure virtual] | 
| index | Get the mesh for the current cached object | 
| virtual void SetDirectXVersion | ( | UINT | version | ) | [pure virtual] | 
| virtual void Release | ( | ) | [pure virtual] | 
Used to release any data stored by the cache.
| virtual void DeleteRenderMeshCache | ( | INode * | node | ) | [pure virtual] | 
Used to delete the cache for a specific node.