NL3D::CLodCharacterInstance Class Reference

#include <lod_character_instance.h>


Detailed Description

An instance of a lodCharacter (stored in CSkeletonModel).
Author:
Lionel Berenguier

Nevrax France

Date:
2002

Definition at line 53 of file lod_character_instance.h.

Public Member Functions

 CLodCharacterInstance ()
const CUVgetUVs () const
 get a ptr on the UVs.

 ~CLodCharacterInstance ()

Data Fields

uint AnimId
 animId is the anim to use for this shape. No-Op if not found.

TGlobalAnimationTime AnimTime
 time is the time of animation

sint ShapeId
 shapeId is the id of the lod character shape to use. No-Op if not found.

std::vector< uint8VertexAlphas
bool WrapMode
 wrapMode if true, the anim loop, else just clamp


Private Attributes

CLodCharacterManager_Owner
sint _TextureId
std::vector< CUV_UVs
 The precomputed UVs. Filled by CLodCharacterManager.


Friends

class CLodCharacterManager


Constructor & Destructor Documentation

NL3D::CLodCharacterInstance::CLodCharacterInstance  )  [inline]
 

Definition at line 72 of file lod_character_instance.h.

References _TextureId, AnimId, AnimTime, ShapeId, and WrapMode.

00073         {
00074                 ShapeId= -1;
00075                 AnimId= 0;
00076                 AnimTime= 0;
00077                 WrapMode= true;
00078                 _TextureId= -1;
00079                 _Owner= NULL;
00080         }

NL3D::CLodCharacterInstance::~CLodCharacterInstance  ) 
 

Definition at line 36 of file lod_character_instance.cpp.

References _TextureId, nlassert, and NL3D::CLodCharacterManager::releaseInstance().

00037 {
00038         // If the texture was allocated.
00039         if(_TextureId>=0)
00040         {
00041                 nlassert(_Owner);
00042                 _Owner->releaseInstance(*this);
00043         }
00044 }


Member Function Documentation

const CUV * NL3D::CLodCharacterInstance::getUVs  )  const
 

get a ptr on the UVs.

Definition at line 48 of file lod_character_instance.cpp.

References _UVs.

Referenced by NL3D::CLodCharacterManager::addRenderCharacterKey().

00049 {
00050         if(_UVs.empty())
00051                 return NULL;
00052 
00053         return &_UVs[0];
00054 }


Friends And Related Function Documentation

friend class CLodCharacterManager [friend]
 

Definition at line 89 of file lod_character_instance.h.


Field Documentation

CLodCharacterManager* NL3D::CLodCharacterInstance::_Owner [private]
 

Definition at line 92 of file lod_character_instance.h.

Referenced by NL3D::CLodCharacterManager::getTextureInstance(), NL3D::CLodCharacterManager::initInstance(), and NL3D::CLodCharacterManager::releaseInstance().

sint NL3D::CLodCharacterInstance::_TextureId [private]
 

Definition at line 94 of file lod_character_instance.h.

Referenced by CLodCharacterInstance(), NL3D::CLodCharacterManager::endTextureCompute(), NL3D::CLodCharacterManager::getTextureInstance(), NL3D::CLodCharacterManager::initInstance(), NL3D::CLodCharacterManager::releaseInstance(), and ~CLodCharacterInstance().

std::vector<CUV> NL3D::CLodCharacterInstance::_UVs [private]
 

The precomputed UVs. Filled by CLodCharacterManager.

Definition at line 96 of file lod_character_instance.h.

Referenced by getUVs(), NL3D::CLodCharacterManager::initInstance(), and NL3D::CLodCharacterManager::releaseInstance().

uint NL3D::CLodCharacterInstance::AnimId
 

animId is the anim to use for this shape. No-Op if not found.

Definition at line 59 of file lod_character_instance.h.

Referenced by NL3D::CLodCharacterManager::addRenderCharacterKey(), CLodCharacterInstance(), NL3D::CSkeletonModel::getLodCharacterAnimId(), and NL3D::CSkeletonModel::setLodCharacterAnimId().

TGlobalAnimationTime NL3D::CLodCharacterInstance::AnimTime
 

time is the time of animation

Definition at line 61 of file lod_character_instance.h.

Referenced by NL3D::CLodCharacterManager::addRenderCharacterKey(), CLodCharacterInstance(), NL3D::CSkeletonModel::getLodCharacterAnimTime(), and NL3D::CSkeletonModel::setLodCharacterAnimTime().

sint NL3D::CLodCharacterInstance::ShapeId
 

shapeId is the id of the lod character shape to use. No-Op if not found.

Definition at line 57 of file lod_character_instance.h.

Referenced by NL3D::CLodCharacterManager::addRenderCharacterKey(), CLodCharacterInstance(), NL3D::CSkeletonModel::computeCLodVertexAlpha(), NL3D::CSkeletonModel::computeDisplayLodCharacterPriority(), NL3D::CSkeletonModel::computeLodTexture(), NL3D::CSkeletonModel::getLodCharacterShape(), NL3D::CLodCharacterManager::initInstance(), NL3D::CSkeletonModel::setDisplayLodCharacterFlag(), and NL3D::CSkeletonModel::setLodCharacterShape().

std::vector<uint8> NL3D::CLodCharacterInstance::VertexAlphas
 

The precomputed alpha array must be same size of the shape number vertices, else the whole mesh is supposed to be opaque. see CLodCharacterShape::startBoneAlpha() for how to build this array

Definition at line 69 of file lod_character_instance.h.

Referenced by NL3D::CLodCharacterManager::addRenderCharacterKey(), and NL3D::CSkeletonModel::computeCLodVertexAlpha().

bool NL3D::CLodCharacterInstance::WrapMode
 

wrapMode if true, the anim loop, else just clamp

Definition at line 63 of file lod_character_instance.h.

Referenced by NL3D::CLodCharacterManager::addRenderCharacterKey(), CLodCharacterInstance(), NL3D::CSkeletonModel::getLodCharacterWrapMode(), and NL3D::CSkeletonModel::setLodCharacterWrapMode().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 06:49:48 2004 for NeL by doxygen 1.3.6