|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMeshMultiLod Class ReferenceMesh with several LOD meshes.
More...
#include <mesh_multi_lod.h>
Inheritance diagram for NL3D::CMeshMultiLod:
List of all members.
Public Methods |
const IMeshGeom & | getMeshGeom (uint slot) const |
| Geometry accessor. More...
|
uint | getNumSlotMesh () const |
| Get slot mesh count. More...
|
IMeshGeom * | getSlotMesh (uint i, bool &coarseMesh) |
| Get a slot mesh. More...
|
bool | isStatic () const |
| Is static mesh ? More...
|
void | changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest) |
| Change MRM Distance setup of the Lod 0 only. More...
|
virtual float | getNumTriangles (float distance) |
| should not be called direclty as the intance of this shape will use 'getNumTrianglesWithCoarsestDist' themselves to get the correct distance. More...
|
float | getNumTrianglesWithCoarsestDist (float distance, float coarsestMeshDist) const |
|
void | build (CMeshMultiLodBuild &mbuild) |
| Build a mesh from material info, and a builded MeshGeom. WARNING: This has a side effect of deleting AnimatedMaterials. 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 void | getAABBox (NLMISC::CAABBox &bbox) const |
| Get bbox. More...
|
virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serial this mesh. More...
|
| NLMISC_DECLARE_CLASS (CMeshMultiLod) |
| Declare name of the shape. More...
|
|
virtual IMeshGeom * | supportMeshBlockRendering (CTransformShape *trans, float &polygonCount) const |
| return !NULL if this shape can support MeshBlock rendering for a special instance. More...
|
Private Methods |
void | clear () |
| Clear the mesh. More...
|
void | renderMeshGeom (uint slot, IDriver *drv, CMeshMultiLodInstance *trans, float numPoylgons, uint32 rdrFlags, float alpha, CCoarseMeshManager *manager) |
| Render the MeshGeom of a slot, even if coarseMesh. More...
|
void | renderCoarseMesh (uint slot, IDriver *drv, CMeshMultiLodInstance *trans, CCoarseMeshManager *manager) |
| Render the CoarseMesh of a slot. must be a coarseMesh, and shoudl be called only in passOpaque. More...
|
void | compileDistMax () |
| copileDistMax when builded/loaded. More...
|
Private Attributes |
bool | _StaticLod |
| Static or dynamic load ? More...
|
std::vector< CMeshSlot > | _MeshVector |
| Vector of meshes. More...
|
Friends |
class | CMeshMultiLodBalancingObs |
Detailed Description
Mesh with several LOD meshes.
This mesh handle several meshes of any kind of shape (MRM, standard, coarse meshes..) At run time, it chooses what LOD meshes it must render according to its settings.
-
Author:
-
Cyril 'Hulud' Corvazier , Nevrax France
-
Date:
-
2001
Definition at line 52 of file mesh_multi_lod.h.
Member Function Documentation
void NL3D::CMeshMultiLod::changeMRMDistanceSetup |
( |
float |
distanceFinest, |
|
|
float |
distanceMiddle, |
|
|
float |
distanceCoarsest |
|
) |
|
|
|
Change MRM Distance setup of the Lod 0 only.
No op if the lod0 is not a CMeshMRMGeom 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 636 of file mesh_multi_lod.cpp.
References _MeshVector, and getNumSlotMesh. |
void NL3D::CMeshMultiLod::clear |
( |
|
) |
[private] |
|
bool NL3D::CMeshMultiLod::clip |
( |
const std::vector< CPlane > & |
pyramid, |
|
|
const CMatrix & |
worldMatrix |
|
) |
[virtual] |
|
void NL3D::CMeshMultiLod::compileDistMax |
( |
|
) |
[private] |
|
void NL3D::CMeshMultiLod::getAABBox |
( |
NLMISC::CAABBox & |
bbox |
) |
const [virtual] |
|
const IMeshGeom & NL3D::CMeshMultiLod::getMeshGeom |
( |
uint |
slot |
) |
const |
|
uint NL3D::CMeshMultiLod::getNumSlotMesh |
( |
|
) |
const [inline] |
|
virtual float NL3D::CMeshMultiLod::getNumTriangles |
( |
float |
distance |
) |
[inline, virtual] |
|
float NL3D::CMeshMultiLod::getNumTrianglesWithCoarsestDist |
( |
float |
distance, |
|
|
float |
coarsestMeshDist |
|
) |
const |
|
IMeshGeom* NL3D::CMeshMultiLod::getSlotMesh |
( |
uint |
i, |
|
|
bool & |
coarseMesh |
|
) |
[inline] |
|
bool NL3D::CMeshMultiLod::isStatic |
( |
|
) |
const [inline] |
|
NL3D::CMeshMultiLod::NLMISC_DECLARE_CLASS |
( |
CMeshMultiLod |
|
) |
|
|
|
Declare name of the shape.
|
IMeshGeom * NL3D::CMeshMultiLod::supportMeshBlockRendering |
( |
CTransformShape * |
trans, |
|
|
float & |
polygonCount |
|
) |
const [virtual] |
|
|
return !NULL if this shape can support MeshBlock rendering for a special instance.
NB: Mesh Block render cannot occurs if the Mesh is Skinned/MeshMorphed. NB: Mesh Block render can occurs only in Opaque pass NB: Mesh block render can occurs only for CMeshBase meshes. -
Parameters:
-
trans |
the instance to take into account (meshMultiLod may return NULL in blend transition). |
polygonCount |
the number of polygons to render for the meshGeom returned |
-
Returns:
-
the meshgeom to render per block if OK, else NULL (default)
Reimplemented from NL3D::IShape.
Definition at line 657 of file mesh_multi_lod.cpp.
References _MeshVector. |
Friends And Related Function Documentation
friend class CMeshMultiLodBalancingObs [friend]
|
|
Member Data Documentation
std::vector<CMeshSlot> NL3D::CMeshMultiLod::_MeshVector [private]
|
|
|
Vector of meshes.
Definition at line 249 of file mesh_multi_lod.h.
Referenced by build, changeMRMDistanceSetup, clear, clip, compileDistMax, createInstance, getAABBox, getMeshGeom, getNumSlotMesh, getNumTrianglesWithCoarsestDist, getSlotMesh, render, renderCoarseMesh, renderMeshGeom, and supportMeshBlockRendering. |
bool NL3D::CMeshMultiLod::_StaticLod [private]
|
|
The documentation for this class was generated from the following files:
|
|