|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMRMBuilder Class ReferenceThe class for building MRMs.
More...
#include <mrm_builder.h>
List of all members.
MRM Level Variables. |
typedef std::map< CMRMWedgeGeom,
sint, CGeomPred > | TGeomMap |
TGeomMap | _GeomMap |
Top Level methods. |
typedef std::map< CAttributeKey,
sint > | TAttributeMap |
sint | findInsertAttributeInBaseMesh (CMRMMesh &baseMesh, sint attId, sint vertexId, const CVectorH &att) |
sint | findInsertNormalInBaseMesh (CMRMMesh &baseMesh, sint attId, sint vertexId, const CVector &normal) |
sint | findInsertColorInBaseMesh (CMRMMesh &baseMesh, sint attId, sint vertexId, CRGBA col) |
sint | findInsertUvwInBaseMesh (CMRMMesh &baseMesh, sint attId, sint vertexId, const NLMISC::CUVW &uvw) |
CRGBA | attToColor (const CVectorH &att) const |
NLMISC::CUVW | attToUvw (const CVectorH &att) const |
uint32 | buildMrmBaseMesh (const CMesh::CMeshBuild &mbuild, CMRMMesh &baseMesh) |
| from a meshBuild, compute a CMRMMesh. More...
|
void | buildMeshBuildMrm (const CMRMMeshFinal &finalMRM, CMeshMRMGeom::CMeshBuildMRM &mbuild, uint32 vbFlags, uint32 nbMats, const CMesh::CMeshBuild &mb) |
| from a final MRM Mesh representation, compute a CMeshBuildMRM. More...
|
void | normalizeBaseMeshSkin (CMRMMesh &baseMesh) const |
CMesh::CSkinWeight | normalizeSkinWeight (const CMesh::CSkinWeight &sw) const |
TAttributeMap | _AttributeMap [NL3D_MRM_MAX_ATTRIB] |
Mesh Interfaces computing |
bool | buildMRMSewingMeshes (const CMesh::CMeshBuild &mbuild, uint nWantedLods, uint divisor) |
bool | _HasMeshInterfaces |
std::vector< CMRMSewingMesh > | _SewingMeshes |
uint | _CurrentLodComputed |
Public Methods |
| CMRMBuilder () |
| Constructor. More...
|
void | compileMRM (const CMesh::CMeshBuild &mbuild, std::vector< CMesh::CMeshBuild * > &bsList, const CMRMParameters ¶ms, CMeshMRMGeom::CMeshBuildMRM &mrmMesh, uint numMaxMaterial) |
| Compile a MRM mesh info. More...
|
Private Methods |
void | computeBsVerticesAttributes (std::vector< CMRMMesh > &srcBsMeshs, std::vector< CMRMMesh > &srcBsMeshsMod) |
void | makeCoarserBS (std::vector< CMRMBlendShape > &csBsMeshs) |
|
bool | vertexHasOneWedge (sint numvertex) |
bool | vertexHasOneMaterial (sint numvertex) |
bool | vertexContinue (sint numvertex) |
bool | vertexClosed (sint numvertex) |
float | getDeltaFaceNormals (sint numvertex) |
bool | edgeContinue (const CMRMEdge &edge) |
bool | edgeNearUniqueMatFace (const CMRMEdge &edge) |
float | computeEdgeCost (const CMRMEdge &edge) |
|
bool | faceShareWedges (CMRMFaceBuild *face, sint attribId, sint numVertex1, sint numVertex2) |
void | insertFaceIntoEdgeList (CMRMFaceBuild &tmpf) |
void | removeFaceFromEdgeList (CMRMFaceBuild &f) |
sint | collapseEdge (const CMRMEdge &edge) |
sint | followVertex (sint i) |
sint | followWedge (sint attribId, sint i) |
CMesh::CSkinWeight | collapseSkinWeight (const CMesh::CSkinWeight &sw1, const CMesh::CSkinWeight &sw2, float InterValue) const |
|
void | init (const CMRMMesh &baseMesh) |
void | collapseEdges (sint nWantedFaces) |
void | makeLODMesh (CMRMMeshGeom &lodMesh) |
void | saveCoarserMesh (CMRMMesh &coarserMesh) |
void | makeFromMesh (const CMRMMesh &baseMesh, CMRMMeshGeom &lodMesh, CMRMMesh &coarserMesh, sint nWantedFaces) |
| this is the root call to compute a single lodMesh and the coarserMesh from a baseMesh. More...
|
|
void | buildBlendShapes (CMRMMesh &baseMesh, std::vector< CMesh::CMeshBuild * > &bsList, uint32 VertexFlags) |
| build the blend shapes in the same way we constructed the base mesh mrm. More...
|
void | buildAllLods (const CMRMMesh &baseMesh, std::vector< CMRMMeshGeom > &lodMeshs, uint nWantedLods=10, uint divisor=50) |
| build all LODs from a baseMesh. More...
|
void | buildFinalMRM (std::vector< CMRMMeshGeom > &lodMeshs, CMRMMeshFinal &finalMRM) |
| given a list of LODs, compress/reorganize data, and store in finalMRM mesh. More...
|
Private Attributes |
|
std::vector< CMRMVertex > | TmpVertices |
std::vector< CMRMAttribute > | TmpAttributes [NL3D_MRM_MAX_ATTRIB] |
sint | NumAttributes |
std::vector< CMRMFaceBuild > | TmpFaces |
TEdgeMap | EdgeCollapses |
bool | _Skinned |
CMRMParameters::TSkinReduction | _SkinReduction |
| If the current build is skinned, control the quality of the skinning redcution. More...
|
Detailed Description
The class for building MRMs.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 51 of file mrm_builder.h.
Member Typedef Documentation
Constructor & Destructor Documentation
NL3D::CMRMBuilder::CMRMBuilder |
( |
|
) |
|
|
Member Function Documentation
CRGBA NL3D::CMRMBuilder::attToColor |
( |
const CVectorH & |
att |
) |
const [private] |
|
NLMISC::CUVW NL3D::CMRMBuilder::attToUvw |
( |
const CVectorH & |
att |
) |
const [private] |
|
void NL3D::CMRMBuilder::buildAllLods |
( |
const CMRMMesh & |
baseMesh, |
|
|
std::vector< CMRMMeshGeom > & |
lodMeshs, |
|
|
uint |
nWantedLods = 10, |
|
|
uint |
divisor = 50 |
|
) |
[private] |
|
|
build all LODs from a baseMesh.
NB: the coarsestMesh is stored in lodMeshs[0], and has no geomorph info since it is the coarsest mesh. nWantedLods are created (including the coarsestMesh). -
Parameters:
-
lodMeshs |
array created by the function (size of nWantedlods). |
nWantedLods |
number of LODs wanted. |
divisor |
the coarsestMesh will have baseMesh.Faces.size()/divisor faces. |
Definition at line 1272 of file mrm_builder.cpp.
References _CurrentLodComputed, init, makeFromMesh, and nlassert.
Referenced by compileMRM. |
sint NL3D::CMRMBuilder::collapseEdge |
( |
const CMRMEdge & |
edge |
) |
[private] |
|
|
Definition at line 484 of file mrm_builder.cpp.
References _CurrentLodComputed, _HasMeshInterfaces, _SewingMeshes, collapseSkinWeight, NL3D::deleteElement, EdgeCollapses, faceShareWedges, NL3D::findElement, nlassert, NumAttributes, removeFaceFromEdgeList, TmpAttributes, TmpFaces, TmpVertices, vertexClosed, and vertexContinue.
Referenced by collapseEdges. |
void NL3D::CMRMBuilder::collapseEdges |
( |
sint |
nWantedFaces |
) |
[private] |
|
|
Compile a MRM mesh info.
-
Parameters:
-
mbuild |
the input mesh |
params |
the parameters of MRM process. |
mrmMesh |
the result MRM mesh. |
Definition at line 2475 of file mrm_builder.cpp.
References _HasMeshInterfaces, _Skinned, _SkinReduction, buildAllLods, buildBlendShapes, buildFinalMRM, buildMeshBuildMrm, buildMrmBaseMesh, buildMRMSewingMeshes, nlassert, normalizeBaseMeshSkin, and params. |
void NL3D::CMRMBuilder::computeBsVerticesAttributes |
( |
std::vector< CMRMMesh > & |
srcBsMeshs, |
|
|
std::vector< CMRMMesh > & |
srcBsMeshsMod |
|
) |
[private] |
|
float NL3D::CMRMBuilder::computeEdgeCost |
( |
const CMRMEdge & |
edge |
) |
[private] |
|
bool NL3D::CMRMBuilder::edgeContinue |
( |
const CMRMEdge & |
edge |
) |
[private] |
|
bool NL3D::CMRMBuilder::edgeNearUniqueMatFace |
( |
const CMRMEdge & |
edge |
) |
[private] |
|
sint NL3D::CMRMBuilder::findInsertAttributeInBaseMesh |
( |
CMRMMesh & |
baseMesh, |
|
|
sint |
attId, |
|
|
sint |
vertexId, |
|
|
const CVectorH & |
att |
|
) |
[private] |
|
sint NL3D::CMRMBuilder::findInsertColorInBaseMesh |
( |
CMRMMesh & |
baseMesh, |
|
|
sint |
attId, |
|
|
sint |
vertexId, |
|
|
CRGBA |
col |
|
) |
[private] |
|
sint NL3D::CMRMBuilder::findInsertNormalInBaseMesh |
( |
CMRMMesh & |
baseMesh, |
|
|
sint |
attId, |
|
|
sint |
vertexId, |
|
|
const CVector & |
normal |
|
) |
[private] |
|
sint NL3D::CMRMBuilder::followVertex |
( |
sint |
i |
) |
[private] |
|
sint NL3D::CMRMBuilder::followWedge |
( |
sint |
attribId, |
|
|
sint |
i |
|
) |
[private] |
|
float NL3D::CMRMBuilder::getDeltaFaceNormals |
( |
sint |
numvertex |
) |
[private] |
|
void NL3D::CMRMBuilder::init |
( |
const CMRMMesh & |
baseMesh |
) |
[private] |
|
void NL3D::CMRMBuilder::insertFaceIntoEdgeList |
( |
CMRMFaceBuild & |
tmpf |
) |
[private] |
|
void NL3D::CMRMBuilder::makeCoarserBS |
( |
std::vector< CMRMBlendShape > & |
csBsMeshs |
) |
[private] |
|
void NL3D::CMRMBuilder::makeLODMesh |
( |
CMRMMeshGeom & |
lodMesh |
) |
[private] |
|
void NL3D::CMRMBuilder::normalizeBaseMeshSkin |
( |
CMRMMesh & |
baseMesh |
) |
const [private] |
|
void NL3D::CMRMBuilder::removeFaceFromEdgeList |
( |
CMRMFaceBuild & |
f |
) |
[private] |
|
void NL3D::CMRMBuilder::saveCoarserMesh |
( |
CMRMMesh & |
coarserMesh |
) |
[private] |
|
bool NL3D::CMRMBuilder::vertexClosed |
( |
sint |
numvertex |
) |
[private] |
|
bool NL3D::CMRMBuilder::vertexContinue |
( |
sint |
numvertex |
) |
[private] |
|
bool NL3D::CMRMBuilder::vertexHasOneMaterial |
( |
sint |
numvertex |
) |
[private] |
|
bool NL3D::CMRMBuilder::vertexHasOneWedge |
( |
sint |
numvertex |
) |
[private] |
|
Member Data Documentation
TAttributeMap NL3D::CMRMBuilder::_AttributeMap[NL3D_MRM_MAX_ATTRIB] [private]
|
|
uint NL3D::CMRMBuilder::_CurrentLodComputed [private]
|
|
TGeomMap NL3D::CMRMBuilder::_GeomMap [private]
|
|
bool NL3D::CMRMBuilder::_HasMeshInterfaces [private]
|
|
std::vector<CMRMSewingMesh> NL3D::CMRMBuilder::_SewingMeshes [private]
|
|
bool NL3D::CMRMBuilder::_Skinned [private]
|
|
|
If the current build is skinned, control the quality of the skinning redcution.
Definition at line 91 of file mrm_builder.h.
Referenced by compileMRM. |
TEdgeMap NL3D::CMRMBuilder::EdgeCollapses [private]
|
|
sint NL3D::CMRMBuilder::NumAttributes [private]
|
|
std::vector<CMRMAttribute> NL3D::CMRMBuilder::TmpAttributes[NL3D_MRM_MAX_ATTRIB] [private]
|
|
std::vector<CMRMVertex> NL3D::CMRMBuilder::TmpVertices [private]
|
|
|
Definition at line 78 of file mrm_builder.h.
Referenced by collapseEdge, collapseEdges, computeEdgeCost, edgeContinue, edgeNearUniqueMatFace, followVertex, getDeltaFaceNormals, init, makeCoarserBS, makeLODMesh, saveCoarserMesh, vertexClosed, vertexHasOneMaterial, and vertexHasOneWedge. |
The documentation for this class was generated from the following files:
|
|