Public Member Functions

ID3DHWMeshCacheManager Class Reference

Search for all occurrences

Detailed Description

Description:
This class is only available in release 10 or later.

This interface provides access to the D3D HWMeshCache Manager. This allows nodes or any other "thing" that needs to display to register a HW Mesh with the manager these hardware meshes are sorted and displayed by material to maximize performance and minimize state switch

ViewExp *pview = GetCOREInterface()->GetActiveViewport();

GraphicsWindow *gw = pview->getGW();

ID3DHWMeshCacheManager * manager = (ID3DHWMeshCacheManager*)gw->GetInterface(D3DHWMESHCACHEMANAGER_INTERFACE_ID);



#include <ihardwarerenderer.h>

Inheritance diagram for ID3DHWMeshCacheManager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual Interface_ID  GetID ()
virtual LifetimeType  LifetimeControl ()
virtual void  D3DHWMeshCacheManagerReset (BOOL clearBlock=FALSE)=0
  This resets the list. It removes all the D3D meshes from the manager.
virtual BOOL  D3DHWMeshCacheManagerAddHWMesh (INode *node, GFX_MESH::IHWDrawMesh *pMesh, Material *mtl, HardwareMaterial *pHWMat, Point3 wireframeColor, Matrix3 *tmOverRide, DWORD attr, DWORD renderLimit)=0
  This method lets user add a D3D mesh to the manager to be drawn.
virtual void  D3DHWMeshCacheManagerSetRenderLimit (DWORD limit)=0
  This allows you to set a render limit for the HW Mesh cache manager.
virtual DWORD  D3DHWMeshCacheManagerGetRenderLimit ()=0
  This allows you to get a render limit for the HW Mesh cache manger.
virtual void  D3DHWMeshCacheManagerRegisterMaterial (HardwareMaterial *mtl, Point3 wireframeColor)=0
  This method lets user add a HWMaterial.
virtual void  D3DHWMeshCacheManagerDeleteHWMesh (GFX_MESH::IHWDrawMesh *pMesh)=0
  This method lets the user remove add a D3D mesh from the manager.
virtual void  D3DHWMeshCacheManagerDisplay (GraphicsWindow *gw)=0
  This method draws the D3D HW Meshes.
virtual int  D3DHWMeshCacheManagerTotalBlocksDrawn ()=0

Member Function Documentation

virtual Interface_ID GetID ( ) [inline, virtual]
Remarks:
This method returns the unique interface ID.

Reimplemented from BaseInterface.

{ return D3DHWMESHCACHEMANAGER_INTERFACE_ID; }
virtual LifetimeType LifetimeControl ( ) [inline, virtual]
Remarks:
This method allows inquiries into the actual lifetime policy of a client and provide a server-controlled delete notify callback.
Returns:
One of the following LifetimeTypes:

noRelease

Do not call release, use interface as long as you like.

immediateRelease

The interface is only good for one calls. The release is implied so a call to release is not required.

wantsRelease

The clients are controlling the lifetime, so the interface needs a Release() when the client has finished. This is the default.

serverControlled

The server controls the lifetime and will use the InterfaceNotifyCallback to inform the code when it is gone.
Default Implementation:
{ return noRelease; }

Reimplemented from BaseInterface.

{ return noRelease; }
virtual void D3DHWMeshCacheManagerReset ( BOOL  clearBlock = FALSE ) [pure virtual]

This resets the list. It removes all the D3D meshes from the manager.

It removes all the D3D meshes from the manager. This should be called whenever the manager needs to flushed for instance file resest, load etc.

Parameters:
[in] BOOL clearBlock - this will also remove any material list that are present. Typically you do not want to do this so on the next add the data struct will not need to be rebukt
virtual BOOL D3DHWMeshCacheManagerAddHWMesh ( INode node,
GFX_MESH::IHWDrawMesh pMesh,
Material mtl,
HardwareMaterial *  pHWMat,
Point3  wireframeColor,
Matrix3 tmOverRide,
DWORD  attr,
DWORD  renderLimit 
) [pure virtual]

This method lets user add a D3D mesh to the manager to be drawn.

This method lets add a D3D mesh to the manager to be drawn. It will be drawn batched based on the material supplied in the current display mode. This returns TRUE if the node was succefully added else FALSE

Parameters:
[in] INode *node this is the inode that owns this d3d mesh, it can be null
[in] pMesh this is the handle of the directx mesh which is a pointer to a D3DXMesh
[in] Material *mtl this is the material for this mesh and can be null
[in] HardwareMaterial *pHWMat this is the hwmaterial for this mesh and must be supplied
[in] Point3 wireframeColor this is color of the wireframe mesh since it can be different than the shaded diffuse color
[in] Matrix3 *tmOverRide this is the world space transform for the mesh, if null the gw transform will be used
[in] attr this is the attribute of this particular mesh typically it is the material ID
virtual void D3DHWMeshCacheManagerSetRenderLimit ( DWORD  limit ) [pure virtual]

This allows you to set a render limit for the HW Mesh cache manager.

This allows you to set a render limit for the HW Mesh cache so when you add a mesh to the manager you can filter it by the display limit. This is useful for when the display is swapping draw modes and you only want to batch a certain mode.

Parameters:
[in] DWORD limit this is this the limit filter so only objects matching this limit will be added If this is set 0 there will be no filtering
virtual DWORD D3DHWMeshCacheManagerGetRenderLimit ( ) [pure virtual]

This allows you to get a render limit for the HW Mesh cache manger.

This allows you to get a render limit for the HW Mesh cache so when you add a mesh to the manager you can filter it by the display limit. This is useful for when the display is swapping draw modes and you only want to batch a certain mode.

virtual void D3DHWMeshCacheManagerRegisterMaterial ( HardwareMaterial *  mtl,
Point3  wireframeColor 
) [pure virtual]

This method lets user add a HWMaterial.

This method lets add a user add a HWMaterial. This is useful if you are preprocessing materials so you can add them as you process them

Parameters:
[in] HardwareMaterial *pHWMat this is the hwmaterial for this mesh and must be supplied
[in] Point3 wireframeColor this is color of the wireframe mesh since it can be different than the shaded diffuse color
virtual void D3DHWMeshCacheManagerDeleteHWMesh ( GFX_MESH::IHWDrawMesh pMesh ) [pure virtual]

This method lets the user remove add a D3D mesh from the manager.

This method lets the user remove add a D3D mesh from the manager

Parameters:
[in] pMesh this is the handle of the directx mesh to be removed
virtual void D3DHWMeshCacheManagerDisplay ( GraphicsWindow gw ) [pure virtual]

This method draws the D3D HW Meshes.

This method draws the D3D HW Meshes

Parameters:
[in] GraphicsWindow *gw which is the graphics window to draw to
virtual int D3DHWMeshCacheManagerTotalBlocksDrawn ( ) [pure virtual]

ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager
ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager ID3DHWMeshCacheManager