|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CLodCharacterShape Class ReferenceA very Small Shape with anims encoded as Key Meshes.
More...
#include <lod_character_shape.h>
List of all members.
Public Methods |
| CLodCharacterShape () |
| Constructor. More...
|
void | buildMesh (const std::string &name, const CLodCharacterShapeBuild &lodBuild) |
| build the Mesh base information NB: SkinWeights array tells for each vertex what bone color to use. More...
|
bool | addAnim (const CAnimBuild &animBuild) |
| Add an animation. More...
|
void | serial (NLMISC::IStream &f) |
| serial this shape. More...
|
const std::string & | getName () const |
| Get name of this lod. More...
|
sint | getAnimIdByName (const std::string &name) const |
| get the animId from a name. -1 if not found. More...
|
uint | getNumVertices () const |
| get the number of vertices of this mesh. More...
|
uint | getNumTriangles () const |
| get the number of triangles of this mesh. More...
|
uint | getNumBones () const |
| get the number of bones. More...
|
sint | getBoneIdByName (const std::string &name) const |
| get a bone id, according to its name. -1 if not found. More...
|
const uint32 * | getTriangleArray () const |
| get a ptr to the triangles indices. More...
|
const CUV * | getUVs () const |
| get a ptr on the UVs. More...
|
const CVector * | getNormals () const |
| get a ptr to the triangles indices. More...
|
const CVector3s * | getAnimKey (uint animId, TGlobalAnimationTime time, bool wrapMode, CVector &unPackScaleFactor) const |
| get a ptr to the vertices of the key according to animId and time. More...
|
|
void | startBoneColor (std::vector< NLMISC::CRGBAF > &tmpColors) const |
| init the process by resize-ing a tmp RGBAF vector of getNumVertices() size, and reset to full black. More...
|
void | addBoneColor (uint boneId, CRGBA color, std::vector< NLMISC::CRGBAF > &tmpColors) const |
| Add a bone color influence to tmpColors. More...
|
void | endBoneColor (const std::vector< NLMISC::CRGBAF > &tmpColors, std::vector< NLMISC::CRGBA > &dstColors) const |
| Compile boneColor result into a CRGBA vector (resize-ed by the method), averaging with weight stored in A. More...
|
Private Types |
typedef std::map< std::string,
uint32 > | TStrIdMap |
| Map name To Id. More...
|
typedef TStrIdMap::iterator | ItStrIdMap |
typedef TStrIdMap::const_iterator | CstItStrIdMap |
Private Attributes |
std::string | _Name |
uint32 | _NumVertices |
uint32 | _NumTriangles |
std::vector< CUV > | _UVs |
std::vector< CVector > | _Normals |
std::vector< CBoneInfluence > | _Bones |
| List of bones and vertices they influence. More...
|
TStrIdMap | _BoneMap |
std::vector< uint32 > | _TriangleIndices |
| numTriangles * 3. More...
|
std::vector< CAnim > | _Anims |
| List of animation. More...
|
TStrIdMap | _AnimMap |
Detailed Description
A very Small Shape with anims encoded as Key Meshes.
Used for Lod of skinned meshes NB: normals are not skinned (for anim size consideration). -
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2002
Definition at line 130 of file lod_character_shape.h.
Member Typedef Documentation
typedef TStrIdMap::const_iterator NL3D::CLodCharacterShape::CstItStrIdMap [private]
|
|
typedef TStrIdMap::iterator NL3D::CLodCharacterShape::ItStrIdMap [private]
|
|
typedef std::map<std::string, uint32> NL3D::CLodCharacterShape::TStrIdMap [private]
|
|
Constructor & Destructor Documentation
NL3D::CLodCharacterShape::CLodCharacterShape |
( |
|
) |
|
|
Member Function Documentation
bool NL3D::CLodCharacterShape::addAnim |
( |
const CAnimBuild & |
animBuild |
) |
|
|
void NL3D::CLodCharacterShape::addBoneColor |
( |
uint |
boneId, |
|
|
CRGBA |
color, |
|
|
std::vector< NLMISC::CRGBAF > & |
tmpColors |
|
) |
const |
|
|
build the Mesh base information NB: SkinWeights array tells for each vertex what bone color to use.
Definition at line 336 of file lod_character_shape.cpp.
References _AnimMap, _Anims, _BoneMap, _Bones, _Name, _Normals, _NumTriangles, _NumVertices, _TriangleIndices, _UVs, NLMISC::contReset, NL3D_MESH_SKINNING_MAX_MATRIX, and nlassert. |
void NL3D::CLodCharacterShape::endBoneColor |
( |
const std::vector< NLMISC::CRGBAF > & |
tmpColors, |
|
|
std::vector< NLMISC::CRGBA > & |
dstColors |
|
) |
const |
|
|
Compile boneColor result into a CRGBA vector (resize-ed by the method), averaging with weight stored in A.
NB: if a final vertex is not influenced by any BoneColor, then it will receive (128,128,128,0). Hence it will be somewhat transparent (AlphaTest is used to render lod character shapes). This may be interressant to hide some parts if they are not used.
Definition at line 660 of file lod_character_shape.cpp.
References getNumVertices, nlassert, and NL3D::OptFastFloor. |
sint NL3D::CLodCharacterShape::getAnimIdByName |
( |
const std::string & |
name |
) |
const |
|
sint NL3D::CLodCharacterShape::getBoneIdByName |
( |
const std::string & |
name |
) |
const |
|
const std::string& NL3D::CLodCharacterShape::getName |
( |
|
) |
const [inline] |
|
const CVector * NL3D::CLodCharacterShape::getNormals |
( |
|
) |
const |
|
uint NL3D::CLodCharacterShape::getNumBones |
( |
|
) |
const [inline] |
|
uint NL3D::CLodCharacterShape::getNumTriangles |
( |
|
) |
const [inline] |
|
uint NL3D::CLodCharacterShape::getNumVertices |
( |
|
) |
const [inline] |
|
const uint32 * NL3D::CLodCharacterShape::getTriangleArray |
( |
|
) |
const |
|
const CUV * NL3D::CLodCharacterShape::getUVs |
( |
|
) |
const |
|
|
serial this shape.
Definition at line 504 of file lod_character_shape.cpp.
References _AnimMap, _Anims, _BoneMap, _Bones, _Name, _Normals, _NumTriangles, _NumVertices, _TriangleIndices, _UVs, NLMISC::IStream::serial, NLMISC::IStream::serialCheck, NLMISC::IStream::serialCont, and NLMISC::IStream::serialVersion. |
void NL3D::CLodCharacterShape::startBoneColor |
( |
std::vector< NLMISC::CRGBAF > & |
tmpColors |
) |
const |
|
Member Data Documentation
TStrIdMap NL3D::CLodCharacterShape::_AnimMap [private]
|
|
std::vector<CAnim> NL3D::CLodCharacterShape::_Anims [private]
|
|
TStrIdMap NL3D::CLodCharacterShape::_BoneMap [private]
|
|
std::vector<CBoneInfluence> NL3D::CLodCharacterShape::_Bones [private]
|
|
std::string NL3D::CLodCharacterShape::_Name [private]
|
|
std::vector<CVector> NL3D::CLodCharacterShape::_Normals [private]
|
|
uint32 NL3D::CLodCharacterShape::_NumTriangles [private]
|
|
uint32 NL3D::CLodCharacterShape::_NumVertices [private]
|
|
std::vector<uint32> NL3D::CLodCharacterShape::_TriangleIndices [private]
|
|
std::vector<CUV> NL3D::CLodCharacterShape::_UVs [private]
|
|
The documentation for this class was generated from the following files:
|
|