|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMeshMRM Class ReferenceAn instanciable MRM mesh.
More...
#include <mesh_mrm.h>
Inheritance diagram for NL3D::CMeshMRM:
List of all members.
Public Methods |
| CMeshMRM () |
| Constructor. More...
|
void | build (CMeshBase::CMeshBaseBuild &mBase, CMesh::CMeshBuild &m, std::vector< CMesh::CMeshBuild * > &listBS, const CMRMParameters ¶ms=CMRMParameters()) |
| Build a mesh, replacing old. More...
|
void | build (CMeshBase::CMeshBaseBuild &m, const CMeshMRMGeom &mgeom) |
| Build a mesh, replacing old. More...
|
void | optimizeMaterialUsage (std::vector< sint > &remap) |
| Optimize material use. More...
|
void | computeBonesId (CSkeletonModel *skeleton) |
| Compute skinning id. More...
|
void | updateSkeletonUsage (CSkeletonModel *sm, bool increment) |
| update Skeleton Usage. increment or decrement. More...
|
void | changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest) |
| Change MRM Distance setup. More...
|
|
virtual CTransformShape * | createInstance (CScene &scene) |
| Create a CMeshInstance, which contains materials. More...
|
virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
| clip this mesh in a driver. More...
|
virtual void | render (IDriver *drv, CTransformShape *trans, bool passOpaque) |
| render() this mesh in a driver. More...
|
virtual float | getNumTriangles (float distance) |
| get an approximation of the number of triangles this instance will render for a fixed distance. More...
|
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serial this mesh. More...
|
| NLMISC_DECLARE_CLASS (CMeshMRM) |
virtual void | getAABBox (NLMISC::CAABBox &bbox) const |
| Get bbox. More...
|
|
const NLMISC::CAABBoxExt & | getBoundingBox () const |
| get the extended axis aligned bounding box of the mesh. More...
|
const CVertexBuffer & | getVertexBuffer () const |
| get the vertex buffer used by the mrm mesh. NB: this VB store all Vertices used by All LODs. More...
|
uint | getNbLod () const |
| get the number of LOD. More...
|
uint | getNbRdrPass (uint lodId) const |
| get the number of rendering pass of a LOD. More...
|
const CPrimitiveBlock & | getRdrPassPrimitiveBlock (uint lodId, uint renderingPassIndex) const |
| get the primitive block associated with a rendering pass of a LOD. More...
|
uint32 | getRdrPassMaterial (uint lodId, uint renderingPassIndex) const |
| get the material ID associated with a rendering pass of a LOD. More...
|
const CMeshMRMGeom & | getMeshGeom () const |
| Get the mesh geom. More...
|
Private Attributes |
CMeshMRMGeom | _MeshMRMGeom |
Detailed Description
An instanciable MRM mesh.
To build a CMeshMRM, you should:
NB: internally, build() use CMRMBuilder, a builder of MRM.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 612 of file mesh_mrm.h.
Constructor & Destructor Documentation
NL3D::CMeshMRM::CMeshMRM |
( |
|
) |
|
|
Member Function Documentation
|
Build a mesh, replacing old.
build from a CMeshBaseBuild (materials info) and a previously builded CMeshMRMGeom. WARNING: This has a side effect of deleting AnimatedMaterials. this is much slower than CMesh::build(), because it computes the MRM. -
Parameters:
-
params |
parameters of the MRM build process. |
Definition at line 2560 of file mesh_mrm.cpp.
References _MeshMRMGeom. |
|
Build a mesh, replacing old.
WARNING: This has a side effect of deleting AnimatedMaterials. this is much slower than CMesh::build(), because it computes the MRM. -
Parameters:
-
params |
parameters of the MRM build process. |
Definition at line 2549 of file mesh_mrm.cpp.
References _MeshMRMGeom, and params. |
void NL3D::CMeshMRM::changeMRMDistanceSetup |
( |
float |
distanceFinest, |
|
|
float |
distanceMiddle, |
|
|
float |
distanceCoarsest |
|
) |
|
|
|
Change MRM Distance setup.
NB: no-op if distanceFinest<0, distanceMiddle<=distanceFinest or if distanceCoarsest<=distanceMiddle. -
Parameters:
-
distanceFinest |
The MRM has its max faces when dist<=distanceFinest. |
distanceMiddle |
The MRM has 50% of its faces at dist==distanceMiddle. |
distanceCoarsest |
The MRM has faces/Divisor (ie near 0) when dist>=distanceCoarsest. |
Definition at line 2680 of file mesh_mrm.cpp.
References _MeshMRMGeom. |
bool NL3D::CMeshMRM::clip |
( |
const std::vector< CPlane > & |
pyramid, |
|
|
const CMatrix & |
worldMatrix |
|
) |
[virtual] |
|
virtual void NL3D::CMeshMRM::getAABBox |
( |
NLMISC::CAABBox & |
bbox |
) |
const [inline, virtual] |
|
uint NL3D::CMeshMRM::getNbLod |
( |
|
) |
const [inline] |
|
uint NL3D::CMeshMRM::getNbRdrPass |
( |
uint |
lodId |
) |
const [inline] |
|
float NL3D::CMeshMRM::getNumTriangles |
( |
float |
distance |
) |
[virtual] |
|
uint32 NL3D::CMeshMRM::getRdrPassMaterial |
( |
uint |
lodId, |
|
|
uint |
renderingPassIndex |
|
) |
const [inline] |
|
|
get the material ID associated with a rendering pass of a LOD.
-
Parameters:
-
lodId |
the id of the LOD. |
renderingPassIndex |
the index of the rendering pass in the matrix block |
Definition at line 717 of file mesh_mrm.h.
References _MeshMRMGeom.
Referenced by optimizeMaterialUsage. |
const CPrimitiveBlock& NL3D::CMeshMRM::getRdrPassPrimitiveBlock |
( |
uint |
lodId, |
|
|
uint |
renderingPassIndex |
|
) |
const [inline] |
|
|
get the primitive block associated with a rendering pass of a LOD.
-
Parameters:
-
lodId |
the id of the LOD. |
renderingPassIndex |
the index of the rendering pass |
Definition at line 707 of file mesh_mrm.h.
References _MeshMRMGeom. |
const CVertexBuffer& NL3D::CMeshMRM::getVertexBuffer |
( |
|
) |
const [inline] |
|
|
get the vertex buffer used by the mrm mesh. NB: this VB store all Vertices used by All LODs.
Definition at line 689 of file mesh_mrm.h.
References _MeshMRMGeom. |
NL3D::CMeshMRM::NLMISC_DECLARE_CLASS |
( |
CMeshMRM |
|
) |
|
|
void NL3D::CMeshMRM::optimizeMaterialUsage |
( |
std::vector< sint > & |
remap |
) |
|
|
void NL3D::CMeshMRM::updateSkeletonUsage |
( |
CSkeletonModel * |
sm, |
|
|
bool |
increment |
|
) |
|
|
Member Data Documentation
|
Definition at line 731 of file mesh_mrm.h.
Referenced by build, changeMRMDistanceSetup, clip, computeBonesId, createInstance, getBoundingBox, getMeshGeom, getNbLod, getNbRdrPass, getNumTriangles, getRdrPassMaterial, getRdrPassPrimitiveBlock, getVertexBuffer, optimizeMaterialUsage, render, and updateSkeletonUsage. |
The documentation for this class was generated from the following files:
|
|