#include <mesh_geom.h>
Inheritance diagram for NL3D::IMeshGeom:
Nevrax France
Definition at line 77 of file mesh_geom.h.
Mesh Block Render Interface | |
virtual void | activeInstance (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount, void *vbDst)=0 |
virtual void | beginMesh (CMeshGeomRenderContext &rdrCtx)=0 |
virtual void | computeMeshVBHeap (void *dst, uint indexStart) |
virtual void | endMesh (CMeshGeomRenderContext &rdrCtx)=0 |
virtual uint | getNumRdrPassesForInstance (CMeshBaseInstance *inst) const=0 |
virtual uint | getNumRdrPassesForMesh () const=0 |
virtual bool | getVBHeapInfo (uint &vertexFormat, uint &numVertices) |
virtual bool | isActiveInstanceNeedVBFill () const |
bool | isMeshInVBHeap () const |
virtual void | renderPass (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount, uint rdrPass)=0 |
virtual bool | sortPerMaterial () const=0 |
virtual bool | supportMeshBlockRendering () const=0 |
Mesh Block Render access | |
CMeshBlockManager * | _MeshBlockManager |
The manager which owns our VBHeap data. NULL means manager must try to setup VBHeap. | |
uint | _MeshVBHeapId |
This is the Heap Id setuped in CMeshBlockManager::allocateMeshVBHeap(). | |
uint | _MeshVBHeapIndexStart |
Delta of index for mesh into VBHeap. | |
uint | _MeshVBHeapNumVertices |
Number of vertices for mesh into VBHeap. | |
sint32 | _RootInstanceId |
This is the head of the list of instances to render in the CMeshBlockManager. -1 if NULL. | |
class | CMeshBlockManager |
The manager which owns our VBHeap data. NULL means manager must try to setup VBHeap. | |
Public Types | |
enum | TRenderFlag { RenderOpaqueMaterial = 1, RenderTransparentMaterial = 2, RenderPassOpaque = 4, RenderGlobalAlpha = 8, RenderGADisableZWrite = 16 } |
Render Flags, used in render. More... | |
Public Member Functions | |
virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
virtual std::string | getClassName ()=0 |
virtual bool | hasMeshVertexProgram () const |
True if this mesh has a vertexProgram. | |
IMeshGeom () | |
Constructor. | |
virtual void | initInstance (CMeshBaseInstance *mbi)=0 |
virtual void | profileSceneRender (CRenderTrav *rdrTrav, CTransformShape *trans, float polygonCount, uint32 rdrFlags)=0 |
virtual void | render (IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha)=0 |
virtual void | renderSkin (CTransformShape *trans, float alphaMRM)=0 |
virtual void | serial (IStream &f)=0 |
virtual | ~IMeshGeom () |
dtor | |
Load balancing methods | |
virtual const NLMISC::CAABBoxExt & | getBoundingBox () const=0 |
virtual float | getNumTriangles (float distance)=0 |
|
Render Flags, used in render.
Definition at line 82 of file mesh_geom.h.
00083 { 00084 RenderOpaqueMaterial= 1, // set when the mesh geom must render opaque material 00085 RenderTransparentMaterial= 2, // set when the mesh geom must render transparent material 00086 RenderPassOpaque=4, // set when the current traversal rdrPass is the opaque pass 00087 RenderGlobalAlpha= 8, // set when the caller wants to draw material with global alpha 00088 RenderGADisableZWrite= 16, // only when globalAlpha is used. set if must disable ZWrite 00089 }; |
|
Constructor.
Definition at line 37 of file mesh_geom.cpp. References _MeshBlockManager, _MeshVBHeapId, _MeshVBHeapNumVertices, and _RootInstanceId.
00038 { 00039 _RootInstanceId= -1; 00040 _MeshBlockManager= NULL; 00041 _MeshVBHeapId= 0; 00042 _MeshVBHeapNumVertices= 0; 00043 } |
|
dtor
Definition at line 46 of file mesh_geom.cpp. References _MeshBlockManager, _MeshVBHeapId, NL3D::CMeshBlockManager::freeMeshVBHeap(), and nlassert.
00047 { 00048 // If still have a VBHeap data in the manager, must free it. 00049 if(_MeshVBHeapId) 00050 { 00051 nlassert(_MeshBlockManager); 00052 _MeshBlockManager->freeMeshVBHeap(this); 00053 } 00054 } |
|
The framework call this method any time a change of instance occurs. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
The framework call this method when he will render instances of this meshGeom soon. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
clip this shape with a pyramid. the pyramid is given in world space.The world matrix of the object is given.
Reimplemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Definition at line 110 of file mesh_geom.h. Referenced by NL3D::CMeshMultiLod::clip().
00110 {return true;} |
|
When the framework succes to allocate a VBHeap space, it call this method to fill this space and compute shifted Primitive block.
Reimplemented in NL3D::CMeshGeom, and NL3D::CMeshMRMGeom. Definition at line 207 of file mesh_geom.h. References uint. Referenced by NL3D::CMeshBlockManager::allocateMeshVBHeap().
00207 {} |
|
The framework call this method when it has done with this meshGeom Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
get the extended axis aligned bounding box of the mesh Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. |
|
Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize(). |
|
return the number of renderPasses for this instance. Called after activateInstance() Used only if sortPerMaterial()) is false Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
return the number of renderPasses for this mesh. Used only if sortPerMaterial()) is true Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
get an approximation of the number of triangles this instance will render for a fixed distance.
Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshMultiLodInstance::traverseLoadBalancing(). |
|
The framework call this method to know if the mesh can fit in VBHeap. if yes, deriver must return mesh vertexFormat and num of vertices. Reimplemented in NL3D::CMeshGeom, and NL3D::CMeshMRMGeom. Definition at line 200 of file mesh_geom.h. References uint. Referenced by NL3D::CMeshBlockManager::allocateMeshVBHeap().
00200 {return false;} |
|
True if this mesh has a vertexProgram.
Reimplemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Definition at line 124 of file mesh_geom.h. Referenced by NL3D::CMeshMultiLodInstance::initRenderFilterType().
00124 {return false;} |
|
store usefull information for this meshGeom in the instance. Used for IMeshVertexProgram as example Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. |
|
Return true if the meshGeom has to Fill some Vertices at activeInstance() time if VBHeap enabled at this time, then vbDst in activeInstance(,,,vbDst) will contains the vb to write to. Reimplemented in NL3D::CMeshMRMGeom. Definition at line 212 of file mesh_geom.h. Referenced by NL3D::CMeshBlockManager::render().
00212 {return false;} |
|
Return true if the meshGeom has to Fill some Vertices at activeInstance() time if VBHeap enabled at this time, then vbDst in activeInstance(,,,vbDst) will contains the vb to write to. Definition at line 215 of file mesh_geom.h. References _MeshVBHeapId. Referenced by NL3D::CMeshMRMGeom::profileSceneRender(), and NL3D::CMeshGeom::profileSceneRender().
00215 {return _MeshVBHeapId!=0;} |
|
Profile the render of this meshGeom. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshMultiLod::profileMeshGeom(). |
|
render() this meshGeom in a driver, with the specified TransformShape instance information. NB: the meshGeom is ensured to not be skinned to a skeleton, but CMeshGeom may still have skin information. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshMultiLod::renderMeshGeom(). |
|
The framework call this method to render the current renderPass, with the current instance NB: if the material is blended, DON'T render it!! Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
render this meshGeom as a skin, with the specified TransformShape instance information (which gives the driver) NB: trans->isSkinned() is ensured to be true. All the materials must be rendered. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. |
|
|
true if the sort criterion must be by material. Else, sort per instance. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshBlockManager::render(). |
|
true if this meshGeom support meshBlock rendering. eg: return false if skinned/meshMorphed. Implemented in NL3D::CMeshGeom, NL3D::CMeshMRMGeom, and NL3D::CMeshMRMSkinnedGeom. Referenced by NL3D::CMeshMultiLod::supportMeshBlockRendering(). |
|
The manager which owns our VBHeap data. NULL means manager must try to setup VBHeap.
Definition at line 225 of file mesh_geom.h. |
|
The manager which owns our VBHeap data. NULL means manager must try to setup VBHeap.
Definition at line 231 of file mesh_geom.h. Referenced by NL3D::CMeshBlockManager::addInstance(), IMeshGeom(), and ~IMeshGeom(). |
|
This is the Heap Id setuped in CMeshBlockManager::allocateMeshVBHeap().
Definition at line 233 of file mesh_geom.h. Referenced by NL3D::CMeshBlockManager::addInstance(), NL3D::CMeshBlockManager::allocateMeshVBHeap(), NL3D::CMeshBlockManager::freeMeshVBHeap(), IMeshGeom(), isMeshInVBHeap(), and ~IMeshGeom(). |
|
Delta of index for mesh into VBHeap.
Definition at line 235 of file mesh_geom.h. Referenced by NL3D::CMeshBlockManager::allocateMeshVBHeap(), NL3D::CMeshBlockManager::freeMeshVBHeap(), and NL3D::CMeshBlockManager::render(). |
|
Number of vertices for mesh into VBHeap.
Definition at line 237 of file mesh_geom.h. Referenced by NL3D::CMeshBlockManager::allocateMeshVBHeap(), IMeshGeom(), and NL3D::CMeshBlockManager::render(). |
|
This is the head of the list of instances to render in the CMeshBlockManager. -1 if NULL.
Definition at line 228 of file mesh_geom.h. Referenced by NL3D::CMeshBlockManager::addInstance(), IMeshGeom(), and NL3D::CMeshBlockManager::render(). |