An MRM mesh geometry, with no materials information. More...
#include <mesh_mrm.h>
Inherits NL3D::IMeshGeom.
Classes | |
| class | CLod |
| A LOD of the MRM. More... | |
| class | CLodInfo |
| A LOD of the MRM. More... | |
| struct | CMeshBuildMRM |
| A mesh information. More... | |
| class | CRdrPass |
| A block of primitives, sorted by material use. More... | |
| struct | CVertexBlock |
| A block of vertices descriptor. More... | |
Public Member Functions | |
| CMeshMRMGeom () | |
| Constructor. | |
| ~CMeshMRMGeom () | |
| void | build (CMesh::CMeshBuild &m, std::vector< CMesh::CMeshBuild * > &bsList, uint numMaxMaterial, const CMRMParameters ¶ms=CMRMParameters()) |
| Build a mesh, replacing old. | |
| void | applyMaterialRemap (const std::vector< sint > &remap) |
| change materials Ids (called from CMesh::optimizeMaterialUsage()) | |
| void | changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest) |
| Change MRM Distance setup. | |
| const CMRMLevelDetail & | getLevelDetail () const |
| get the MRM level detail information | |
| virtual bool | hasMeshVertexProgram () const |
| True if this mesh has a vertexProgram. | |
From IMeshGeom | |
| virtual void | initInstance (CMeshBaseInstance *mbi) |
| Init instance info. | |
| virtual bool | clip (const std::vector< CPlane > &pyramid, const CMatrix &worldMatrix) |
| clip this mesh in a driver. true if visible. | |
| 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. | |
| virtual void | renderSkin (CTransformShape *trans, float alphaMRM) |
| render() this mesh as a skin | |
| virtual float | getNumTriangles (float distance) |
| get an approximation of the number of triangles this instance will render for a fixed distance. | |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serial this meshGeom. | |
| NLMISC_DECLARE_CLASS (CMeshMRMGeom) | |
| void | profileSceneRender (CRenderTrav *rdrTrav, CTransformShape *trans, float polygonCount, uint32 rdrFlags) |
| Scene profile. | |
Lod management. | |
| uint | getNbLodLoaded () const |
| get the number of LOD currently loaded. | |
| void | loadFirstLod (NLMISC::IStream &f) |
| Load the header and the first lod of a MRM in a stream. | |
| void | loadNextLod (NLMISC::IStream &f) |
| Load next lod of a stream. | |
| void | unloadNextLod (NLMISC::IStream &f) |
| UnLoad Lod getNbLodLoaded()-1 from memory. | |
Geometry accessors | |
| const NLMISC::CAABBoxExt & | getBoundingBox () const |
| get the extended axis aligned bounding box of the mesh | |
| const CVertexBuffer & | getVertexBuffer () const |
| get the vertex buffer used by the mrm mesh. NB: this VB store all Vertices used by All LODs. | |
| const std::vector < CMesh::CSkinWeight > & | getSkinWeights () const |
| get the skinWeights used by the mrm mesh. NB: same size of the vertexBuffer. empty if !isSkinned() | |
| const std::vector< std::string > & | getBonesName () const |
| get the bone names of the meshMRM. | |
| uint | getNbLod () const |
| get the number of LOD. | |
| uint | getNbRdrPass (uint lodId) const |
| get the number of rendering pass of a LOD. | |
| const CIndexBuffer & | getRdrPassPrimitiveBlock (uint lodId, uint renderingPassIndex) const |
| get the primitive block associated with a rendering pass of a LOD. | |
| uint32 | getRdrPassMaterial (uint lodId, uint renderingPassIndex) const |
| get the material ID associated with a rendering pass of a LOD. | |
| const std::vector < CMRMWedgeGeom > & | getGeomorphs (uint lodId) const |
| Advanced. get the geomorphs for a special lod. | |
| uint | getNbBlendShapes () const |
| get the number of BlendShapes | |
| bool | buildGeometryForLod (uint lodId, std::vector< CVector > &vertices, std::vector< uint32 > &triangles) const |
| Build a geometry copy for the given Lod. | |
Skinning Behavior | |
| bool | isSkinned () const |
| Return true if the mesh is skinned, else return false. | |
| void | computeBonesId (CSkeletonModel *skeleton) |
| Compute skinning id. | |
| void | updateSkeletonUsage (CSkeletonModel *sm, bool increment) |
| update Skeleton Usage. increment or decrement. computeBonesId must has been called before. | |
| const std::vector< sint32 > & | getSkinBoneUsage () const |
| return array of bones used by the skin. computeBonesId must has been called before. | |
| const std::vector < NLMISC::CBSphere > & | getSkinBoneSphere () const |
| see CTransform::getSkinBoneSphere() doc for the meaning of this value. computeBonesId must has been called before. | |
| bool | getSkinBoneBBox (CSkeletonModel *skeleton, NLMISC::CAABBox &bbox, uint boneId) const |
| Called for edition purpose (slow O(NVertex) ). computeBonesId must has been called before. | |
Special SkinGrouping Rendering | |
| bool | supportSkinGrouping () const |
| sint | renderSkinGroupGeom (CMeshMRMInstance *mi, float alphaMRM, uint remainingVertices, uint8 *vbDest) |
| void | renderSkinGroupPrimitives (CMeshMRMInstance *mi, uint baseVertex, std::vector< CSkinSpecularRdrPass > &specularRdrPasses, uint skinIndex) |
| void | renderSkinGroupSpecularRdrPass (CMeshMRMInstance *mi, uint rdrPassId) |
Private Member Functions | |
| void | serialLodVertexData (NLMISC::IStream &f, uint startWedge, uint endWedge) |
| serial a subset of the vertices. | |
| sint | chooseLod (float alphaMRM, float &alphaLod) |
| choose the lod according to the alphaMRM [0,1] given. | |
| void | applyGeomorph (std::vector< CMRMWedgeGeom > &geoms, float alphaLod) |
| Apply the geomorph to the _VBuffer, or the VBhard, if exist/used. | |
| void | applyGeomorphWithVBHardPtr (std::vector< CMRMWedgeGeom > &geoms, float alphaLod, uint8 *vertexDestPtr) |
| Apply the geomorph to the VBhard ptr, if not NULL. | |
| void | applyGeomorphPosNormalUV0 (std::vector< CMRMWedgeGeom > &geoms, uint8 *vertexPtr, uint8 *vertexDestPtr, sint32 vertexSize, float a, float a1) |
| Faster, but common geomorph apply. | |
| void | bkupOriginalSkinVertices () |
| Skinning: bkup Vertex/Normal into _OriginalSkin* from VBuffer. | |
| void | bkupOriginalSkinVerticesSubset (uint wedgeStart, uint wedgeEnd) |
| void | restoreOriginalSkinVertices () |
| Skinning: restore Vertex/Normal from _OriginalSkin* to VBuffer. | |
| void | applySkin (CLod &lod, const CSkeletonModel *skeleton) |
| Skinning: Apply skinning to the _VBuffer (before geomorph). | |
| void | applySkinWithNormal (CLod &lod, const CSkeletonModel *skeleton) |
| The same as apply skin, but with normal modified. | |
| void | applyRawSkinWithNormal (CLod &lod, CRawSkinNormalCache &rawSkinLod, const CSkeletonModel *skeleton, uint8 *vbHard, float alphaLod) |
| 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). | |
| void | restoreOriginalSkinPart (CLod &lod) |
| Skinning: same as restoreOriginalSkinVertices(), but for one Lod only. | |
| sint | loadHeader (NLMISC::IStream &f) throw (NLMISC::EStream) |
| load the header of this mesh. return the version of the header. | |
| void | load (NLMISC::IStream &f) throw (NLMISC::EStream) |
| load this mesh. | |
| void | save (NLMISC::IStream &f) throw (NLMISC::EStream) |
| save the entire mesh. | |
| 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). | |
| std::vector< CVector > | _OriginalSkinVertices |
| Skinning: this is the list of vertices (mirror of VBuffer), at the bind Pos. | |
| std::vector< CVector > | _OriginalSkinNormals |
| std::vector< CVector > | _OriginalTGSpace |
| CVertexBuffer | _VBufferOriginal |
| The Original VBuffer. | |
| CVertexBuffer | _VBufferFinal |
| The Final VBuffer. | |
| std::vector< CMesh::CSkinWeight > | _SkinWeights |
| This is the array of SkinWeights, same size as the VB. | |
| bool | _BoneIdComputed |
| This boolean is true if the bones id have been passed in the skeleton. | |
| bool | _BoneIdExtended |
| true if the _BonesIdExt have been computed (for bone Usage). | |
| bool | _SupportSkinGrouping |
| if true, then maybe use faster render | |
| uint8 | _LastLodComputed |
| Last lod rendered. used with renderSkinGroup*() only. | |
| std::vector< std::string > | _BonesName |
| This array give the name of the local bones. | |
| std::vector< sint32 > | _BonesId |
| This array give the index in the skeleton of the local bones used. computed at first computeBoneId(). | |
| std::vector< sint32 > | _BonesIdExt |
| Same as _BonesId but with parent of bones added. (used for bone usage). | |
| std::vector< NLMISC::CBSphere > | _BonesSphere |
| see CTransform::getSkinBoneSphere() doc for the meaning of this value | |
| std::vector< CLod > | _Lods |
| List of Lods. | |
| NLMISC::CAABBoxExt | _BBox |
| For clipping. this is the BB of all vertices of all Lods. | |
| std::vector< CLodInfo > | _LodInfos |
| Info for pre-loading Lods. | |
| uint | _NbLodLoaded |
| bool | _PreciseClipping |
| NB: HERE FOR PACKING ONLY. For clipping. Estimate if we must do a Precise clipping (ie with bboxes). | |
| CMeshMorpher | _MeshMorpher |
| NLMISC::CSmartPtr < IMeshVertexProgram > | _MeshVertexProgram |
| CMRMLevelDetail | _LevelDetail |
| control. | |
Friends | |
| class | CMRMBuilder |
Structures for building a MRM mesh. | |
| class | CLod |
Mesh Block Render Implementation | |
|
| |
| bool | _SupportMeshBlockRendering |
| setuped at compileRunTime. | |
| bool | _MBRBkupNormalize |
| BeginMesh setup. | |
| sint | _MBRCurrentLodId |
| global setup at activateInstance() | |
| virtual bool | supportMeshBlockRendering () const |
| true if this meshGeom support meshBlock rendering. | |
| virtual bool | sortPerMaterial () const |
| true if the sort criterion must be by material. | |
| virtual uint | getNumRdrPassesForMesh () const |
| return the number of renderPasses for this mesh. | |
| virtual uint | getNumRdrPassesForInstance (CMeshBaseInstance *inst) const |
| return the number of renderPasses for this instance. | |
| virtual void | beginMesh (CMeshGeomRenderContext &rdrCtx) |
| The framework call this method when he will render instances of this meshGeom soon. | |
| virtual void | activeInstance (CMeshGeomRenderContext &rdrCtx, CMeshBaseInstance *inst, float polygonCount, void *vbDst) |
| The framework call this method any time a change of instance occurs. | |
| 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!! | |
| virtual void | endMesh (CMeshGeomRenderContext &rdrCtx) |
| The framework call this method when it has done with this meshGeom. | |
| virtual bool | getVBHeapInfo (uint &vertexFormat, uint &numVertices) |
| The framework call this method to know if the mesh can fit in VBHeap. | |
| virtual void | computeMeshVBHeap (void *dst, uint indexStart) |
| When the framework succes to allocate a VBHeap space, it call this method to fill this space and compute shifted Primitive block. | |
| virtual bool | isActiveInstanceNeedVBFill () const |
| 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. | |
ShadowMap Skin rendering | |
|
| |
| CShadowSkin | _ShadowSkin |
| bool | _SupportShadowSkinGrouping |
| void | setShadowMesh (const std::vector< CShadowVertex > &shadowVertices, const std::vector< uint32 > &triangles) |
| Setup the ShadowMesh. | |
| uint | getNumShadowSkinVertices () const |
| Get the num of shadow skin vertices. | |
| bool | supportShadowSkinGrouping () const |
| Render the ShadowSkin (SkinGroup like). | |
| sint | renderShadowSkinGeom (CMeshMRMInstance *mi, uint remainingVertices, uint8 *vbDest) |
| void | renderShadowSkinPrimitives (CMeshMRMInstance *mi, CMaterial &castMat, IDriver *drv, uint baseVertex) |
| bool | supportIntersectSkin () const |
| Special use of skinning to compute intersection of a ray with it. | |
| bool | intersectSkin (CMeshMRMInstance *mi, const CMatrix &toRaySpace, float &dist2D, float &distZ, bool computeDist2D) |
RawSkin optimisation. | |
|
| |
| uint | _MeshDataId |
| Each time the mesh is loaded/built, this increment. | |
| static uint | NumCacheVertexNormal1 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin1) |
| static uint | NumCacheVertexNormal2 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin2) |
| static uint | NumCacheVertexNormal3 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin3) |
| static 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. | |
| void | dirtMeshDataId () |
| Increment the refCount, so instances RawSkins are no longer valid. | |
| void | applyArrayRawSkinNormal1 (CRawVertexNormalSkin1 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint nInf) |
| void | applyArrayRawSkinNormal2 (CRawVertexNormalSkin2 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint nInf) |
| void | applyArrayRawSkinNormal3 (CRawVertexNormalSkin3 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint nInf) |
| void | applyArrayRawSkinNormal4 (CRawVertexNormalSkin4 *src, uint8 *destVertexPtr, CMatrix3x4 *boneMat3x4, uint nInf) |
An MRM mesh geometry, with no materials information.
To build a CMeshMRMGeom, you should:
NB: internally, build() use CMRMBuilder, a builder of MRM.
Definition at line 80 of file mesh_mrm.h.
| NL3D::CMeshMRMGeom::CMeshMRMGeom | ( | ) |
Constructor.
Definition at line 202 of file mesh_mrm.cpp.
References _BoneIdComputed, _BoneIdExtended, _MBRCurrentLodId, _MeshDataId, _NbLodLoaded, _PreciseClipping, _Skinned, _SupportMeshBlockRendering, _SupportShadowSkinGrouping, and _SupportSkinGrouping.
| NL3D::CMeshMRMGeom::~CMeshMRMGeom | ( | ) |
Definition at line 218 of file mesh_mrm.cpp.
| void NL3D::CMeshMRMGeom::activeInstance | ( | CMeshGeomRenderContext & | rdrCtx, | |
| CMeshBaseInstance * | inst, | |||
| float | polygonCount, | |||
| void * | vbDst | |||
| ) | [virtual] |
The framework call this method any time a change of instance occurs.
Implements NL3D::IMeshGeom.
Definition at line 2746 of file mesh_mrm.cpp.
References _LevelDetail, _Lods, _MBRCurrentLodId, applyGeomorph(), applyGeomorphWithVBHardPtr(), NL3D::CTransformShape::changeLightSetup(), chooseLod(), NL3D::CMeshGeomRenderContext::Driver, NL3D::CMRMLevelDetail::getLevelDetailFromPolyCount(), NL3D::CTransform::getWorldMatrix(), H_AUTO, NL3D::CMeshGeomRenderContext::RenderThroughVBHeap, NL3D::CMeshGeomRenderContext::RenderTrav, and NL3D::IDriver::setupModelMatrix().
| void NL3D::CMeshMRMGeom::applyArrayRawSkinNormal1 | ( | CRawVertexNormalSkin1 * | src, | |
| uint8 * | destVertexPtr, | |||
| CMatrix3x4 * | boneMat3x4, | |||
| uint | nInf | |||
| ) | [private] |
Definition at line 865 of file mesh_mrm_skin.cpp.
| void NL3D::CMeshMRMGeom::applyArrayRawSkinNormal2 | ( | CRawVertexNormalSkin2 * | src, | |
| uint8 * | destVertexPtr, | |||
| CMatrix3x4 * | boneMat3x4, | |||
| uint | nInf | |||
| ) | [private] |
Definition at line 1044 of file mesh_mrm_skin.cpp.
| void NL3D::CMeshMRMGeom::applyArrayRawSkinNormal3 | ( | CRawVertexNormalSkin3 * | src, | |
| uint8 * | destVertexPtr, | |||
| CMatrix3x4 * | boneMat3x4, | |||
| uint | nInf | |||
| ) | [private] |
Definition at line 1347 of file mesh_mrm_skin.cpp.
| void NL3D::CMeshMRMGeom::applyArrayRawSkinNormal4 | ( | CRawVertexNormalSkin4 * | src, | |
| uint8 * | destVertexPtr, | |||
| CMatrix3x4 * | boneMat3x4, | |||
| uint | nInf | |||
| ) | [private] |
Definition at line 1741 of file mesh_mrm_skin.cpp.
| void NL3D::CMeshMRMGeom::applyGeomorph | ( | std::vector< CMRMWedgeGeom > & | geoms, | |
| float | alphaLod | |||
| ) | [private] |
Apply the geomorph to the _VBuffer, or the VBhard, if exist/used.
Definition at line 469 of file mesh_mrm.cpp.
References applyGeomorphWithVBHardPtr().
Referenced by activeInstance(), render(), and renderSkin().
| void NL3D::CMeshMRMGeom::applyGeomorphPosNormalUV0 | ( | std::vector< CMRMWedgeGeom > & | geoms, | |
| uint8 * | vertexPtr, | |||
| uint8 * | vertexDestPtr, | |||
| sint32 | vertexSize, | |||
| float | a, | |||
| float | a1 | |||
| ) | [private] |
Faster, but common geomorph apply.
Definition at line 797 of file mesh_mrm.cpp.
References nlassert.
Referenced by applyGeomorphWithVBHardPtr().
| void NL3D::CMeshMRMGeom::applyGeomorphWithVBHardPtr | ( | std::vector< CMRMWedgeGeom > & | geoms, | |
| float | alphaLod, | |||
| uint8 * | vertexDestPtr | |||
| ) | [private] |
Apply the geomorph to the VBhard ptr, if not NULL.
Definition at line 476 of file mesh_mrm.cpp.
References _VBufferFinal, applyGeomorphPosNormalUV0(), NLMISC::CRGBA::blendFromui(), NLMISC::clamp(), NL3D::CVertexBuffer::Float2, NL3D::CVertexBuffer::Float3, NL3D::CVertexBuffer::getColorOff(), NL3D::CVertexBuffer::getNormalOff(), NL3D::CVertexBuffer::getSpecularOff(), NL3D::CVertexBuffer::getTexCoordOff(), NL3D::CVertexBuffer::getValueType(), NL3D::CVertexBufferReadWrite::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CVertexBuffer::lock(), NL3D::CVertexBuffer::MaxStage, nlassert, NL3D::CVertexBuffer::NormalFlag, NL3D::CVertexBuffer::PositionFlag, NL3D::CVertexBuffer::PrimaryColorFlag, NL3D::CVertexBuffer::SecondaryColorFlag, NL3D::CMRMWedgeGeom::Start, NL3D::CVertexBuffer::TexCoord0, and NL3D::CVertexBuffer::TexCoord0Flag.
Referenced by activeInstance(), and applyGeomorph().
| void NL3D::CMeshMRMGeom::applyMaterialRemap | ( | const std::vector< sint > & | remap | ) |
change materials Ids (called from CMesh::optimizeMaterialUsage())
Definition at line 454 of file mesh_mrm.cpp.
References _Lods, getNbLod(), getNbRdrPass(), and nlassert.
Referenced by NL3D::CMeshMRM::optimizeMaterialUsage().
| void NL3D::CMeshMRMGeom::applyRawSkinWithNormal | ( | CLod & | lod, | |
| CRawSkinNormalCache & | rawSkinLod, | |||
| const CSkeletonModel * | skeleton, | |||
| uint8 * | vbHard, | |||
| float | alphaLod | |||
| ) | [private] |
Definition at line 1795 of file mesh_mrm_skin.cpp.
Referenced by renderSkinGroupGeom().
| void NL3D::CMeshMRMGeom::applySkin | ( | CLod & | lod, | |
| const CSkeletonModel * | skeleton | |||
| ) | [private] |
Skinning: Apply skinning to the _VBuffer (before geomorph).
Definition at line 176 of file mesh_mrm_skin.cpp.
References _OriginalSkinVertices, _Skinned, _SkinWeights, _VBufferFinal, NL3D::computeBoneMatrixes3x4(), NL3D::CVertexBufferReadWrite::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CMeshMRMGeom::CLod::InfluencedVertices, NL3D::CVertexBuffer::lock(), NL3D::CMesh::CSkinWeight::MatrixId, NL3D::CMeshMRMGeom::CLod::MatrixInfluences, NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, NL3D::CVertexBuffer::PositionFlag, and NL3D::CMesh::CSkinWeight::Weights.
Referenced by renderSkin().
| void NL3D::CMeshMRMGeom::applySkinWithNormal | ( | CLod & | lod, | |
| const CSkeletonModel * | skeleton | |||
| ) | [private] |
The same as apply skin, but with normal modified.
Normal is not normalized. 4 versions from slower to faster.
Definition at line 707 of file mesh_mrm_skin.cpp.
Referenced by renderSkin().
| 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 772 of file mesh_mrm_skin.cpp.
Referenced by renderSkin().
| void NL3D::CMeshMRMGeom::beginMesh | ( | CMeshGeomRenderContext & | rdrCtx | ) | [virtual] |
The framework call this method when he will render instances of this meshGeom soon.
Implements NL3D::IMeshGeom.
Definition at line 2723 of file mesh_mrm.cpp.
References _Lods, _MBRBkupNormalize, _VBufferFinal, NL3D::IDriver::activeVertexBuffer(), NL3D::CMeshGeomRenderContext::Driver, NL3D::IDriver::forceNormalize(), NL3D::IDriver::isForceNormalize(), and NL3D::CMeshGeomRenderContext::RenderThroughVBHeap.
| void NL3D::CMeshMRMGeom::bkupOriginalSkinVertices | ( | ) | [private] |
Skinning: bkup Vertex/Normal into _OriginalSkin* from VBuffer.
Definition at line 2030 of file mesh_mrm.cpp.
References _Skinned, _VBufferFinal, bkupOriginalSkinVerticesSubset(), NL3D::CVertexBuffer::getNumVertices(), and nlassert.
Referenced by build().
| void NL3D::CMeshMRMGeom::bkupOriginalSkinVerticesSubset | ( | uint | wedgeStart, | |
| uint | wedgeEnd | |||
| ) | [private] |
Definition at line 2040 of file mesh_mrm.cpp.
References _MeshVertexProgram, _OriginalSkinNormals, _OriginalSkinVertices, _OriginalTGSpace, _Skinned, _VBufferFinal, NL3D::CVertexBufferReadWrite::getNormalCoordPointer(), NL3D::CVertexBuffer::getNumTexCoordUsed(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBufferReadWrite::getTexCoordPointer(), NL3D::CVertexBufferReadWrite::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::lock(), nlassert, NL3D::CVertexBuffer::NormalFlag, and NL3D::CVertexBuffer::PositionFlag.
Referenced by bkupOriginalSkinVertices(), and serialLodVertexData().
| void NL3D::CMeshMRMGeom::build | ( | CMesh::CMeshBuild & | m, | |
| std::vector< CMesh::CMeshBuild * > & | bsList, | |||
| uint | numMaxMaterial, | |||
| const CMRMParameters & | params = CMRMParameters() | |||
| ) |
Build a mesh, replacing old.
this is much slower than CMeshGeom::build(), because it computes the MRM.
| params | parameters of the MRM build process. |
0. First, make bbox.
1. Launch 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, bkupOriginalSkinVertices(), NL3D::CMeshMRMGeom::CMeshBuildMRM::BlendShapes, NL3D::CMeshMorpher::BlendShapes, NL3D::CMesh::CMeshBuild::BonesNames, NL3D::CMRMLevelDetail::compileDistanceSetup(), NL3D::CMRMBuilder::compileMRM(), compileRunTime(), dirtMeshDataId(), NL3D::CMeshMRMGeom::CMeshBuildMRM::DistanceCoarsest, NL3D::CMRMLevelDetail::DistanceCoarsest, NL3D::CMeshMRMGeom::CMeshBuildMRM::DistanceFinest, NL3D::CMRMLevelDetail::DistanceFinest, NL3D::CMeshMRMGeom::CMeshBuildMRM::DistanceMiddle, NL3D::CMRMLevelDetail::DistanceMiddle, NL3D::CMesh::CMeshBuild::Faces, NL3D::CIndexBuffer::getNumIndexes(), NL3D::CMeshMRMGeom::CMeshBuildMRM::Lods, NL3D::makeBBox(), NL3D::CMRMLevelDetail::MaxFaceUsed, NL3D::CMesh::CMeshBuild::MeshVertexProgram, NL3D::CMRMLevelDetail::MinFaceUsed, NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, NLMISC::CVector::Null, NL3D::CMeshMRMGeom::CRdrPass::PBlock, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::CVertexBuffer::reserve(), NLMISC::CAABBoxExt::setCenter(), NL3D::CVertexBuffer::setNumVertices(), NLMISC::CAABBoxExt::setSize(), NL3D::CMeshMRMGeom::CMeshBuildMRM::Skinned, NL3D::CMeshMRMGeom::CMeshBuildMRM::SkinWeights, NL3D::CMeshMRMGeom::CMeshBuildMRM::VBuffer, and NL3D::CMesh::CMeshBuild::Vertices.
Referenced by NL3D::CMeshMRM::build().
| void NL3D::CMeshMRMGeom::buildBoneUsageVer2 | ( | ) | [private] |
Definition at line 2364 of file mesh_mrm.cpp.
References _BonesId, _Skinned, _SkinWeights, and NL3D_MESH_SKINNING_MAX_MATRIX.
Referenced by loadFirstLod().
| bool NL3D::CMeshMRMGeom::buildGeometryForLod | ( | uint | lodId, | |
| std::vector< CVector > & | vertices, | |||
| std::vector< uint32 > & | triangles | |||
| ) | const |
Build a geometry copy for the given Lod.
The VBuffer/IndexBuffer must not be resident. false if bad lodId The process ensure there is no hole in the resulting vertices array. Hence VB num Verts != vertices.size().
Definition at line 2538 of file mesh_mrm.cpp.
References _Lods, _VBufferFinal, NL3D::CIndexBufferRead::getFormat(), getGeomorphs(), getNbRdrPass(), NL3D::CIndexBuffer::getNumIndexes(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CIndexBufferRead::getPtr(), getRdrPassPrimitiveBlock(), NL3D::CVertexBufferRead::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CIndexBuffer::isResident(), NL3D::CVertexBuffer::isResident(), NL3D::CVertexBuffer::lock(), NL3D::CIndexBuffer::lock(), NLMISC::n, NL_MESH_MRM_INDEX_FORMAT, and nlassert.
Referenced by NL3D::CMeshMultiLod::buildSystemGeometry(), and NL3D::CMeshMRM::buildSystemGeometry().
| 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.
| 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, NL3D::CMRMLevelDetail::compileDistanceSetup(), NL3D::CMRMLevelDetail::DistanceCoarsest, NL3D::CMRMLevelDetail::DistanceFinest, and NL3D::CMRMLevelDetail::DistanceMiddle.
Referenced by NL3D::CMeshMultiLod::changeMRMDistanceSetup(), and NL3D::CMeshMRM::changeMRMDistanceSetup().
choose the lod according to the alphaMRM [0,1] given.
Definition at line 878 of file mesh_mrm.cpp.
References _Lods, and _NbLodLoaded.
Referenced by activeInstance(), profileSceneRender(), render(), renderSkin(), and renderSkinGroupGeom().
| bool NL3D::CMeshMRMGeom::clip | ( | const std::vector< CPlane > & | pyramid, | |
| const CMatrix & | worldMatrix | |||
| ) | [virtual] |
clip this mesh in a driver. true if visible.
Reimplemented from NL3D::IMeshGeom.
Definition at line 836 of file mesh_mrm.cpp.
References _BBox, _PreciseClipping, NLMISC::CAABBoxExt::clipBack(), NLMISC::CAABBoxExt::getCenter(), NLMISC::CAABBoxExt::getRadius(), and NLMISC::CPlane::normalize().
Referenced by NL3D::CMeshMRM::clip().
| void NL3D::CMeshMRMGeom::compileRunTime | ( | ) | [private] |
Definition at line 2436 of file mesh_mrm.cpp.
References _BBox, _Lods, _MeshMorpher, _MeshVertexProgram, _PreciseClipping, _ShadowSkin, _Skinned, _SupportMeshBlockRendering, _SupportShadowSkinGrouping, _SupportSkinGrouping, _VBufferFinal, NL3D::CMeshMorpher::BlendShapes, NL3D::CVertexBuffer::getNumVertices(), NLMISC::CAABBoxExt::getRadius(), NL3D::CVertexBuffer::getVertexFormat(), NL3D_MESH_PRECISE_CLIP_THRESHOLD, NL3D_MESH_SKIN_MANAGER_MAXVERTICES, NL3D_MESH_SKIN_MANAGER_VERTEXFORMAT, NL3D_SHADOW_MESH_SKIN_MANAGER_MAXVERTICES, NL3D_SHADOW_MESH_SKIN_MANAGER_VERTEXFORMAT, NL3D::CVertexBuffer::PositionFlag, and NL3D::CShadowSkin::Vertices.
Referenced by build().
| void NL3D::CMeshMRMGeom::computeBonesId | ( | CSkeletonModel * | skeleton | ) |
Compute skinning id.
Definition at line 2202 of file mesh_mrm.cpp.
References _BoneIdComputed, _BoneIdExtended, _BonesId, _BonesIdExt, _BonesName, _BonesSphere, _Lods, _OriginalSkinVertices, _ShadowSkin, _SkinWeights, NL3D::CSkeletonModel::Bones, NL3D::CSkeletonModel::flagBoneAndParents(), NL3D::CShadowVertex::MatrixId, NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, NL3D::CSkeletonModel::remapSkinBones(), and NL3D::CShadowSkin::Vertices.
Referenced by NL3D::CMeshMRM::computeBonesId().
| void NL3D::CMeshMRMGeom::computeMeshVBHeap | ( | void * | , | |
| uint | ||||
| ) | [virtual] |
When the framework succes to allocate a VBHeap space, it call this method to fill this space and compute shifted Primitive block.
| the | dest VertexBuffer. NB: start to fill at dst[0] | |
| indexStart | used to shift primitive block. |
Reimplemented from NL3D::IMeshGeom.
Definition at line 2825 of file mesh_mrm.cpp.
References _Lods, _VBufferFinal, NL3D::CIndexBufferRead::getFormat(), NL3D::CIndexBufferReadWrite::getIndexNumBytes(), NL3D::CIndexBufferRead::getIndexNumBytes(), NL3D::CIndexBuffer::getNumIndexes(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CIndexBufferReadWrite::getPtr(), NL3D::CIndexBufferRead::getPtr(), NL3D::CVertexBufferRead::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CIndexBuffer::Indices32, NL3D::CIndexBuffer::lock(), NL3D::CVertexBuffer::lock(), nlassert, NL3D::CMeshMRMGeom::CLod::RdrPass, and NL3D::CIndexBuffer::setNumIndexes().
| void NL3D::CMeshMRMGeom::dirtMeshDataId | ( | ) | [private] |
Increment the refCount, so instances RawSkins are no longer valid.
Definition at line 3088 of file mesh_mrm.cpp.
References _MeshDataId.
Referenced by build().
| void NL3D::CMeshMRMGeom::endMesh | ( | CMeshGeomRenderContext & | rdrCtx | ) | [virtual] |
The framework call this method when it has done with this meshGeom.
Implements NL3D::IMeshGeom.
Definition at line 2805 of file mesh_mrm.cpp.
References _Lods, _MBRBkupNormalize, NL3D::CMeshGeomRenderContext::Driver, and NL3D::IDriver::forceNormalize().
| const std::vector<std::string>& NL3D::CMeshMRMGeom::getBonesName | ( | ) | const [inline] |
get the bone names of the meshMRM.
Definition at line 181 of file mesh_mrm.h.
References _BonesName.
| const NLMISC::CAABBoxExt& NL3D::CMeshMRMGeom::getBoundingBox | ( | ) | const [inline, virtual] |
get the extended axis aligned bounding box of the mesh
Implements NL3D::IMeshGeom.
Definition at line 169 of file mesh_mrm.h.
References _BBox.
Referenced by NL3D::CMeshMRM::getBoundingBox().
| const std::vector<CMRMWedgeGeom>& NL3D::CMeshMRMGeom::getGeomorphs | ( | uint | lodId | ) | const [inline] |
Advanced. get the geomorphs for a special lod.
Definition at line 215 of file mesh_mrm.h.
References _Lods.
Referenced by buildGeometryForLod().
| const CMRMLevelDetail& NL3D::CMeshMRMGeom::getLevelDetail | ( | ) | const [inline] |
get the MRM level detail information
Definition at line 282 of file mesh_mrm.h.
References _LevelDetail.
Referenced by NL3D::CMeshMRMInstance::getMRMLevelDetail().
| uint NL3D::CMeshMRMGeom::getNbBlendShapes | ( | ) | const [inline] |
get the number of BlendShapes
Definition at line 221 of file mesh_mrm.h.
References _MeshMorpher, and NL3D::CMeshMorpher::BlendShapes.
| uint NL3D::CMeshMRMGeom::getNbLod | ( | ) | const [inline] |
get the number of LOD.
Definition at line 185 of file mesh_mrm.h.
References _Lods.
Referenced by applyMaterialRemap(), NL3D::CMeshMRM::getNbLod(), and loadNextLod().
| uint NL3D::CMeshMRMGeom::getNbLodLoaded | ( | ) | const [inline] |
get the number of LOD currently loaded.
Definition at line 139 of file mesh_mrm.h.
References _NbLodLoaded.
Referenced by NL3D::CMeshMultiLod::buildSystemGeometry(), NL3D::CMeshMRM::buildSystemGeometry(), loadNextLod(), and unloadNextLod().
get the number of rendering pass of a LOD.
| lodId | the id of the LOD. |
Definition at line 191 of file mesh_mrm.h.
References _Lods.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), applyMaterialRemap(), NL3D::CShapeInfo::build(), buildGeometryForLod(), and NL3D::CMeshMRM::getNbRdrPass().
| uint NL3D::CMeshMRMGeom::getNumRdrPassesForInstance | ( | CMeshBaseInstance * | inst | ) | const [virtual] |
return the number of renderPasses for this instance.
Called after activateInstance() Used only if sortPerMaterial()) is false
Implements NL3D::IMeshGeom.
Definition at line 2718 of file mesh_mrm.cpp.
References _Lods, and _MBRCurrentLodId.
| uint NL3D::CMeshMRMGeom::getNumRdrPassesForMesh | ( | ) | const [virtual] |
return the number of renderPasses for this mesh.
Used only if sortPerMaterial()) is true
Implements NL3D::IMeshGeom.
Definition at line 2711 of file mesh_mrm.cpp.
| uint NL3D::CMeshMRMGeom::getNumShadowSkinVertices | ( | ) | const |
Get the num of shadow skin vertices.
Definition at line 3432 of file mesh_mrm.cpp.
References _ShadowSkin, and NL3D::CShadowSkin::Vertices.
get an approximation of the number of triangles this instance will render for a fixed distance.
Implements NL3D::IMeshGeom.
Definition at line 2193 of file mesh_mrm.cpp.
References _LevelDetail, and NL3D::CMRMLevelDetail::getNumTriangles().
Referenced by NL3D::CMeshMRM::getNumTriangles().
| uint32 NL3D::CMeshMRMGeom::getRdrPassMaterial | ( | uint | lodId, | |
| uint | renderingPassIndex | |||
| ) | const [inline] |
get the material ID associated with a rendering pass of a LOD.
| lodId | the id of the LOD. | |
| renderingPassIndex | the index of the rendering pass in the matrix block |
Definition at line 208 of file mesh_mrm.h.
References _Lods.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CShapeInfo::build(), and NL3D::CMeshMRM::getRdrPassMaterial().
| const CIndexBuffer& NL3D::CMeshMRMGeom::getRdrPassPrimitiveBlock | ( | uint | lodId, | |
| uint | renderingPassIndex | |||
| ) | const [inline] |
get the primitive block associated with a rendering pass of a LOD.
| lodId | the id of the LOD. | |
| renderingPassIndex | the index of the rendering pass |
Definition at line 198 of file mesh_mrm.h.
References _Lods.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CShapeInfo::build(), buildGeometryForLod(), and NL3D::CMeshMRM::getRdrPassPrimitiveBlock().
| bool NL3D::CMeshMRMGeom::getSkinBoneBBox | ( | CSkeletonModel * | skeleton, | |
| NLMISC::CAABBox & | bbox, | |||
| uint | boneId | |||
| ) | const |
Called for edition purpose (slow O(NVertex) ). computeBonesId must has been called before.
Definition at line 3532 of file mesh_mrm.cpp.
References _Lods, _OriginalSkinVertices, _SkinWeights, NL3D::CSkeletonModel::Bones, NLMISC::CAABBox::extend(), NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, NLMISC::CVector::Null, NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize().
Referenced by NL3D::CMeshMRMInstance::getSkinBoneBBox().
| const std::vector<NLMISC::CBSphere>& NL3D::CMeshMRMGeom::getSkinBoneSphere | ( | ) | const [inline] |
see CTransform::getSkinBoneSphere() doc for the meaning of this value. computeBonesId must has been called before.
Definition at line 250 of file mesh_mrm.h.
References _BonesSphere.
Referenced by NL3D::CMeshMRMInstance::getSkinBoneSphere().
| 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 247 of file mesh_mrm.h.
References _BonesId.
Referenced by NL3D::CMeshMRMInstance::getSkinBoneUsage().
| const std::vector<CMesh::CSkinWeight>& NL3D::CMeshMRMGeom::getSkinWeights | ( | ) | const [inline] |
get the skinWeights used by the mrm mesh. NB: same size of the vertexBuffer. empty if !isSkinned()
Definition at line 178 of file mesh_mrm.h.
References _SkinWeights.
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 from NL3D::IMeshGeom.
Definition at line 2816 of file mesh_mrm.cpp.
References _SupportMeshBlockRendering, _VBufferFinal, NL3D::CVertexBuffer::getNumVertices(), and NL3D::CVertexBuffer::getVertexFormat().
| 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 175 of file mesh_mrm.h.
References _VBufferFinal.
Referenced by NL3D::CZoneLighter::addTriangles(), NL3D::CInstanceLighter::addTriangles(), NL3D::CShapeInfo::build(), and NL3D::CMeshMRM::getVertexBuffer().
| virtual bool NL3D::CMeshMRMGeom::hasMeshVertexProgram | ( | ) | const [inline, virtual] |
True if this mesh has a vertexProgram.
Reimplemented from NL3D::IMeshGeom.
Definition at line 294 of file mesh_mrm.h.
References _MeshVertexProgram.
Referenced by NL3D::CMeshMRMInstance::initRenderFilterType().
| void NL3D::CMeshMRMGeom::initInstance | ( | CMeshBaseInstance * | mbi | ) | [virtual] |
Init instance info.
Implements NL3D::IMeshGeom.
Definition at line 827 of file mesh_mrm.cpp.
References _MeshVertexProgram.
Referenced by NL3D::CMeshMRM::createInstance().
| bool NL3D::CMeshMRMGeom::intersectSkin | ( | CMeshMRMInstance * | mi, | |
| const CMatrix & | toRaySpace, | |||
| float & | dist2D, | |||
| float & | distZ, | |||
| bool | computeDist2D | |||
| ) |
Definition at line 3599 of file mesh_mrm.cpp.
References _Lods, _ShadowSkin, NL3D::CShadowSkin::getRayIntersection(), NL3D::CTransform::getSkeletonModel(), and NL3D::CShadowSkin::Vertices.
Referenced by NL3D::CMeshMRMInstance::intersectSkin().
| bool NL3D::CMeshMRMGeom::isActiveInstanceNeedVBFill | ( | ) | const [virtual] |
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 from NL3D::IMeshGeom.
Definition at line 2866 of file mesh_mrm.cpp.
| bool NL3D::CMeshMRMGeom::isSkinned | ( | ) | const [inline] |
Return true if the mesh is skinned, else return false.
Definition at line 235 of file mesh_mrm.h.
References _Skinned.
Referenced by NL3D::CMeshMRM::buildSystemGeometry(), and NL3D::CMeshMRMInstance::isSkinnable().
| void NL3D::CMeshMRMGeom::load | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [private] |
load this mesh.
Definition at line 1755 of file mesh_mrm.cpp.
| void NL3D::CMeshMRMGeom::loadFirstLod | ( | NLMISC::IStream & | f | ) |
Load the header and the first lod of a MRM in a stream.
| f | the input stream to read. NB: after load, f.getPos() return the position of the second lod in the stream. |
Definition at line 1944 of file mesh_mrm.cpp.
References _LodInfos, _Lods, _NbLodLoaded, buildBoneUsageVer2(), loadHeader(), NLMISC::IStream::serial(), and serialLodVertexData().
| sint NL3D::CMeshMRMGeom::loadHeader | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [private] |
load the header of this mesh. return the version of the header.
Definition at line 1625 of file mesh_mrm.cpp.
References NLMISC::contReset(), and NLMISC::IStreamable::serial().
Referenced by loadFirstLod().
| void NL3D::CMeshMRMGeom::loadNextLod | ( | NLMISC::IStream & | f | ) |
Load next lod of a stream.
use getNbLodLoaded() to know what Lod will be loaded. NB: if getNbLodLoaded() == getNbLod(), no op.
| 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, NLMISC::IStream::begin, getNbLod(), getNbLodLoaded(), NLMISC::IStream::seek(), NLMISC::IStream::serial(), and serialLodVertexData().
| NL3D::CMeshMRMGeom::NLMISC_DECLARE_CLASS | ( | CMeshMRMGeom | ) |
| void NL3D::CMeshMRMGeom::profileSceneRender | ( | CRenderTrav * | rdrTrav, | |
| CTransformShape * | trans, | |||
| float | polygonCount, | |||
| uint32 | rdrFlags | |||
| ) | [virtual] |
Scene profile.
Implements NL3D::IMeshGeom.
Definition at line 2469 of file mesh_mrm.cpp.
References _LevelDetail, _Lods, _VBufferFinal, NL3D::CScene::BenchRes, chooseLod(), NL3D::CMRMLevelDetail::getLevelDetailFromPolyCount(), NL3D::CIndexBuffer::getNumIndexes(), NL3D::CVertexBuffer::getPreferredMemory(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CScene::incrementProfileTriVBFormat(), NL3D::IMeshGeom::isMeshInVBHeap(), NL3D::CMeshMRMGeom::CRdrPass::MaterialId, NL3D::CMeshBaseInstance::Materials, NL3D::UScene::CBenchResults::MeshMRMProfileTriVBFormat, NL3D::UScene::CBenchResults::NumMeshMRMRdrBlock, NL3D::UScene::CBenchResults::NumMeshMRMRdrBlockWithVBHeap, NL3D::UScene::CBenchResults::NumMeshMRMRdrNormal, NL3D::UScene::CBenchResults::NumMeshMRMTriRdrBlock, NL3D::UScene::CBenchResults::NumMeshMRMTriRdrBlockWithVBHeap, NL3D::UScene::CBenchResults::NumMeshMRMTriRdrNormal, NL3D::UScene::CBenchResults::NumMeshMRMVBufferHard, NL3D::UScene::CBenchResults::NumMeshMRMVBufferStd, NL3D::CMeshMRMGeom::CRdrPass::PBlock, NL3D::CVertexBuffer::RAMPreferred, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::IMeshGeom::RenderOpaqueMaterial, NL3D::IMeshGeom::RenderTransparentMaterial, NLMISC::safe_cast(), NL3D::CTraversal::Scene, and supportMeshBlockRendering().
Referenced by NL3D::CMeshMRM::profileSceneRender().
| 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 907 of file mesh_mrm.cpp.
References _LevelDetail, _Lods, _MeshMorpher, _MeshVertexProgram, _OriginalSkinNormals, _OriginalSkinVertices, _OriginalTGSpace, _Skinned, _VBufferFinal, _VBufferOriginal, NL3D::IDriver::activeIndexBuffer(), NL3D::IDriver::activeVertexBuffer(), applyGeomorph(), NL3D::CMeshMorpher::BlendShapes, NL3D::CTravCameraScene::CamPos, chooseLod(), NL3D::IDriver::forceNormalize(), NL3D::CMeshMRMGeom::CLod::Geomorphs, NL3D::CMeshBaseInstance::getBlendShapeFactors(), NL3D::CMRMLevelDetail::getLevelDetailFromPolyCount(), NL3D::CIndexBuffer::getNumIndexes(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), NL3D::CTransform::getSkeletonModel(), NL3D::CTransform::getWorldMatrix(), H_AUTO, NL3D::CMeshMorpher::init(), NL3D::CMeshMorpher::initSkinned(), NLMISC::CMatrix::inverted(), NL3D::IDriver::isForceNormalize(), NL3D::CTransform::isSkinned(), NL3D::CMeshMRMGeom::CRdrPass::MaterialId, NL3D::CMeshBaseInstance::Materials, nlassert, NLMISC::OptFastFloor(), NL3D::CMeshMRMGeom::CLod::OriginalSkinRestored, NL3D::CMeshMRMGeom::CRdrPass::PBlock, NL3D::CMeshBlender::prepareRenderForGlobalAlpha(), NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::IMeshGeom::RenderGADisableZWrite, NL3D::IMeshGeom::RenderGlobalAlpha, NL3D::IMeshGeom::RenderOpaqueMaterial, NL3D::IMeshGeom::RenderTransparentMaterial, NL3D::IDriver::renderTriangles(), restoreOriginalSkinPart(), NL3D::CMeshBlender::restoreRender(), NLMISC::safe_cast(), NL3D::IDriver::setupModelMatrix(), NL3D::CMeshMorpher::update(), and NL3D::CMeshMorpher::updateSkinned().
Referenced by NL3D::CMeshMRM::render().
| void NL3D::CMeshMRMGeom::renderPass | ( | CMeshGeomRenderContext & | rdrCtx, | |
| CMeshBaseInstance * | inst, | |||
| float | polygonCount, | |||
| uint | rdrPass | |||
| ) | [virtual] |
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 2776 of file mesh_mrm.cpp.
References _Lods, _MBRCurrentLodId, NL3D::IDriver::activeIndexBuffer(), NL3D::CMeshGeomRenderContext::Driver, NL3D::CIndexBuffer::getNumIndexes(), NL3D::CMeshMRMGeom::CRdrPass::MaterialId, NL3D::CMeshBaseInstance::Materials, NL3D::CMeshMRMGeom::CRdrPass::PBlock, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::CMeshGeomRenderContext::RenderThroughVBHeap, NL3D::IDriver::renderTriangles(), and NL3D::CMeshMRMGeom::CRdrPass::VBHeapPBlock.
| sint NL3D::CMeshMRMGeom::renderShadowSkinGeom | ( | CMeshMRMInstance * | mi, | |
| uint | remainingVertices, | |||
| uint8 * | vbDest | |||
| ) |
Definition at line 3438 of file mesh_mrm.cpp.
References _Lods, _ShadowSkin, NL3D::CShadowSkin::applySkin(), NL3D::computeBoneMatrixes3x4(), NL3D::CTransform::getSkeletonModel(), H_AUTO_USE, NL3D::CMeshMRMGeom::CLod::MatrixInfluences, nlassert, and NL3D::CShadowSkin::Vertices.
Referenced by NL3D::CMeshMRMInstance::renderShadowSkinGeom().
| void NL3D::CMeshMRMGeom::renderShadowSkinPrimitives | ( | CMeshMRMInstance * | mi, | |
| CMaterial & | castMat, | |||
| IDriver * | drv, | |||
| uint | baseVertex | |||
| ) |
Definition at line 3486 of file mesh_mrm.cpp.
References _ShadowSkin, NL3D::IDriver::activeIndexBuffer(), NL3D::CIndexBuffer::getNumIndexes(), NL3D::CIndexBufferReadWrite::getPtr(), H_AUTO_USE, NL3D::CIndexBuffer::lock(), NLMISC::n, NL_MESH_MRM_INDEX_FORMAT, NL_SET_IB_NAME, nlassert, NL3D::CIndexBuffer::RAMVolatile, NL3D::IDriver::renderTriangles(), NL3D::CIndexBuffer::setFormat(), NL3D::CIndexBuffer::setNumIndexes(), NL3D::CIndexBuffer::setPreferredMemory(), and NL3D::CShadowSkin::Triangles.
Referenced by NL3D::CMeshMRMInstance::renderShadowSkinPrimitives().
| void NL3D::CMeshMRMGeom::renderSkin | ( | CTransformShape * | trans, | |
| float | alphaMRM | |||
| ) | [virtual] |
render() this mesh as a skin
Implements NL3D::IMeshGeom.
Definition at line 1110 of file mesh_mrm.cpp.
References _Lods, _MeshMorpher, _MeshVertexProgram, _OriginalSkinNormals, _OriginalSkinVertices, _OriginalTGSpace, _Skinned, _VBufferFinal, _VBufferOriginal, NL3D::IDriver::activeIndexBuffer(), NL3D::IDriver::activeVertexBuffer(), applyGeomorph(), applySkin(), applySkinWithNormal(), applySkinWithTangentSpace(), NL3D::CMeshMorpher::BlendShapes, NL3D::CTravCameraScene::CamPos, chooseLod(), NL3D::CMeshMRMGeom::CLod::Geomorphs, NL3D::CMeshBaseInstance::getBlendShapeFactors(), NL3D::CRenderTrav::getDriver(), NL3D::CIndexBuffer::getNumIndexes(), NL3D::CVertexBuffer::getNumTexCoordUsed(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), NL3D::CTransform::getSkeletonModel(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CTransform::getWorldMatrix(), H_AUTO, NL3D::CMeshMorpher::initSkinned(), NLMISC::CMatrix::inverted(), NL3D::CTransform::isSkinned(), NL3D::CMeshMRMGeom::CRdrPass::MaterialId, NL3D::CMeshBaseInstance::Materials, nlassert, NL3D::CVertexBuffer::NormalFlag, NL3D::CMeshMRMGeom::CLod::OriginalSkinRestored, NL3D::CMeshMRMGeom::CRdrPass::PBlock, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::IDriver::renderTriangles(), NLMISC::safe_cast(), updateRawSkinNormal(), and NL3D::CMeshMorpher::updateSkinned().
Referenced by NL3D::CMeshMRMInstance::renderSkin().
| sint NL3D::CMeshMRMGeom::renderSkinGroupGeom | ( | CMeshMRMInstance * | mi, | |
| float | alphaMRM, | |||
| uint | remainingVertices, | |||
| uint8 * | vbDest | |||
| ) |
Definition at line 1282 of file mesh_mrm.cpp.
References _LastLodComputed, _Lods, _MeshMorpher, NL3D::CMeshMRMInstance::_RawSkinCache, _Skinned, _VBufferFinal, applyRawSkinWithNormal(), NL3D::CMeshMorpher::BlendShapes, chooseLod(), NL3D::CRawSkinNormalCache::Geomorphs, NL3D::CMeshBaseInstance::getBlendShapeFactors(), NL3D::CRenderTrav::getDriver(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), NL3D::CTransform::getSkeletonModel(), NL3D::CVertexBuffer::getVertexFormat(), H_AUTO, NL3D::CTransform::isSkinned(), nlassert, NL3D::CVertexBuffer::NormalFlag, NL3D::CMeshMRMGeom::CLod::NWedges, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::CRawSkinNormalCache::TotalHardVertices, NL3D::CRawSkinNormalCache::TotalSoftVertices, NL3D::CMeshMorpher::updateRawSkin(), updateRawSkinNormal(), and NL3D::CRawSkinNormalCache::VertexRemap.
Referenced by NL3D::CMeshMRMInstance::renderSkinGroupGeom().
| void NL3D::CMeshMRMGeom::renderSkinGroupPrimitives | ( | CMeshMRMInstance * | mi, | |
| uint | baseVertex, | |||
| std::vector< CSkinSpecularRdrPass > & | specularRdrPasses, | |||
| uint | skinIndex | |||
| ) |
Definition at line 1372 of file mesh_mrm.cpp.
References _LastLodComputed, _Lods, NL3D::CMeshMRMInstance::_ShiftedTriangleCache, NL3D::IDriver::activeIndexBuffer(), NL3D::CRenderTrav::getDriver(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), NL3D::CMaterial::getShader(), NL3D::CMaterial::getTexture(), NL3D::IDriver::getTextureHandle(), H_AUTO, NL3D::CMeshMRMGeom::CRdrPass::MaterialId, NL3D::CMeshBaseInstance::Materials, nlassert, NL3D::CShiftedTriangleCache::CRdrPass::NumTriangles, NL3D::CShiftedTriangleCache::RawIndices, NL3D::CShiftedTriangleCache::RdrPass, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::CSkinSpecularRdrPass::RdrPassIndex, NL3D::IDriver::renderTriangles(), NL3D::CSkinSpecularRdrPass::SkinIndex, NL3D::CSkinSpecularRdrPass::SpecId, NL3D::CMaterial::Specular, NL3D::CShiftedTriangleCache::CRdrPass::Triangles, and updateShiftedTriangleCache().
Referenced by NL3D::CMeshMRMInstance::renderSkinGroupPrimitives().
| void NL3D::CMeshMRMGeom::renderSkinGroupSpecularRdrPass | ( | CMeshMRMInstance * | mi, | |
| uint | rdrPassId | |||
| ) |
Definition at line 1450 of file mesh_mrm.cpp.
References _LastLodComputed, _Lods, NL3D::CMeshMRMInstance::_ShiftedTriangleCache, NL3D::IDriver::activeIndexBuffer(), NL3D::CRenderTrav::getDriver(), NL3D::CTransform::getOwnerScene(), NL3D::CScene::getRenderTrav(), H_AUTO, NL3D::CMeshMRMGeom::CRdrPass::MaterialId, NL3D::CMeshBaseInstance::Materials, nlassert, NL3D::CShiftedTriangleCache::CRdrPass::NumTriangles, NL3D::CShiftedTriangleCache::RawIndices, NL3D::CShiftedTriangleCache::RdrPass, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::IDriver::renderTriangles(), and NL3D::CShiftedTriangleCache::CRdrPass::Triangles.
Referenced by NL3D::CMeshMRMInstance::renderSkinGroupSpecularRdrPass().
| void NL3D::CMeshMRMGeom::restoreOriginalSkinPart | ( | CLod & | lod | ) | [private] |
Skinning: same as restoreOriginalSkinVertices(), but for one Lod only.
Definition at line 2122 of file mesh_mrm.cpp.
References _OriginalSkinNormals, _OriginalSkinVertices, _Skinned, _VBufferFinal, NL3D::CVertexBuffer::getNormalOff(), NL3D::CVertexBufferReadWrite::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::getVertexSize(), NL3D::CMeshMRMGeom::CLod::InfluencedVertices, NL3D::CVertexBuffer::lock(), NL3D_MESH_SKINNING_MAX_MATRIX, nlassert, NL3D::CVertexBuffer::NormalFlag, NL3D::CMeshMRMGeom::CLod::OriginalSkinRestored, and NL3D::CVertexBuffer::PositionFlag.
Referenced by render().
| void NL3D::CMeshMRMGeom::restoreOriginalSkinVertices | ( | ) | [private] |
Skinning: restore Vertex/Normal from _OriginalSkin* to VBuffer.
Definition at line 2083 of file mesh_mrm.cpp.
References _MeshVertexProgram, _OriginalSkinNormals, _OriginalSkinVertices, _OriginalTGSpace, _Skinned, _VBufferFinal, NL3D::CVertexBufferReadWrite::getNormalCoordPointer(), NL3D::CVertexBuffer::getNumTexCoordUsed(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CVertexBufferReadWrite::getTexCoordPointer(), NL3D::CVertexBufferReadWrite::getVertexCoordPointer(), NL3D::CVertexBuffer::getVertexFormat(), NL3D::CVertexBuffer::lock(), nlassert, NL3D::CVertexBuffer::NormalFlag, and NL3D::CVertexBuffer::PositionFlag.
| void NL3D::CMeshMRMGeom::save | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [private] |
save the entire mesh.
Definition at line 1785 of file mesh_mrm.cpp.
References NLMISC::IStream::begin, nlassert, and NLMISC::IStreamable::serial().
| void NL3D::CMeshMRMGeom::serial | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) [virtual] |
| void NL3D::CMeshMRMGeom::serialLodVertexData | ( | NLMISC::IStream & | f, | |
| uint | startWedge, | |||
| uint | endWedge | |||
| ) | [private] |
serial a subset of the vertices.
Definition at line 1911 of file mesh_mrm.cpp.
References _Skinned, _SkinWeights, _VBufferFinal, bkupOriginalSkinVerticesSubset(), NLMISC::IStream::isReading(), NLMISC::IStream::serial(), NL3D::CVertexBuffer::serialSubset(), and NLMISC::IStream::serialVersion().
Referenced by loadFirstLod(), and loadNextLod().
| void NL3D::CMeshMRMGeom::setShadowMesh | ( | const std::vector< CShadowVertex > & | shadowVertices, | |
| const std::vector< uint32 > & | triangles | |||
| ) |
Setup the ShadowMesh.
Definition at line 3421 of file mesh_mrm.cpp.
References _ShadowSkin, _SupportShadowSkinGrouping, NL3D_SHADOW_MESH_SKIN_MANAGER_MAXVERTICES, NL3D_SHADOW_MESH_SKIN_MANAGER_VERTEXFORMAT, NL3D::CVertexBuffer::PositionFlag, NL3D::CShadowSkin::Triangles, and NL3D::CShadowSkin::Vertices.
| bool NL3D::CMeshMRMGeom::sortPerMaterial | ( | ) | const [virtual] |
true if the sort criterion must be by material.
Else, sort per instance.
Implements NL3D::IMeshGeom.
Definition at line 2705 of file mesh_mrm.cpp.
| bool NL3D::CMeshMRMGeom::supportIntersectSkin | ( | ) | const [inline] |
Special use of skinning to compute intersection of a ray with it.
Internaly Use same system than ShadowSkinning, see CShadowSkin::getRayIntersection()
Definition at line 312 of file mesh_mrm.h.
References supportShadowSkinGrouping().
Referenced by NL3D::CMeshMRMInstance::supportIntersectSkin().
| bool NL3D::CMeshMRMGeom::supportMeshBlockRendering | ( | ) | const [virtual] |
true if this meshGeom support meshBlock rendering.
return false if skinned/meshMorphed.
Implements NL3D::IMeshGeom.
Definition at line 2691 of file mesh_mrm.cpp.
Referenced by profileSceneRender(), and NL3D::CMeshMRM::supportMeshBlockRendering().
| bool NL3D::CMeshMRMGeom::supportShadowSkinGrouping | ( | ) | const [inline] |
Render the ShadowSkin (SkinGroup like).
Definition at line 305 of file mesh_mrm.h.
References _SupportShadowSkinGrouping.
Referenced by supportIntersectSkin(), and NL3D::CMeshMRMInstance::supportShadowSkinGrouping().
| bool NL3D::CMeshMRMGeom::supportSkinGrouping | ( | ) | const |
Definition at line 1276 of file mesh_mrm.cpp.
References _SupportSkinGrouping.
Referenced by NL3D::CMeshMRMInstance::supportSkinGrouping().
| void NL3D::CMeshMRMGeom::unloadNextLod | ( | NLMISC::IStream & | f | ) |
UnLoad Lod getNbLodLoaded()-1 from memory.
use getNbLodLoaded()-1 to know what Lod will be unloaded. NB: if getNbLodLoaded() <= 1, no op.
Definition at line 2014 of file mesh_mrm.cpp.
References _Lods, _NbLodLoaded, NLMISC::contReset(), and getNbLodLoaded().
| void NL3D::CMeshMRMGeom::updateRawSkinNormal | ( | bool | enabled, | |
| CMeshMRMInstance * | mi, | |||
| sint | curLodId | |||
| ) | [private] |
compute RawSkin info in the MRMInstance according to current skin setup.
Definition at line 3096 of file mesh_mrm.cpp.
References _Lods, _MeshDataId, _MeshMorpher, _OriginalSkinNormals, _OriginalSkinVertices, NL3D::CMeshMRMInstance::_RawSkinCache, _SkinWeights, _VBufferFinal, NL3D::CMeshMorpher::BlendShapes, NL3D::CRawSkinNormalCache::clearArrays(), NL3D::CMeshMRMInstance::clearRawSkinCache(), NL3D::CRawSkinNormalCache::Geomorphs, NL3D::CMeshMRMGeom::CLod::Geomorphs, NL3D::CIndexBufferRead::getFormat(), NL3D::CVertexBuffer::getNumVertices(), NL3D::CIndexBufferReadWrite::getPtr(), NL3D::CIndexBufferRead::getPtr(), NL3D::CVertexBufferRead::getTexCoordPointer(), H_AUTO, NL3D::CRawSkinNormalCache::HardVertices, NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::CMeshMRMGeom::CLod::InfluencedVertices, NL3D::CVertexBuffer::lock(), NL3D::CRawSkinNormalCache::LodId, NL3D::CRawSkinNormalCache::MeshDataId, NL3D_MESH_SKINNING_MAX_MATRIX, NL_DEFAULT_INDEX_BUFFER_FORMAT, nlassert, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::CRawSkinNormalCache::RdrPass, NLMISC::CObjectVector< T, EnableObjectBehavior >::resize(), NLMISC::CObjectVector< T, EnableObjectBehavior >::size(), NL3D::CRawSkinNormalCache::SoftVertices, NL3D::CRawSkinNormalCache::TotalHardVertices, NL3D::CRawSkinNormalCache::TotalSoftVertices, NL3D::CRawSkinNormalCache::VertexRemap, NL3D::CRawSkinNormalCache::Vertices1, NL3D::CRawSkinNormalCache::Vertices2, NL3D::CRawSkinNormalCache::Vertices3, and NL3D::CRawSkinNormalCache::Vertices4.
Referenced by renderSkin(), and renderSkinGroupGeom().
| void NL3D::CMeshMRMGeom::updateShiftedTriangleCache | ( | CMeshMRMInstance * | mi, | |
| sint | curLodId, | |||
| uint | baseVertex | |||
| ) | [private] |
Definition at line 1487 of file mesh_mrm.cpp.
References _Lods, _MeshDataId, NL3D::CMeshMRMInstance::_RawSkinCache, NL3D::CMeshMRMInstance::_ShiftedTriangleCache, NL3D::CShiftedTriangleCache::BaseVertex, NL3D::CMeshMRMInstance::clearShiftedTriangleCache(), NL3D::CIndexBufferRead::getFormat(), NL3D::CIndexBufferReadWrite::getFormat(), NL3D::CIndexBufferRead::getPtr(), NL3D::CIndexBufferReadWrite::getPtr(), NL3D::CIndexBuffer::Indices16, NL3D::CIndexBuffer::Indices32, NL3D::CIndexBuffer::lock(), NL3D::CShiftedTriangleCache::LodId, NL3D::CShiftedTriangleCache::MeshDataId, NL_MESH_MRM_INDEX_FORMAT, nlassert, NL3D::CShiftedTriangleCache::CRdrPass::NumTriangles, NL3D::CShiftedTriangleCache::RawIndices, NL3D::CShiftedTriangleCache::RdrPass, NL3D::CMeshMRMGeom::CLod::RdrPass, NL3D::CRawSkinNormalCache::RdrPass, NLMISC::CObjectVector< T, EnableObjectBehavior >::resize(), NL3D::CIndexBuffer::setFormat(), NL3D::CIndexBuffer::setNumIndexes(), and NL3D::CShiftedTriangleCache::CRdrPass::Triangles.
Referenced by renderSkinGroupPrimitives().
| void NL3D::CMeshMRMGeom::updateSkeletonUsage | ( | CSkeletonModel * | sm, | |
| bool | increment | |||
| ) |
update Skeleton Usage. increment or decrement. computeBonesId must has been called before.
Definition at line 2417 of file mesh_mrm.cpp.
References _BonesIdExt, NL3D::CSkeletonModel::Bones, NL3D::CSkeletonModel::decBoneUsage(), NL3D::CSkeletonModel::incBoneUsage(), nlerror, and NL3D::CSkeletonModel::UsageNormal.
Referenced by NL3D::CMeshMRM::updateSkeletonUsage().
friend class CLod [friend] |
Definition at line 408 of file mesh_mrm.h.
friend class CMRMBuilder [friend] |
Definition at line 319 of file mesh_mrm.h.
NLMISC::CAABBoxExt NL3D::CMeshMRMGeom::_BBox [private] |
For clipping. this is the BB of all vertices of all Lods.
Definition at line 507 of file mesh_mrm.h.
Referenced by build(), clip(), compileRunTime(), and getBoundingBox().
bool NL3D::CMeshMRMGeom::_BoneIdComputed [private] |
This boolean is true if the bones id have been passed in the skeleton.
Definition at line 485 of file mesh_mrm.h.
Referenced by CMeshMRMGeom(), and computeBonesId().
bool NL3D::CMeshMRMGeom::_BoneIdExtended [private] |
true if the _BonesIdExt have been computed (for bone Usage).
Definition at line 487 of file mesh_mrm.h.
Referenced by CMeshMRMGeom(), and computeBonesId().
std::vector<sint32> NL3D::CMeshMRMGeom::_BonesId [private] |
This array give the index in the skeleton of the local bones used. computed at first computeBoneId().
Definition at line 498 of file mesh_mrm.h.
Referenced by buildBoneUsageVer2(), computeBonesId(), and getSkinBoneUsage().
std::vector<sint32> NL3D::CMeshMRMGeom::_BonesIdExt [private] |
Same as _BonesId but with parent of bones added. (used for bone usage).
Definition at line 500 of file mesh_mrm.h.
Referenced by computeBonesId(), and updateSkeletonUsage().
std::vector<std::string> NL3D::CMeshMRMGeom::_BonesName [private] |
This array give the name of the local bones.
Definition at line 496 of file mesh_mrm.h.
Referenced by build(), computeBonesId(), and getBonesName().
std::vector<NLMISC::CBSphere> NL3D::CMeshMRMGeom::_BonesSphere [private] |
see CTransform::getSkinBoneSphere() doc for the meaning of this value
Definition at line 502 of file mesh_mrm.h.
Referenced by computeBonesId(), and getSkinBoneSphere().
uint8 NL3D::CMeshMRMGeom::_LastLodComputed [private] |
Last lod rendered. used with renderSkinGroup*() only.
Definition at line 493 of file mesh_mrm.h.
Referenced by renderSkinGroupGeom(), renderSkinGroupPrimitives(), and renderSkinGroupSpecularRdrPass().
control.
Definition at line 517 of file mesh_mrm.h.
Referenced by activeInstance(), build(), changeMRMDistanceSetup(), getLevelDetail(), getNumTriangles(), profileSceneRender(), and render().
std::vector<CLodInfo> NL3D::CMeshMRMGeom::_LodInfos [private] |
Info for pre-loading Lods.
Definition at line 511 of file mesh_mrm.h.
Referenced by build(), loadFirstLod(), and loadNextLod().
std::vector<CLod> NL3D::CMeshMRMGeom::_Lods [private] |
List of Lods.
Definition at line 505 of file mesh_mrm.h.
Referenced by activeInstance(), applyMaterialRemap(), beginMesh(), build(), buildGeometryForLod(), chooseLod(), compileRunTime(), computeBonesId(), computeMeshVBHeap(), endMesh(), getGeomorphs(), getNbLod(), getNbRdrPass(), getNumRdrPassesForInstance(), getRdrPassMaterial(), getRdrPassPrimitiveBlock(), getSkinBoneBBox(), intersectSkin(), loadFirstLod(), loadNextLod(), profileSceneRender(), render(), renderPass(), renderShadowSkinGeom(), renderSkin(), renderSkinGroupGeom(), renderSkinGroupPrimitives(), renderSkinGroupSpecularRdrPass(), unloadNextLod(), updateRawSkinNormal(), and updateShiftedTriangleCache().
bool NL3D::CMeshMRMGeom::_MBRBkupNormalize [private] |
BeginMesh setup.
Definition at line 535 of file mesh_mrm.h.
Referenced by beginMesh(), and endMesh().
sint NL3D::CMeshMRMGeom::_MBRCurrentLodId [private] |
global setup at activateInstance()
Definition at line 537 of file mesh_mrm.h.
Referenced by activeInstance(), CMeshMRMGeom(), getNumRdrPassesForInstance(), and renderPass().
uint NL3D::CMeshMRMGeom::_MeshDataId [private] |
Each time the mesh is loaded/built, this increment.
Definition at line 610 of file mesh_mrm.h.
Referenced by CMeshMRMGeom(), dirtMeshDataId(), updateRawSkinNormal(), and updateShiftedTriangleCache().
CMeshMorpher NL3D::CMeshMRMGeom::_MeshMorpher [private] |
Definition at line 525 of file mesh_mrm.h.
Referenced by build(), compileRunTime(), getNbBlendShapes(), render(), renderSkin(), renderSkinGroupGeom(), and updateRawSkinNormal().
Definition at line 528 of file mesh_mrm.h.
Referenced by bkupOriginalSkinVerticesSubset(), build(), compileRunTime(), hasMeshVertexProgram(), initInstance(), render(), renderSkin(), and restoreOriginalSkinVertices().
uint NL3D::CMeshMRMGeom::_NbLodLoaded [private] |
Definition at line 512 of file mesh_mrm.h.
Referenced by build(), chooseLod(), CMeshMRMGeom(), getNbLodLoaded(), loadFirstLod(), loadNextLod(), and unloadNextLod().
std::vector<CVector> NL3D::CMeshMRMGeom::_OriginalSkinNormals [private] |
Definition at line 473 of file mesh_mrm.h.
Referenced by bkupOriginalSkinVerticesSubset(), render(), renderSkin(), restoreOriginalSkinPart(), restoreOriginalSkinVertices(), and updateRawSkinNormal().
std::vector<CVector> NL3D::CMeshMRMGeom::_OriginalSkinVertices [private] |
Skinning: this is the list of vertices (mirror of VBuffer), at the bind Pos.
Definition at line 472 of file mesh_mrm.h.
Referenced by applySkin(), bkupOriginalSkinVerticesSubset(), computeBonesId(), getSkinBoneBBox(), render(), renderSkin(), restoreOriginalSkinPart(), restoreOriginalSkinVertices(), and updateRawSkinNormal().
std::vector<CVector> NL3D::CMeshMRMGeom::_OriginalTGSpace [private] |
Definition at line 474 of file mesh_mrm.h.
Referenced by bkupOriginalSkinVerticesSubset(), render(), renderSkin(), and restoreOriginalSkinVertices().
bool NL3D::CMeshMRMGeom::_PreciseClipping [private] |
NB: HERE FOR PACKING ONLY. For clipping. Estimate if we must do a Precise clipping (ie with bboxes).
Definition at line 522 of file mesh_mrm.h.
Referenced by clip(), CMeshMRMGeom(), and compileRunTime().
CShadowSkin NL3D::CMeshMRMGeom::_ShadowSkin [private] |
Definition at line 543 of file mesh_mrm.h.
Referenced by compileRunTime(), computeBonesId(), getNumShadowSkinVertices(), intersectSkin(), renderShadowSkinGeom(), renderShadowSkinPrimitives(), and setShadowMesh().
bool NL3D::CMeshMRMGeom::_Skinned [private] |
Skinning: This tells if the mesh is correctly skinned (suuport skinning).
Definition at line 470 of file mesh_mrm.h.
Referenced by applySkin(), bkupOriginalSkinVertices(), bkupOriginalSkinVerticesSubset(), build(), buildBoneUsageVer2(), CMeshMRMGeom(), compileRunTime(), isSkinned(), render(), renderSkin(), renderSkinGroupGeom(), restoreOriginalSkinPart(), restoreOriginalSkinVertices(), and serialLodVertexData().
std::vector<CMesh::CSkinWeight> NL3D::CMeshMRMGeom::_SkinWeights [private] |
This is the array of SkinWeights, same size as the VB.
Definition at line 482 of file mesh_mrm.h.
Referenced by applySkin(), build(), buildBoneUsageVer2(), computeBonesId(), getSkinBoneBBox(), getSkinWeights(), serialLodVertexData(), and updateRawSkinNormal().
setuped at compileRunTime.
Definition at line 533 of file mesh_mrm.h.
Referenced by CMeshMRMGeom(), compileRunTime(), and getVBHeapInfo().
Definition at line 544 of file mesh_mrm.h.
Referenced by CMeshMRMGeom(), compileRunTime(), setShadowMesh(), and supportShadowSkinGrouping().
bool NL3D::CMeshMRMGeom::_SupportSkinGrouping [private] |
if true, then maybe use faster render
Definition at line 490 of file mesh_mrm.h.
Referenced by CMeshMRMGeom(), compileRunTime(), and supportSkinGrouping().
The Final VBuffer.
Definition at line 479 of file mesh_mrm.h.
Referenced by applyGeomorphWithVBHardPtr(), applySkin(), beginMesh(), bkupOriginalSkinVertices(), bkupOriginalSkinVerticesSubset(), build(), buildGeometryForLod(), compileRunTime(), computeMeshVBHeap(), getVBHeapInfo(), getVertexBuffer(), profileSceneRender(), render(), renderSkin(), renderSkinGroupGeom(), restoreOriginalSkinPart(), restoreOriginalSkinVertices(), serialLodVertexData(), and updateRawSkinNormal().
The Original VBuffer.
Definition at line 477 of file mesh_mrm.h.
Referenced by render(), and renderSkin().
uint NL3D::CMeshMRMGeom::NumCacheVertexNormal1 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin1) [static] |
Definition at line 629 of file mesh_mrm.h.
uint NL3D::CMeshMRMGeom::NumCacheVertexNormal2 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin2) [static] |
Definition at line 630 of file mesh_mrm.h.
uint NL3D::CMeshMRMGeom::NumCacheVertexNormal3 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin3) [static] |
Definition at line 631 of file mesh_mrm.h.
uint NL3D::CMeshMRMGeom::NumCacheVertexNormal4 = NL_BlockByteL1 / sizeof(CRawVertexNormalSkin4) [static] |
Definition at line 632 of file mesh_mrm.h.
1.6.1