|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMeshMRMGeom Class ReferenceAn MRM mesh geometry, with no materials information.
More...
#include <mesh_mrm.h>
Inheritance diagram for NL3D::CMeshMRMGeom:
List of all members.
RawSkin optimisation. |
uint | NumCacheVertexNormal1 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin1) |
uint | NumCacheVertexNormal2 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin2) |
uint | NumCacheVertexNormal4 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin4) |
void | updateRawSkinNormal (bool enabled, CMeshMRMInstance *mi, sint curLodId) |
| compute RawSkin info in the MRMInstance according to current skin setup. More...
|
void | dirtMeshDataId () |
| Increment the refCount, so instances RawSkins are no longer valid. More...
|
void | applyArrayRawSkinNormal1 (CRawVertexNormalSkin1 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal2 (CRawVertexNormalSkin2 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal3 (CRawVertexNormalSkin4 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal4 (CRawVertexNormalSkin4 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal1 (CRawVertexNormalSkin1 *src, uint8 *destVertexPtr, CMatrix3x4SSE *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal2 (CRawVertexNormalSkin2 *src, uint8 *destVertexPtr, CMatrix3x4SSE *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal3 (CRawVertexNormalSkin4 *src, uint8 *destVertexPtr, CMatrix3x4SSE *boneMat3x4, uint vertexSize, uint nInf) |
void | applyArrayRawSkinNormal4 (CRawVertexNormalSkin4 *src, uint8 *destVertexPtr, CMatrix3x4SSE *boneMat3x4, uint vertexSize, uint nInf) |
uint | _MeshDataId |
| Each time the mesh is loaded/built, this increment. More...
|
Hard VB |
void | updateVertexBufferHard (IDriver *drv, uint32 numVertices) |
void | deleteVertexBufferHard () |
void | fillAGPSkinPartWithVBHardPtr (CLod &lod, uint8 *vertexDst) |
CRefPtr< IVertexBufferHard > | _VBHard |
CRefPtr< IDriver > | _Driver |
bool | _VertexBufferHardDirty |
bool | _PreciseClipping |
| NB: HERE FOR PACKING ONLY. For clipping. Estimate if we must do a Precise clipping (ie with bboxes). More...
|
Public Methods |
| CMeshMRMGeom () |
| Constructor. More...
|
| ~CMeshMRMGeom () |
void | build (CMesh::CMeshBuild &m, std::vector< CMesh::CMeshBuild * > &bsList, uint numMaxMaterial, const CMRMParameters ¶ms=CMRMParameters()) |
| Build a mesh, replacing old. More...
|
void | applyMaterialRemap (const std::vector< sint > &remap) |
| change materials Ids (called from CMesh::optimizeMaterialUsage()). More...
|
void | changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest) |
| Change MRM Distance setup. More...
|
const CMRMLevelDetail & | getLevelDetail () const |
| get the MRM level detail information. More...
|
|
virtual void | initInstance (CMeshBaseInstance *mbi) |
| Init instance info. More...
|
virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
| clip this mesh in a driver. true if visible. More...
|
virtual void | render (IDriver *drv, CTransformShape *trans, float polygonCount, uint32 rdrFlags, float globalAlpha) |
| render() this mesh in a driver, given an instance and his materials. More...
|
virtual void | renderSkin (CTransformShape *trans, float alphaMRM) |
| render() this mesh as a skin. 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 meshGeom. More...
|
| NLMISC_DECLARE_CLASS (CMeshMRMGeom) |
|
uint | getNbLodLoaded () const |
| get the number of LOD currently loaded. More...
|
void | loadFirstLod (NLMISC::IStream &f) |
| Load the header and the first lod of a MRM in a stream. More...
|
void | loadNextLod (NLMISC::IStream &f) |
| Load next lod of a stream. More...
|
void | unloadNextLod (NLMISC::IStream &f) |
| UnLoad Lod getNbLodLoaded()-1 from memory. 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...
|
const std::vector< CMesh::CSkinWeight > & | getSkinWeights () const |
| get the skinWeights used by the mrm mesh. NB: same size of the vertexBuffer. empty if !isSkinned(). More...
|
const std::vector< std::string > & | getBonesName () const |
| get the bone names of the meshMRM. 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 std::vector< CMRMWedgeGeom > & | getGeomorphs (uint lodId) const |
| Advanced. get the geomorphs for a special lod. More...
|
|
bool | isSkinned () const |
| Return true if the mesh is skinned, else return false. More...
|
void | computeBonesId (CSkeletonModel *skeleton) |
| If the mesh is skinned, still use normal CVertexBuffer. More...
|
void | updateSkeletonUsage (CSkeletonModel *sm, bool increment) |
| update Skeleton Usage. increment or decrement. computeBonesId must has been called before. More...
|
const std::vector< sint32 > & | getSkinBoneUsage () const |
| return array of bones used by the skin. computeBonesId must has been called before. More...
|
|
virtual bool | supportMeshBlockRendering () const |
| true if this meshGeom support meshBlock rendering. More...
|
virtual bool | sortPerMaterial () const |
| true if the sort criterion must be by material. More...
|
virtual uint | getNumRdrPasses () const |
| return the number of renderPasses for this mesh. More...
|
virtual void | beginMesh (CMeshGeomRenderContext &rdrCtx) |
| The framework call this method when he will render instances of this meshGeom soon. More...
|
virtual void | activeInstance (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount) |
| The framework call this method any time a change of instance occurs. More...
|
virtual void | renderPass (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount, uint rdrPass) |
| The framework call this method to render the current renderPass, with the current instance NB: if the material is blended, DON'T render it!! More...
|
virtual void | endMesh (CMeshGeomRenderContext &rdrCtx) |
| The framework call this method when it has done with this meshGeom. More...
|
|
bool | supportSkinGrouping () const |
sint | renderSkinGroupGeom (CMeshMRMInstance *mi, float alphaMRM, uint remainingVertices, uint8 *vbDest) |
void | renderSkinGroupPrimitives (CMeshMRMInstance *mi, uint baseVertex) |
Private Methods |
void | serialLodVertexData (NLMISC::IStream &f, uint startWedge, uint endWedge) |
| serial a subset of the vertices. More...
|
sint | chooseLod (float alphaMRM, float &alphaLod) |
| choose the lod according to the alphaMRM [0,1] given. More...
|
void | applyGeomorph (std::vector< CMRMWedgeGeom > &geoms, float alphaLod, IVertexBufferHard *currentVBHard) |
| Apply the geomorph to the _VBuffer, or the VBhard, if exist/used. More...
|
void | applyGeomorphWithVBHardPtr (std::vector< CMRMWedgeGeom > &geoms, float alphaLod, uint8 *vertexDestPtr) |
| Apply the geomorph to the VBhard ptr, if not NULL. More...
|
void | applyGeomorphPosNormalUV0 (std::vector< CMRMWedgeGeom > &geoms, uint8 *vertexPtr, uint8 *vertexDestPtr, sint32 vertexSize, float a, float a1) |
| Faster, but common geomorph apply. More...
|
void | bkupOriginalSkinVertices () |
| Skinning: bkup Vertex/Normal into _OriginalSkin* from VBuffer. More...
|
void | bkupOriginalSkinVerticesSubset (uint wedgeStart, uint wedgeEnd) |
void | restoreOriginalSkinVertices () |
| Skinning: restore Vertex/Normal from _OriginalSkin* to VBuffer. More...
|
void | applySkin (CLod &lod, const CSkeletonModel *skeleton) |
| Skinning: Apply skinning to the _VBuffer (before geomorph). More...
|
void | applySkinWithNormal (CLod &lod, const CSkeletonModel *skeleton) |
| The same as apply skin, but with normal modified. More...
|
void | applySkinWithNormalSSE (CLod &lod, const CSkeletonModel *skeleton) |
void | applyRawSkinWithNormal (CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton) |
void | applyRawSkinWithNormalSSE (CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton) |
void | applySkinWithTangentSpace (CLod &lod, const CSkeletonModel *skeleton, uint tangentSpaceTexCoord) |
| The same as apply skin with normal, but with a tangent space added (encoded in a texture coordinate). More...
|
void | applySkinWithTangentSpaceSSE (CLod &lod, const CSkeletonModel *skeleton, uint tangentSpaceTexCoord) |
void | restoreOriginalSkinPart (CLod &lod, IVertexBufferHard *currentVBHard) |
| Skinning: same as restoreOriginalSkinVertices(), but for one Lod only. More...
|
sint | loadHeader (NLMISC::IStream &f) throw (NLMISC::EStream) |
| load the header of this mesh. return the version of the header. More...
|
void | load (NLMISC::IStream &f) throw (NLMISC::EStream) |
| load this mesh. More...
|
void | save (NLMISC::IStream &f) throw (NLMISC::EStream) |
| save the entire mesh. More...
|
void | buildBoneUsageVer2 () |
void | compileRunTime () |
void | updateShiftedTriangleCache (CMeshMRMInstance *mi, sint curLodId, uint baseVertex) |
Private Attributes |
bool | _Skinned |
| Skinning: This tells if the mesh is correctly skinned (suuport skinning). More...
|
std::vector< CVector > | _OriginalSkinVertices |
| Skinning: this is the list of vertices (mirror of VBuffer), at the bind Pos. More...
|
std::vector< CVector > | _OriginalSkinNormals |
std::vector< CVector > | _OriginalTGSpace |
CVertexBuffer | _VBufferOriginal |
| The Original VBuffer. More...
|
CVertexBuffer | _VBufferFinal |
| The Final VBuffer. More...
|
std::vector< CMesh::CSkinWeight > | _SkinWeights |
| This is the array of SkinWeights, same size as the VB. More...
|
bool | _BoneIdComputed |
| This boolean is true if the bones id have been passed in the skeleton. More...
|
bool | _BoneIdExtended |
| true if the _BonesIdExt have been computed (for bone Usage). More...
|
bool | _SupportSkinGrouping |
| if true, then maybe use faster render. More...
|
uint8 | _LastLodComputed |
| Last lod rendered. used with renderSkinGroup*() only. More...
|
std::vector< std::string > | _BonesName |
| This array give the name of the local bones. More...
|
std::vector< sint32 > | _BonesId |
| This array give the index in the skeleton of the local bones used. computed at first computeBoneId(). More...
|
std::vector< sint32 > | _BonesIdExt |
| Same as _BonesId but with parent of bones added. (used for bone usage). More...
|
std::vector< CLod > | _Lods |
| List of Lods. More...
|
NLMISC::CAABBoxExt | _BBox |
| For clipping. this is the BB of all vertices of all Lods. More...
|
std::vector< CLodInfo > | _LodInfos |
| Info for pre-loading Lods. More...
|
uint | _NbLodLoaded |
CMeshMorpher | _MeshMorpher |
NLMISC::CSmartPtr< IMeshVertexProgram > | _MeshVertexProgram |
|
CMRMLevelDetail | _LevelDetail |
Friends |
class | CMRMBuilder |
|
class | CLod |
Detailed Description
An MRM mesh geometry, with no materials information.
To build a CMeshMRMGeom, you should:
NB: internally, build() use CMRMBuilder, a builder of MRM.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 80 of file mesh_mrm.h.
Constructor & Destructor Documentation
NL3D::CMeshMRMGeom::CMeshMRMGeom |
( |
|
) |
|
|
NL3D::CMeshMRMGeom::~CMeshMRMGeom |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CMeshMRMGeom::applyGeomorphPosNormalUV0 |
( |
std::vector< CMRMWedgeGeom > & |
geoms, |
|
|
uint8 * |
vertexPtr, |
|
|
uint8 * |
vertexDestPtr, |
|
|
sint32 |
vertexSize, |
|
|
float |
a, |
|
|
float |
a1 |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::applyGeomorphWithVBHardPtr |
( |
std::vector< CMRMWedgeGeom > & |
geoms, |
|
|
float |
alphaLod, |
|
|
uint8 * |
vertexDestPtr |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::applyMaterialRemap |
( |
const std::vector< sint > & |
remap |
) |
|
|
void NL3D::CMeshMRMGeom::applySkin |
( |
CLod & |
lod, |
|
|
const CSkeletonModel * |
skeleton |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::applySkinWithNormal |
( |
CLod & |
lod, |
|
|
const CSkeletonModel * |
skeleton |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::applySkinWithNormalSSE |
( |
CLod & |
lod, |
|
|
const CSkeletonModel * |
skeleton |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::applySkinWithTangentSpace |
( |
CLod & |
lod, |
|
|
const CSkeletonModel * |
skeleton, |
|
|
uint |
tangentSpaceTexCoord |
|
) |
[private] |
|
|
The same as apply skin with normal, but with a tangent space added (encoded in a texture coordinate).
The tangent space is modified, but not normalized (must be done in a vertex program). 4 versions from slower to faster.
Definition at line 789 of file mesh_mrm_skin.cpp.
Referenced by renderSkin. |
void NL3D::CMeshMRMGeom::applySkinWithTangentSpaceSSE |
( |
CLod & |
lod, |
|
|
const CSkeletonModel * |
skeleton, |
|
|
uint |
tangentSpaceTexCoord |
|
) |
[private] |
|
|
The framework call this method when he will render instances of this meshGeom soon.
Implements NL3D::IMeshGeom.
Definition at line 2519 of file mesh_mrm.cpp. |
void NL3D::CMeshMRMGeom::bkupOriginalSkinVertices |
( |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::bkupOriginalSkinVerticesSubset |
( |
uint |
wedgeStart, |
|
|
uint |
wedgeEnd |
|
) |
[private] |
|
|
Build a mesh, replacing old.
this is much slower than CMeshGeom::build(), because it computes the MRM. -
Parameters:
-
params |
parameters of the MRM build process. |
Definition at line 242 of file mesh_mrm.cpp.
References _BBox, _BonesName, _LevelDetail, _LodInfos, _Lods, _MeshMorpher, _MeshVertexProgram, _NbLodLoaded, _Skinned, _SkinWeights, _VBufferFinal, _VertexBufferHardDirty, bkupOriginalSkinVertices, CLod, CMRMBuilder, compileRunTime, dirtMeshDataId, NL3D::makeBBox, matrix, NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, params, NLMISC::CAABBoxExt::setCenter, and NLMISC::CAABBoxExt::setSize. |
void NL3D::CMeshMRMGeom::buildBoneUsageVer2 |
( |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::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 224 of file mesh_mrm.cpp.
References _LevelDetail. |
sint NL3D::CMeshMRMGeom::chooseLod |
( |
float |
alphaMRM, |
|
|
float & |
alphaLod |
|
) |
[inline, private] |
|
bool NL3D::CMeshMRMGeom::clip |
( |
const std::vector< CPlane > & |
pyramid, |
|
|
const CMatrix & |
worldMatrix |
|
) |
[virtual] |
|
void NL3D::CMeshMRMGeom::compileRunTime |
( |
|
) |
[private] |
|
|
Definition at line 2475 of file mesh_mrm.cpp.
References _BBox, _Lods, _MeshVertexProgram, _PreciseClipping, _Skinned, _SupportSkinGrouping, _VBufferFinal, NLMISC::CAABBoxExt::getRadius, NL3D_MESH_PRECISE_CLIP_THRESHOLD, NL3D_MESH_SKIN_MANAGER_MAXVERTICES, and NL3D_MESH_SKIN_MANAGER_VERTEXFORMAT.
Referenced by build. |
|
If the mesh is skinned, still use normal CVertexBuffer.
Doens't use VBuffer hard when Skinned, for AGP memory optimisation. See renderSkin() note. It's because most of the MRM skins are rendered through renderSkinGroup*() methods, which use a global VBHard NB: meshs which are skinned but not skin applied are not optimized too. But this case is not a "realtime" game situation
Also, if the driver has slow VBhard unlock() (ie ATI gl extension), avoid use of them if MeshMorpher is used.
Definition at line 2282 of file mesh_mrm.cpp.
References _BoneIdComputed, _BoneIdExtended, _BonesId, _BonesIdExt, _BonesName, _Lods, _SkinWeights, matrix, NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, and nlwarning. |
void NL3D::CMeshMRMGeom::deleteVertexBufferHard |
( |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::dirtMeshDataId |
( |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::fillAGPSkinPartWithVBHardPtr |
( |
CLod & |
lod, |
|
|
uint8 * |
vertexDst |
|
) |
[private] |
|
const std::vector<std::string>& NL3D::CMeshMRMGeom::getBonesName |
( |
|
) |
const [inline] |
|
const std::vector<CMRMWedgeGeom>& NL3D::CMeshMRMGeom::getGeomorphs |
( |
uint |
lodId |
) |
const [inline] |
|
|
Advanced. get the geomorphs for a special lod.
Definition at line 212 of file mesh_mrm.h.
References _Lods. |
const CMRMLevelDetail& NL3D::CMeshMRMGeom::getLevelDetail |
( |
|
) |
const [inline] |
|
uint NL3D::CMeshMRMGeom::getNbLod |
( |
|
) |
const [inline] |
|
uint NL3D::CMeshMRMGeom::getNbLodLoaded |
( |
|
) |
const [inline] |
|
uint NL3D::CMeshMRMGeom::getNbRdrPass |
( |
uint |
lodId |
) |
const [inline] |
|
uint NL3D::CMeshMRMGeom::getNumRdrPasses |
( |
|
) |
const [virtual] |
|
float NL3D::CMeshMRMGeom::getNumTriangles |
( |
float |
distance |
) |
[virtual] |
|
uint32 NL3D::CMeshMRMGeom::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 205 of file mesh_mrm.h.
References _Lods. |
const CPrimitiveBlock& NL3D::CMeshMRMGeom::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 195 of file mesh_mrm.h.
References _Lods. |
const std::vector<sint32>& NL3D::CMeshMRMGeom::getSkinBoneUsage |
( |
|
) |
const [inline] |
|
|
return array of bones used by the skin. computeBonesId must has been called before.
Definition at line 236 of file mesh_mrm.h.
References _BonesId. |
const std::vector<CMesh::CSkinWeight>& NL3D::CMeshMRMGeom::getSkinWeights |
( |
|
) |
const [inline] |
|
const CVertexBuffer& NL3D::CMeshMRMGeom::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 172 of file mesh_mrm.h.
References _VBufferFinal. |
bool NL3D::CMeshMRMGeom::isSkinned |
( |
|
) |
const [inline] |
|
|
Return true if the mesh is skinned, else return false.
Definition at line 224 of file mesh_mrm.h.
References _Skinned. |
|
Load next lod of a stream.
use getNbLodLoaded() to know what Lod will be loaded. NB: if getNbLodLoaded() == getNbLod(), no op. -
Parameters:
-
f |
the same input stream passed to loadFirstLod(). NB: after load, f.getPos() is "unedfined" (actually return the position of the next lod in the stream). |
Definition at line 1990 of file mesh_mrm.cpp.
References _LodInfos, _Lods, _NbLodLoaded, _VertexBufferHardDirty, getNbLod, getNbLodLoaded, NLMISC::IStream::seek, NLMISC::IStream::serial, and serialLodVertexData. |
NL3D::CMeshMRMGeom::NLMISC_DECLARE_CLASS |
( |
CMeshMRMGeom |
|
) |
|
|
void NL3D::CMeshMRMGeom::render |
( |
IDriver * |
drv, |
|
|
CTransformShape * |
trans, |
|
|
float |
polygonCount, |
|
|
uint32 |
rdrFlags, |
|
|
float |
globalAlpha |
|
) |
[virtual] |
|
|
render() this mesh in a driver, given an instance and his materials.
Implements NL3D::IMeshGeom.
Definition at line 921 of file mesh_mrm.cpp.
References _LevelDetail, _Lods, _MeshMorpher, _MeshVertexProgram, _OriginalSkinNormals, _OriginalSkinVertices, _OriginalTGSpace, _Skinned, _VBHard, _VBufferFinal, _VBufferOriginal, applyGeomorph, chooseLod, CLod, H_AUTO, nlassert, NL3D::OptFastFloor, restoreOriginalSkinPart, and updateVertexBufferHard. |
|
The framework call this method to render the current renderPass, with the current instance NB: if the material is blended, DON'T render it!!
Implements NL3D::IMeshGeom.
Definition at line 2527 of file mesh_mrm.cpp. |
void NL3D::CMeshMRMGeom::renderSkin |
( |
CTransformShape * |
trans, |
|
|
float |
alphaMRM |
|
) |
[virtual] |
|
|
render() this mesh as a skin.
Implements NL3D::IMeshGeom.
Definition at line 1140 of file mesh_mrm.cpp.
References _Lods, _MeshMorpher, _MeshVertexProgram, _OriginalSkinNormals, _OriginalSkinVertices, _OriginalTGSpace, _Skinned, _VBufferFinal, _VBufferOriginal, applyGeomorph, applyRawSkinWithNormal, applyRawSkinWithNormalSSE, applySkin, applySkinWithNormal, applySkinWithNormalSSE, applySkinWithTangentSpace, applySkinWithTangentSpaceSSE, chooseLod, CLod, H_AUTO_USE, nlassert, and updateRawSkinNormal. |
|
Definition at line 1337 of file mesh_mrm.cpp.
References _LastLodComputed, _Lods, _MeshMorpher, _OriginalSkinNormals, _OriginalSkinVertices, _Skinned, _VBufferFinal, _VBufferOriginal, applyGeomorphWithVBHardPtr, applyRawSkinWithNormal, applyRawSkinWithNormalSSE, applySkinWithNormal, applySkinWithNormalSSE, chooseLod, CLod, fillAGPSkinPartWithVBHardPtr, H_AUTO_USE, nlassert, and updateRawSkinNormal. |
void NL3D::CMeshMRMGeom::restoreOriginalSkinPart |
( |
CLod & |
lod, |
|
|
IVertexBufferHard * |
currentVBHard |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::restoreOriginalSkinVertices |
( |
|
) |
[private] |
|
bool NL3D::CMeshMRMGeom::sortPerMaterial |
( |
|
) |
const [virtual] |
|
bool NL3D::CMeshMRMGeom::supportMeshBlockRendering |
( |
|
) |
const [virtual] |
|
|
true if this meshGeom support meshBlock rendering.
return false if skinned/meshMorphed.
Implements NL3D::IMeshGeom.
Definition at line 2502 of file mesh_mrm.cpp. |
bool NL3D::CMeshMRMGeom::supportSkinGrouping |
( |
|
) |
const |
|
void NL3D::CMeshMRMGeom::updateRawSkinNormal |
( |
bool |
enabled, |
|
|
CMeshMRMInstance * |
mi, |
|
|
sint |
curLodId |
|
) |
[private] |
|
void NL3D::CMeshMRMGeom::updateSkeletonUsage |
( |
CSkeletonModel * |
sm, |
|
|
bool |
increment |
|
) |
|
|
|
update Skeleton Usage. increment or decrement. computeBonesId must has been called before.
Definition at line 2456 of file mesh_mrm.cpp.
References _BonesIdExt, and nlerror. |
void NL3D::CMeshMRMGeom::updateVertexBufferHard |
( |
IDriver * |
drv, |
|
|
uint32 |
numVertices |
|
) |
[private] |
|
Friends And Related Function Documentation
friend class CLod [friend]
|
|
friend class CMRMBuilder [friend]
|
|
Member Data Documentation
bool NL3D::CMeshMRMGeom::_BoneIdComputed [private]
|
|
bool NL3D::CMeshMRMGeom::_BoneIdExtended [private]
|
|
std::vector<sint32> NL3D::CMeshMRMGeom::_BonesId [private]
|
|
std::vector<sint32> NL3D::CMeshMRMGeom::_BonesIdExt [private]
|
|
std::vector<std::string> NL3D::CMeshMRMGeom::_BonesName [private]
|
|
CRefPtr<IDriver> NL3D::CMeshMRMGeom::_Driver [private]
|
|
uint8 NL3D::CMeshMRMGeom::_LastLodComputed [private]
|
|
std::vector<CLodInfo> NL3D::CMeshMRMGeom::_LodInfos [private]
|
|
std::vector<CLod> NL3D::CMeshMRMGeom::_Lods [private]
|
|
|
List of Lods.
Definition at line 450 of file mesh_mrm.h.
Referenced by applyMaterialRemap, build, chooseLod, compileRunTime, computeBonesId, getGeomorphs, getNbLod, getNbRdrPass, getRdrPassMaterial, getRdrPassPrimitiveBlock, loadFirstLod, loadNextLod, render, renderSkin, renderSkinGroupGeom, renderSkinGroupPrimitives, unloadNextLod, updateRawSkinNormal, and updateShiftedTriangleCache. |
uint NL3D::CMeshMRMGeom::_MeshDataId [private]
|
|
uint NL3D::CMeshMRMGeom::_NbLodLoaded [private]
|
|
std::vector<CVector> NL3D::CMeshMRMGeom::_OriginalSkinNormals [private]
|
|
std::vector<CVector> NL3D::CMeshMRMGeom::_OriginalSkinVertices [private]
|
|
std::vector<CVector> NL3D::CMeshMRMGeom::_OriginalTGSpace [private]
|
|
bool NL3D::CMeshMRMGeom::_PreciseClipping [private]
|
|
bool NL3D::CMeshMRMGeom::_Skinned [private]
|
|
|
Skinning: This tells if the mesh is correctly skinned (suuport skinning).
Definition at line 417 of file mesh_mrm.h.
Referenced by applySkin, bkupOriginalSkinVertices, bkupOriginalSkinVerticesSubset, build, CMeshMRMGeom, compileRunTime, isSkinned, render, renderSkin, renderSkinGroupGeom, restoreOriginalSkinPart, restoreOriginalSkinVertices, and updateVertexBufferHard. |
bool NL3D::CMeshMRMGeom::_SupportSkinGrouping [private]
|
|
|
The Final VBuffer.
Definition at line 426 of file mesh_mrm.h.
Referenced by applyGeomorph, applyGeomorphWithVBHardPtr, applySkin, bkupOriginalSkinVertices, bkupOriginalSkinVerticesSubset, build, compileRunTime, getVertexBuffer, render, renderSkin, renderSkinGroupGeom, restoreOriginalSkinPart, restoreOriginalSkinVertices, serialLodVertexData, and updateVertexBufferHard. |
bool NL3D::CMeshMRMGeom::_VertexBufferHardDirty [private]
|
|
The documentation for this class was generated from the following files:
|
|