Definition at line 377 of file mesh_mrm.h.
Public Member Functions | |
| void | buildSkinVertexBlocks () |
| CLod () | |
| void | optimizeTriangleOrder () |
| void | serial (NLMISC::IStream &f) |
Data Fields | |
| std::vector< CMRMWedgeGeom > | Geomorphs |
| List of geomorph, for this LOD. | |
| std::vector< uint32 > | InfluencedVertices [NL3D_MESH_SKINNING_MAX_MATRIX] |
| std::vector< uint32 > | MatrixInfluences |
| Skinning: list of Matrix which influence this Lod. So we know what matrix to compute. | |
| uint32 | NWedges |
| The number of vertex in The VB this Lod needs. | |
| bool | OriginalSkinRestored |
| Skinning: does the VBuffer part of this Lod contains original skin vertices. | |
| std::vector< CRdrPass > | RdrPass |
| List of rdr pass, for this LOD. | |
| std::vector< CVertexBlock > | SkinVertexBlocks |
|
|
Definition at line 402 of file mesh_mrm.h. References OriginalSkinRestored.
00403 {
00404 // By default, this is supposed false.
00405 OriginalSkinRestored= false;
00406 }
|
|
|
Definition at line 105 of file mesh_mrm.cpp. References index, InfluencedVertices, NL3D_MESH_SKINNING_MAX_MATRIX, NL3D::CMeshMRMGeom::CVertexBlock::NVertices, NWedges, SkinVertexBlocks, uint, uint32, and NL3D::CMeshMRMGeom::CVertexBlock::VertexStart.
00106 {
00107 contReset(SkinVertexBlocks);
00108
00109
00110 // The list of vertices. true if used by this lod.
00111 vector<bool> vertexMap;
00112 vertexMap.resize(NWedges, false);
00113
00114
00115 // from InfluencedVertices, aknoledge what vertices are used.
00116 uint i;
00117 for(i=0;i<NL3D_MESH_SKINNING_MAX_MATRIX;i++)
00118 {
00119 uint nInf= InfluencedVertices[i].size();
00120 if( nInf==0 )
00121 continue;
00122 uint32 *infPtr= &(InfluencedVertices[i][0]);
00123
00124 // for all InfluencedVertices only.
00125 for(;nInf>0;nInf--, infPtr++)
00126 {
00127 uint index= *infPtr;
00128 vertexMap[index]= true;
00129 }
00130 }
00131
00132 // For all vertices, test if they are used, and build the according SkinVertexBlocks;
00133 CVertexBlock *vBlock= NULL;
00134 for(i=0; i<vertexMap.size();i++)
00135 {
00136 if(vertexMap[i])
00137 {
00138 // preceding block?
00139 if(vBlock)
00140 {
00141 // yes, extend it.
00142 vBlock->NVertices++;
00143 }
00144 else
00145 {
00146 // no, append a new one.
00147 SkinVertexBlocks.push_back(CVertexBlock());
00148 vBlock= &SkinVertexBlocks[SkinVertexBlocks.size()-1];
00149 vBlock->VertexStart= i;
00150 vBlock->NVertices= 1;
00151 }
00152 }
00153 else
00154 {
00155 // Finish the preceding block (if any).
00156 vBlock= NULL;
00157 }
00158 }
00159
00160 }
|
|
|
Definition at line 164 of file mesh_mrm.cpp. References NL3D::CStripifier::optimizeTriangles(), NL3D::CMeshMRMGeom::CRdrPass::PBlock, and uint.
|
|
|
|
|
|
List of geomorph, for this LOD.
Definition at line 383 of file mesh_mrm.h. Referenced by NL3D::CMRMBuilder::buildMeshBuildMrm(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshMRMGeom::renderSkin(), and NL3D::CMeshMRMGeom::updateRawSkinNormal(). |
|
|
Skinning: list of influenced vertices to compute, for this lod only. There is 4 array, 0th is for vertices which have only one matrix. 1st if for vertices which have only 2 matrix .... Definition at line 390 of file mesh_mrm.h. Referenced by NL3D::CMeshMRMGeom::applySkin(), NL3D::CMRMBuilder::buildMeshBuildMrm(), buildSkinVertexBlocks(), NL3D::CMeshMRMGeom::restoreOriginalSkinPart(), and NL3D::CMeshMRMGeom::updateRawSkinNormal(). |
|
|
Skinning: list of Matrix which influence this Lod. So we know what matrix to compute.
Definition at line 392 of file mesh_mrm.h. Referenced by NL3D::CMeshMRMGeom::applyArrayShadowSkin(), NL3D::CMeshMRMGeom::applySkin(), and NL3D::CMRMBuilder::buildMeshBuildMrm(). |
|
|
The number of vertex in The VB this Lod needs.
Definition at line 381 of file mesh_mrm.h. Referenced by NL3D::CMRMBuilder::buildMeshBuildMrm(), buildSkinVertexBlocks(), and NL3D::CMeshMRMGeom::renderSkinGroupGeom(). |
|
|
Skinning: does the VBuffer part of this Lod contains original skin vertices.
Definition at line 394 of file mesh_mrm.h. Referenced by CLod(), NL3D::CMeshMRMGeom::render(), NL3D::CMeshMRMGeom::renderSkin(), and NL3D::CMeshMRMGeom::restoreOriginalSkinPart(). |
|
|
|
Skinning: list of vertex blocks to copy from RAM to AGP, for this Lod only. NB: it is constructed from InfluencedVertices. Only usefull if skinned. Definition at line 398 of file mesh_mrm.h. Referenced by buildSkinVertexBlocks(). |
1.3.6