From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNL3D_1_1CSkeletonModel.html | 3036 +++++++++++++++++++++ 1 file changed, 3036 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1CSkeletonModel.html (limited to 'docs/doxygen/nel/classNL3D_1_1CSkeletonModel.html') diff --git a/docs/doxygen/nel/classNL3D_1_1CSkeletonModel.html b/docs/doxygen/nel/classNL3D_1_1CSkeletonModel.html new file mode 100644 index 00000000..e22a0986 --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1CSkeletonModel.html @@ -0,0 +1,3036 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NL3D::CSkeletonModel Class Reference

A Skeleton model, instance of CSkeletonShape. +More... +

+#include <skeleton_model.h> +

+

Inheritance diagram for NL3D::CSkeletonModel: +

+ +NL3D::CTransformShape +NL3D::CTransform +NL3D::IModel +NL3D::ITransformable +NLMISC::CRefCount +NL3D::IAnimatable + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

IAnimatable Interface (registering only IAnimatable sons (bones)).

enum  TAnimValues { OwnerBit = CTransformShape::AnimValueLast, +AnimValueLast + }
 Added values. More...

virtual void registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix)
 register transform channels (in global anim mode). More...


Skin/BoneUsage Accessor. Called by CMeshInstance only.

enum  TBoneUsageType { UsageNormal, +UsageForced, +UsageCLodForced + }
void incBoneUsage (uint i, TBoneUsageType boneUsageType)
 increment the refCount of the ith bone. More...

void decBoneUsage (uint i, TBoneUsageType boneUsageType)
 decrement the refCount of the ith bone. set forced to the same param passed when incBoneUsage(). More...

void flagBoneAndParents (uint32 boneId, std::vector< bool > &boneUsage) const
 This method update boneUsage (must be of size of Bones). More...


Bone Usage.

void initBoneUsages ()
 called by CSkeletonShape::createInstance(). init the vector. More...

void incForcedBoneUsageAndParents (uint i, bool forceCLod)
 increment the refCount of the ith bone and its parents. for stickObjects. More...

void decForcedBoneUsageAndParents (uint i, bool forceCLod)
 increment the refCount of the ith bone and its parents. for stickObjects. More...

void updateBoneToCompute ()
 According to Usage, ForedUsage and current skeleton Lod, update MustCompute and ValidBoneSkinMatrix. More...

std::vector< CBoneUsage_BoneUsage
 The list of BoneUsage. Updated by Meshes, stickObject(), and lod changes. More...

std::vector< CBoneCompute_BoneToCompute
 List of bones to compute. More...

bool _BoneToComputeDirty
 Flag set if the MRSkeleton lod change, or if a new bone Usage change (only if was 0 or become 0). More...

uint _CurLod
 The current lod activated for this skeleton. More...

float _CurLodInterp
 The current lod Interpolation Value for this skeleton. More...

float _LodInterpMultiplier
 For lod interpolation. Inverse of distance. If 0, disable interpolation. More...


CLod / Character Lod

const CLightContributiongetSkeletonLightContribution ()
void computeCLodVertexColors (CLodCharacterManager *mngr)
 recompute _CLodVertexColors, ignoring _CLodVertexColorDirty. More...

bool _DisplayedAsLodCharacter
 True if the skeleton model and his skins have to be displayed with a CLodCharacterShape, instead of the std way This state is modified early during the HRC Traversal. More...

float _LodCharacterDistance
 see setLodCharacterDistance. More...

float _OOLodCharacterDistance
CLodCharacterInstance _CLodInstance
 The Lod instance. -1 by default. More...

bool _CLodVertexColorDirty
 dirt when a bindSkin/stickObject/detachSkeletonSon is called dirt when a transform mean color is changed. More...


Public Types


Public Methods

bool isClipVisible () const
 tells if the skeleton has been clipped in the clip traversal. More...

void updateSkinRenderLists ()
Skin operation.
bool bindSkin (CTransform *mi)
 bind a skin to the skeleton. More...

void stickObject (CTransform *mi, uint boneId)
 parent a CTransform to a bone of the skeleton. More...

void stickObjectEx (CTransform *mi, uint boneId, bool forceCLod)
 same method as stickObject(), but if you set forceCLod as true, then this object will be visible even if the skeleton father is in CLod state (ie displayed with a CLodCharacterShape) NB: if "mi" is a skeleton model, forceCLod is considerer true, whatever the value passed in. More...

void detachSkeletonSon (CTransform *mi)
 unparent a CTransform from a bone of the skeleton, or unbind a skin. More...

void dirtSkinRenderLists ()
 Force the skeletonModel to recompute at next render which skins to render, at wich pass. More...

Misc.
sint32 getBoneIdByName (const std::string &name) const
 return, from skeleton shape, the BoneIdByName. -1 if not here. More...

bool isBoneComputed (uint boneId) const
 Tell if a bone has been computed in the last frame or not. false if boneId is invalid. More...

uint getNumBoneComputed () const
 return the number of bones currently animated/computed (because of bindSkin()/stickObject() / Lod system). More...

void setInterpolationDistance (float dist)
 change the Lod Bone interpolation distance (in meters). More...

float getInterpolationDistance () const
 see setInterpolationDistance(). More...

const NLMISC::CMatrixgetActiveBoneSkinMatrix (uint boneId) const
 if Bones[boneId] is "Computed" (usage/lod), return Bones[boneId].getBoneSkinMatrix() else return parent ones (recurs, but precomputed). More...

void computeAllBones (const CMatrix &modelWorldMatrix)
 Tool function, especially for animation bake. More...

bool computeRenderedBBox (NLMISC::CAABBox &bbox)
 Retrieve the current approx BBox around the skeleton, computed in the last CSene::render(). More...

bool computeCurrentBBox (NLMISC::CAABBox &bbox, bool forceCompute=false)
 same as computeRenderedBBox() but force animation and compute of all bones => don't need render(), but slower. More...

CLod / Character Lod
void setLodCharacterShape (sint shapeId)
 Change the Character Lod shape Id. set -1 if want to disable the feature (default). More...

sint getLodCharacterShape () const
 see setLodCharacterShape. More...

void setLodCharacterAnimId (uint animId)
 Change/get the Character Lod anim setup. More...

uint getLodCharacterAnimId () const
void setLodCharacterAnimTime (TGlobalAnimationTime time)
TGlobalAnimationTime getLodCharacterAnimTime () const
void setLodCharacterWrapMode (bool wrapMode)
 tells if the animation must loop or clamp. More...

bool getLodCharacterWrapMode () const
bool isDisplayedAsLodCharacter () const
 True if the skeleton model and his skins are to be displayed with a CLodCharacterShape, instead of the std way This state is modified early during the HRC Traversal. More...

void setLodCharacterDistance (float dist)
 This is the distance at which the skeleton use a CLodCharacterShape to display himself if 0, never display the skeleton as a CLodCharacterShape. More...

float getLodCharacterDistance () const
 see setLodCharacterDistance. 0 if disabled. More...

float computeDisplayLodCharacterPriority () const
 Called in ClipTrav pass. More...

void setDisplayLodCharacterFlag (bool displayCLod)
 Called in ClipTrav pass. More...

void dirtLodVertexColor ()
 Called by CTransform::setMeanColor(). More...

void computeLodTexture ()
 Call it when you want the system to recompute the Lod texture NB: Lod texturing is possible only in conjunction with AsyncTextureManager. More...

Load balancing methods
virtual float getNumTriangles (float distance)
 Special version for skins. More...

void changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest)
 Special version for skins. More...

void resetDefaultMRMDistanceSetup ()
 Reset the Default MRM setup: follow MAX skin setup (ie the finer). More...


Static Public Methods

void registerBasic ()
 Call at the begining of the program, to register the model, and the basic observers. More...


Public Attributes

std::vector< CBoneBones
 The list of CBone, created from the CSkeletonShape. More...


Protected Methods

 CSkeletonModel ()
 Constructor. More...

virtual ~CSkeletonModel ()
 Destructor. More...

virtual void initModel ()
 Build link to traversals. More...


Private Types

typedef std::set< CTransform * > TTransformSet
 skins/sticked objects. More...

typedef TTransformSet::iterator ItTransformSet
typedef NLMISC::CObjectVector<
+ CTransform *, false > 
TTransformArray

Private Methods

void buildDefaultLevelDetail ()

Static Private Methods

IModelcreator ()

Private Attributes

std::list< CSkeletonModel
+* >::iterator 
_ItSkeletonInScene
TTransformSet _Skins
 The skins. More...

TTransformSet _StickedObjects
 The StickedObjects. More...

bool _SkinToRenderDirty
bool _DefaultMRMSetup
TTransformArray _OpaqueSkins
TTransformArray _TransparentSkins
TTransformArray _AnimDetailSkins
CMRMLevelDetail _LevelDetail
CHrcTravHrcTrav
CClipTravClipTrav

Friends

class CSkeletonShape
class CSkeletonModelAnimDetailObs
class CSkeletonModelRenderObs
class CTransformClipObs
+

Detailed Description

+A Skeleton model, instance of CSkeletonShape. +

+Skeletons sons are added with bindSkin(), stickObject(). They are removed auto at dtor. +

+

+Author:
+Lionel Berenguier , Nevrax France
+Date:
+2001
+

+ +

+Definition at line 64 of file skeleton_model.h.


Member Typedef Documentation

+

+ + + + +
+ + +
typedef TTransformSet::iterator NL3D::CSkeletonModel::ItTransformSet [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 317 of file skeleton_model.h. +

+Referenced by computeCLodVertexColors, computeLodTexture, and updateSkinRenderLists.

+

+ + + + +
+ + +
typedef NLMISC::CObjectVector<CTransform*, false> NL3D::CSkeletonModel::TTransformArray [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 328 of file skeleton_model.h.

+

+ + + + +
+ + +
typedef std::set<CTransform*> NL3D::CSkeletonModel::TTransformSet [private] +
+
+ + + + + +
+   + + +

+skins/sticked objects. +

+ +

+Definition at line 316 of file skeleton_model.h.

+


Member Enumeration Documentation

+

+ + + + +
+ + +
enum NL3D::CSkeletonModel::TAnimValues +
+
+ + + + + +
+   + + +

+Added values. +

+

+Enumeration values:
+ + + +
OwnerBit  +
AnimValueLast  +
+
+ +

+Reimplemented from NL3D::ITransformable. +

+Definition at line 80 of file skeleton_model.h.

+

+ + + + +
+ + +
enum NL3D::CSkeletonModel::TBoneUsageType +
+
+ + + + + +
+   + + +

+

+Enumeration values:
+ + + + +
UsageNormal  +
UsageForced  +
UsageCLodForced  +
+
+ +

+Definition at line 135 of file skeleton_model.h.

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CSkeletonModel::CSkeletonModel   [protected]
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 78 of file skeleton_model.cpp. +

+References _CLodVertexColorDirty, _DefaultMRMSetup, _DisplayedAsLodCharacter, _LodCharacterDistance, _OOLodCharacterDistance, _SkinToRenderDirty, AnimValueLast, buildDefaultLevelDetail, ClipTrav, HrcTrav, NL3D::CTransform::setOpacity, and NL3D::CTransform::setTransparency. +

+Referenced by creator.

+

+ + + + +
+ + + + + + + + + +
NL3D::CSkeletonModel::~CSkeletonModel   [protected, virtual]
+
+ + + + + +
+   + + +

+Destructor. +

+ +

+Definition at line 119 of file skeleton_model.cpp. +

+References _ItSkeletonInScene, _Skins, _StickedObjects, ClipTrav, detachSkeletonSon, and setLodCharacterShape.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CSkeletonModel::bindSkin CTransform  mi
+
+ + + + + +
+   + + +

+bind a skin to the skeleton. +

+NB: ~CTransform() calls detachSkeletonSon(). NB: nlassert() if there is too many skins/sticked objects on this skeleton (more than 255). NB: an object can't be skinned and sticked at same time :) NB: replaced if already here. NB: when a skin is binded, the command hide(), show(), ... have no effect on it, until it is detachSkeletonSon()-ed NB: For Skins, all Hrc/Clip/ValidateList link is done here

+Returns:
+false if mi is not skinnable, true otherwise
+

+Definition at line 393 of file skeleton_model.cpp. +

+References _Skins, ClipTrav, dirtLodVertexColor, dirtSkinRenderLists, HrcTrav, NL3D::IModel::IModel, and nlassert.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::buildDefaultLevelDetail   [private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 1125 of file skeleton_model.cpp. +

+References _LevelDetail. +

+Referenced by CSkeletonModel, and updateSkinRenderLists.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::changeMRMDistanceSetup float   distanceFinest,
float   distanceMiddle,
float   distanceCoarsest
+
+ + + + + +
+   + + +

+Special version for skins. +

+NB: skins never follow their original MRM distance setup, but follow this skeleton MRM setup. Default is to follow the MAX of all skins binded (ie the finer). NB: Unlike CMeshBaseInstance::changeMRMDistanceSetup(), this setup applies to the SkeletonModel, not the shape. NB: no-op if distanceFinest<0, distanceMiddle<=distanceFinest or if distanceCoarsest<=distanceMiddle.

+Parameters:
+ + + + +
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 1404 of file skeleton_model.cpp. +

+References _DefaultMRMSetup, and _LevelDetail.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::computeAllBones const CMatrix &   modelWorldMatrix
+
+ + + + + +
+   + + +

+Tool function, especially for animation bake. +

+It updates all bones (independent of bone usage, and lod interpolation), and take a user skeleton worldMatrix as input. NB: no detail animation is performed here, just the compute of bone hierarchy. +

+Definition at line 685 of file skeleton_model.cpp. +

+References Bones. +

+Referenced by computeCurrentBBox.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::computeCLodVertexColors CLodCharacterManager  mngr [private]
+
+ + + + + +
+   + + +

+recompute _CLodVertexColors, ignoring _CLodVertexColorDirty. +

+ +

+Definition at line 923 of file skeleton_model.cpp. +

+References _CLodInstance, _Skins, _StickedObjects, Bones, NL3D::CTransform::CTransform, and ItTransformSet.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool NL3D::CSkeletonModel::computeCurrentBBox NLMISC::CAABBox  bbox,
bool   forceCompute = false
+
+ + + + + +
+   + + +

+same as computeRenderedBBox() but force animation and compute of all bones => don't need render(), but slower. +

+for all used bones, extend the bbox with their pos

+Parameters:
+ + + +
bbox  +return the bbox of the skinned skeleton, local to the skeleton. If the skeleton is not skinned/sticked at all, bbox is not modified.
forceCompute  +force evalution even if not skinned
+
+Returns:
+true if the bbox is computed, false otherwise.
+

+Definition at line 1476 of file skeleton_model.cpp. +

+References _BoneUsage, Bones, computeAllBones, and NL3D::CTransform::getChannelMixer.

+

+ + + + +
+ + + + + + + + + +
float NL3D::CSkeletonModel::computeDisplayLodCharacterPriority   const
+
+ + + + + +
+   + + +

+Called in ClipTrav pass. +

+Used to update the flag _DisplayedAsLodCharacter. return 0 if CLod not enabled. Else return a priority>0 computed from curDistance/LodCharacterDistance return 0 too if the skeleton is not visible or if his ancestorSkeletonModel is not visible. If priority is >1 then the skeleton must be displayed in CLod form +

+Definition at line 850 of file skeleton_model.cpp. +

+References _CLodInstance, NL3D::CTransform::_HrcObs, _LodCharacterDistance, _OOLodCharacterDistance, ClipTrav, and isClipVisible.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::computeLodTexture  
+
+ + + + + +
+   + + +

+Call it when you want the system to recompute the Lod texture NB: Lod texturing is possible only in conjunction with AsyncTextureManager. +

+Hence, instances skinned to the skeleton should be in AsyncTextureMode. For best result, you should wait that each of these instances are isAsyncTextureReady() (texture loaded) +

+Definition at line 744 of file skeleton_model.cpp. +

+References _CLodInstance, _Skins, ItTransformSet, min, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CSkeletonModel::computeRenderedBBox NLMISC::CAABBox  bbox
+
+ + + + + +
+   + + +

+Retrieve the current approx BBox around the skeleton, computed in the last CSene::render(). +

+for all computed bones, extend the bbox with their pos

+Parameters:
+ + +
bbox  +return the bbox of the skinned skeleton, local to the skeleton. If the skeleton was clipped, the bbox is not modified.
+
+Returns:
+true if the bbox is computed, false otherwise.
+

+Definition at line 1435 of file skeleton_model.cpp. +

+References Bones, NL3D::CTransform::getLastClippedState, and isBoneComputed.

+

+ + + + +
+ + + + + + + + + +
IModel* NL3D::CSkeletonModel::creator   [inline, static, private]
+
+ + + + + +
+   + + +

+ +

+Reimplemented from NL3D::CTransformShape. +

+Definition at line 293 of file skeleton_model.h. +

+References CSkeletonModel, and NL3D::IModel::IModel.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::decBoneUsage uint   i,
TBoneUsageType   boneUsageType
+
+ + + + + +
+   + + +

+decrement the refCount of the ith bone. set forced to the same param passed when incBoneUsage(). +

+ +

+Definition at line 212 of file skeleton_model.cpp. +

+References _BoneToComputeDirty, _BoneUsage, nlassert, UsageForced, and UsageNormal. +

+Referenced by decForcedBoneUsageAndParents.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::decForcedBoneUsageAndParents uint   i,
bool   forceCLod
[private]
+
+ + + + + +
+   + + +

+increment the refCount of the ith bone and its parents. for stickObjects. +

+ +

+Definition at line 265 of file skeleton_model.cpp. +

+References Bones, and decBoneUsage. +

+Referenced by detachSkeletonSon.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::detachSkeletonSon CTransform  mi
+
+ + + + + +
+   + + +

+unparent a CTransform from a bone of the skeleton, or unbind a skin. +

+No-op if not a son of this skeleton NB: mi is made son of Root in Traversals Hrc, and change are made at render() for ClipTrav. NB: For Skins, all Hrc/Clip/ValidateList link is done here +

+Definition at line 478 of file skeleton_model.cpp. +

+References _Skins, _StickedObjects, ClipTrav, decForcedBoneUsageAndParents, dirtLodVertexColor, dirtSkinRenderLists, HrcTrav, and nlassert. +

+Referenced by ~CSkeletonModel.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::dirtLodVertexColor   [inline]
+
+ + + + + +
+   + + +

+Called by CTransform::setMeanColor(). +

+ +

+Definition at line 249 of file skeleton_model.h. +

+References _CLodVertexColorDirty. +

+Referenced by bindSkin, detachSkeletonSon, and stickObjectEx.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::dirtSkinRenderLists   [inline]
+
+ + + + + +
+   + + +

+Force the skeletonModel to recompute at next render which skins to render, at wich pass. +

+If you call setOpacity()/setTransparency() on one of the skins binded to the skeleton, you should call this method, else strange result may occurs. NB: this is automatically called by bindSkin()/detachSkeletonSon() +

+Definition at line 128 of file skeleton_model.h. +

+References _SkinToRenderDirty. +

+Referenced by bindSkin, detachSkeletonSon, and resetDefaultMRMDistanceSetup.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::flagBoneAndParents uint32   boneId,
std::vector< bool > &   boneUsage
const
+
+ + + + + +
+   + + +

+This method update boneUsage (must be of size of Bones). +

+It's flag boneUsage[boneId] to true, and all parents of boneId. +

+Definition at line 236 of file skeleton_model.cpp. +

+References Bones, and nlassert.

+

+ + + + +
+ + + + + + + + + + +
const NLMISC::CMatrix & NL3D::CSkeletonModel::getActiveBoneSkinMatrix uint   boneId const
+
+ + + + + +
+   + + +

+if Bones[boneId] is "Computed" (usage/lod), return Bones[boneId].getBoneSkinMatrix() else return parent ones (recurs, but precomputed). +

+ +

+Definition at line 383 of file skeleton_model.cpp. +

+References _BoneUsage, and Bones.

+

+ + + + +
+ + + + + + + + + + +
sint32 NL3D::CSkeletonModel::getBoneIdByName const std::string &   name const
+
+ + + + + +
+   + + +

+return, from skeleton shape, the BoneIdByName. -1 if not here. +

+ +

+Definition at line 536 of file skeleton_model.cpp. +

+References CSkeletonShape, and NL3D::CTransformShape::Shape.

+

+ + + + +
+ + + + + + + + + +
float NL3D::CSkeletonModel::getInterpolationDistance   const
+
+ + + + + +
+   + + +

+see setInterpolationDistance(). +

+ +

+Definition at line 555 of file skeleton_model.cpp. +

+References _LodInterpMultiplier.

+

+ + + + +
+ + + + + + + + + +
uint NL3D::CSkeletonModel::getLodCharacterAnimId   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 214 of file skeleton_model.h. +

+References _CLodInstance.

+

+ + + + +
+ + + + + + + + + +
TGlobalAnimationTime NL3D::CSkeletonModel::getLodCharacterAnimTime   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 216 of file skeleton_model.h. +

+References _CLodInstance, and NL3D::TGlobalAnimationTime.

+

+ + + + +
+ + + + + + + + + +
float NL3D::CSkeletonModel::getLodCharacterDistance   const [inline]
+
+ + + + + +
+   + + +

+see setLodCharacterDistance. 0 if disabled. +

+ +

+Definition at line 234 of file skeleton_model.h. +

+References _LodCharacterDistance.

+

+ + + + +
+ + + + + + + + + +
sint NL3D::CSkeletonModel::getLodCharacterShape   const [inline]
+
+ + + + + +
+   + + +

+see setLodCharacterShape. +

+ +

+Definition at line 210 of file skeleton_model.h. +

+References _CLodInstance.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CSkeletonModel::getLodCharacterWrapMode   const [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 220 of file skeleton_model.h. +

+References _CLodInstance.

+

+ + + + +
+ + + + + + + + + +
uint NL3D::CSkeletonModel::getNumBoneComputed   const [inline]
+
+ + + + + +
+   + + +

+return the number of bones currently animated/computed (because of bindSkin()/stickObject() / Lod system). +

+ +

+Definition at line 162 of file skeleton_model.h. +

+References _BoneToCompute.

+

+ + + + +
+ + + + + + + + + + +
float NL3D::CSkeletonModel::getNumTriangles float   distance [virtual]
+
+ + + + + +
+   + + +

+Special version for skins. +

+ +

+Reimplemented from NL3D::CTransformShape. +

+Definition at line 1393 of file skeleton_model.cpp. +

+References _LevelDetail, and isDisplayedAsLodCharacter.

+

+ + + + +
+ + + + + + + + + +
const CLightContribution& NL3D::CSkeletonModel::getSkeletonLightContribution   [inline, private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 404 of file skeleton_model.h. +

+References NL3D::CTransform::_LightContribution.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::incBoneUsage uint   i,
TBoneUsageType   boneUsageType
+
+ + + + + +
+   + + +

+increment the refCount of the ith bone. +

+set boneUsageType to UsageNormal if enable Skeleton Bone degradation (skins) Forced usage are for Sticked objects +

+Definition at line 188 of file skeleton_model.cpp. +

+References _BoneToComputeDirty, _BoneUsage, nlassert, UsageForced, and UsageNormal. +

+Referenced by incForcedBoneUsageAndParents.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::incForcedBoneUsageAndParents uint   i,
bool   forceCLod
[private]
+
+ + + + + +
+   + + +

+increment the refCount of the ith bone and its parents. for stickObjects. +

+ +

+Definition at line 252 of file skeleton_model.cpp. +

+References Bones, and incBoneUsage. +

+Referenced by stickObjectEx.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::initBoneUsages   [private]
+
+ + + + + +
+   + + +

+called by CSkeletonShape::createInstance(). init the vector. +

+ +

+Definition at line 164 of file skeleton_model.cpp. +

+References _BoneToCompute, _BoneToComputeDirty, _BoneUsage, _CurLod, _CurLodInterp, _LodInterpMultiplier, and Bones.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::initModel   [protected, virtual]
+
+ + + + + +
+   + + +

+Build link to traversals. +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 148 of file skeleton_model.cpp. +

+References _ItSkeletonInScene, ClipTrav, NL3D::IModel::getObs, HrcTrav, and NL3D::IModel::IObs.

+

+ + + + +
+ + + + + + + + + + +
bool NL3D::CSkeletonModel::isBoneComputed uint   boneId const
+
+ + + + + +
+   + + +

+Tell if a bone has been computed in the last frame or not. false if boneId is invalid. +

+ +

+Definition at line 373 of file skeleton_model.cpp. +

+References _BoneUsage. +

+Referenced by computeRenderedBBox.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CSkeletonModel::isClipVisible   const [inline]
+
+ + + + + +
+   + + +

+tells if the skeleton has been clipped in the clip traversal. +

+ +

+Definition at line 302 of file skeleton_model.h. +

+References NL3D::CTransform::_ClipObs. +

+Referenced by computeDisplayLodCharacterPriority.

+

+ + + + +
+ + + + + + + + + +
bool NL3D::CSkeletonModel::isDisplayedAsLodCharacter   const [inline]
+
+ + + + + +
+   + + +

+True if the skeleton model and his skins are to be displayed with a CLodCharacterShape, instead of the std way This state is modified early during the HRC Traversal. +

+Because Clip traversal need this result. +

+Definition at line 226 of file skeleton_model.h. +

+References _DisplayedAsLodCharacter. +

+Referenced by getNumTriangles, and updateBoneToCompute.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::registerBasic   [static]
+
+ + + + + +
+   + + +

+Call at the begining of the program, to register the model, and the basic observers. +

+ +

+Reimplemented from NL3D::CTransformShape. +

+Definition at line 55 of file skeleton_model.cpp. +

+References NL3D::AnimDetailTravId, NL3D::RenderTravId, NL3D::SkeletonModelId, and NL3D::TransformShapeId.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::registerToChannelMixer CChannelMixer  chanMixer,
const std::string &   prefix
[virtual]
+
+ + + + + +
+   + + +

+register transform channels (in global anim mode). +

+

+See also:
+setChannelMixerOwnerShip
+

+Reimplemented from NL3D::CTransform. +

+Definition at line 64 of file skeleton_model.cpp. +

+References Bones.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::resetDefaultMRMDistanceSetup  
+
+ + + + + +
+   + + +

+Reset the Default MRM setup: follow MAX skin setup (ie the finer). +

+ +

+Definition at line 1425 of file skeleton_model.cpp. +

+References _DefaultMRMSetup, and dirtSkinRenderLists.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setDisplayLodCharacterFlag bool   displayCLod
+
+ + + + + +
+   + + +

+Called in ClipTrav pass. +

+setup the flag. +

+Definition at line 892 of file skeleton_model.cpp. +

+References _BoneToComputeDirty, _CLodInstance, _DisplayedAsLodCharacter, and _LodCharacterDistance.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setInterpolationDistance float   dist
+
+ + + + + +
+   + + +

+change the Lod Bone interpolation distance (in meters). +

+If 0, interpolation is disabled. The smaller this value is, the more Lod skeleton system will "pop". Default is 0.5 meters. +

+Definition at line 544 of file skeleton_model.cpp. +

+References _LodInterpMultiplier.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setLodCharacterAnimId uint   animId
+
+ + + + + +
+   + + +

+Change/get the Character Lod anim setup. +

+ +

+Definition at line 831 of file skeleton_model.cpp. +

+References _CLodInstance.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setLodCharacterAnimTime TGlobalAnimationTime   time
+
+ + + + + +
+   + + +

+ +

+Definition at line 837 of file skeleton_model.cpp. +

+References _CLodInstance, and NL3D::TGlobalAnimationTime.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setLodCharacterDistance float   dist
+
+ + + + + +
+   + + +

+This is the distance at which the skeleton use a CLodCharacterShape to display himself if 0, never display the skeleton as a CLodCharacterShape. +

+ +

+Definition at line 705 of file skeleton_model.cpp. +

+References _LodCharacterDistance, and _OOLodCharacterDistance.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setLodCharacterShape sint   shapeId
+
+ + + + + +
+   + + +

+Change the Character Lod shape Id. set -1 if want to disable the feature (default). +

+ +

+Definition at line 715 of file skeleton_model.cpp. +

+References _CLodInstance. +

+Referenced by ~CSkeletonModel.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CSkeletonModel::setLodCharacterWrapMode bool   wrapMode
+
+ + + + + +
+   + + +

+tells if the animation must loop or clamp. +

+ +

+Definition at line 843 of file skeleton_model.cpp. +

+References _CLodInstance.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::stickObject CTransform  mi,
uint   boneId
+
+ + + + + +
+   + + +

+parent a CTransform to a bone of the skeleton. +

+NB: ~CTransform() calls detachSkeletonSon(). NB: nlassert() if there is too many skins/sticked objects on this skeleton (more than 255). NB: an object can't be skinned and sticked at same time :) NB: replaced if already here. NB: mi is made son of skeleton model in Traversals Hrc, and change are made at render() for ClipTrav. +

+Definition at line 441 of file skeleton_model.cpp. +

+References stickObjectEx.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CSkeletonModel::stickObjectEx CTransform  mi,
uint   boneId,
bool   forceCLod
+
+ + + + + +
+   + + +

+same method as stickObject(), but if you set forceCLod as true, then this object will be visible even if the skeleton father is in CLod state (ie displayed with a CLodCharacterShape) NB: if "mi" is a skeleton model, forceCLod is considerer true, whatever the value passed in. +

+ +

+Definition at line 447 of file skeleton_model.cpp. +

+References _StickedObjects, ClipTrav, dirtLodVertexColor, HrcTrav, incForcedBoneUsageAndParents, and nlassert. +

+Referenced by stickObject.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::updateBoneToCompute   [private]
+
+ + + + + +
+   + + +

+According to Usage, ForedUsage and current skeleton Lod, update MustCompute and ValidBoneSkinMatrix. +

+ +

+Definition at line 279 of file skeleton_model.cpp. +

+References _BoneToCompute, _BoneToComputeDirty, _BoneUsage, _CurLod, _LodInterpMultiplier, Bones, CSkeletonShape, NL3D::CTransform::getChannelMixer, isDisplayedAsLodCharacter, and NL3D::CTransformShape::Shape.

+

+ + + + +
+ + + + + + + + + +
void NL3D::CSkeletonModel::updateSkinRenderLists  
+
+ + + + + +
+   + + +

+ +

+Definition at line 1010 of file skeleton_model.cpp. +

+References _AnimDetailSkins, _LevelDetail, _OpaqueSkins, _Skins, _SkinToRenderDirty, _TransparentSkins, buildDefaultLevelDetail, NLMISC::CObjectVector< CTransform *, false >::clear, NL3D::CTransform::CTransform, NL3D::CTransformShape::CTransformShape, ItTransformSet, nlassert, NLMISC::CObjectVector< CTransform *, false >::resize, and NL3D::CTransform::setTransparency.

+


Friends And Related Function Documentation

+

+ + + + +
+ + +
friend class CSkeletonModelAnimDetailObs [friend] +
+
+ + + + + +
+   + + +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 295 of file skeleton_model.h.

+

+ + + + +
+ + +
friend class CSkeletonModelRenderObs [friend] +
+
+ + + + + +
+   + + +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 296 of file skeleton_model.h.

+

+ + + + +
+ + +
friend class CSkeletonShape [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 294 of file skeleton_model.h. +

+Referenced by getBoneIdByName, and updateBoneToCompute.

+

+ + + + +
+ + +
friend class CTransformClipObs [friend] +
+
+ + + + + +
+   + + +

+ +

+Reimplemented from NL3D::CTransform. +

+Definition at line 297 of file skeleton_model.h.

+


Member Data Documentation

+

+ + + + +
+ + +
TTransformArray NL3D::CSkeletonModel::_AnimDetailSkins [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 332 of file skeleton_model.h. +

+Referenced by updateSkinRenderLists.

+

+ + + + +
+ + +
std::vector<CBoneCompute> NL3D::CSkeletonModel::_BoneToCompute [private] +
+
+ + + + + +
+   + + +

+List of bones to compute. +

+ +

+Definition at line 375 of file skeleton_model.h. +

+Referenced by getNumBoneComputed, initBoneUsages, and updateBoneToCompute.

+

+ + + + +
+ + +
bool NL3D::CSkeletonModel::_BoneToComputeDirty [private] +
+
+ + + + + +
+   + + +

+Flag set if the MRSkeleton lod change, or if a new bone Usage change (only if was 0 or become 0). +

+ +

+Definition at line 377 of file skeleton_model.h. +

+Referenced by decBoneUsage, incBoneUsage, initBoneUsages, setDisplayLodCharacterFlag, and updateBoneToCompute.

+

+ + + + +
+ + +
std::vector<CBoneUsage> NL3D::CSkeletonModel::_BoneUsage [private] +
+
+ + + + + +
+   + + +

+The list of BoneUsage. Updated by Meshes, stickObject(), and lod changes. +

+ +

+Definition at line 373 of file skeleton_model.h. +

+Referenced by computeCurrentBBox, decBoneUsage, getActiveBoneSkinMatrix, incBoneUsage, initBoneUsages, isBoneComputed, and updateBoneToCompute.

+

+ + + + +
+ + +
CLodCharacterInstance NL3D::CSkeletonModel::_CLodInstance [private] +
+
+ + + + + +
+   + + +

+The Lod instance. -1 by default. +

+ +

+Definition at line 416 of file skeleton_model.h. +

+Referenced by computeCLodVertexColors, computeDisplayLodCharacterPriority, computeLodTexture, getLodCharacterAnimId, getLodCharacterAnimTime, getLodCharacterShape, getLodCharacterWrapMode, setDisplayLodCharacterFlag, setLodCharacterAnimId, setLodCharacterAnimTime, setLodCharacterShape, and setLodCharacterWrapMode.

+

+ + + + +
+ + +
bool NL3D::CSkeletonModel::_CLodVertexColorDirty [private] +
+
+ + + + + +
+   + + +

+dirt when a bindSkin/stickObject/detachSkeletonSon is called dirt when a transform mean color is changed. +

+ +

+Definition at line 421 of file skeleton_model.h. +

+Referenced by CSkeletonModel, and dirtLodVertexColor.

+

+ + + + +
+ + +
uint NL3D::CSkeletonModel::_CurLod [private] +
+
+ + + + + +
+   + + +

+The current lod activated for this skeleton. +

+ +

+Definition at line 379 of file skeleton_model.h. +

+Referenced by initBoneUsages, and updateBoneToCompute.

+

+ + + + +
+ + +
float NL3D::CSkeletonModel::_CurLodInterp [private] +
+
+ + + + + +
+   + + +

+The current lod Interpolation Value for this skeleton. +

+ +

+Definition at line 381 of file skeleton_model.h. +

+Referenced by initBoneUsages.

+

+ + + + +
+ + +
bool NL3D::CSkeletonModel::_DefaultMRMSetup [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 326 of file skeleton_model.h. +

+Referenced by changeMRMDistanceSetup, CSkeletonModel, and resetDefaultMRMDistanceSetup.

+

+ + + + +
+ + +
bool NL3D::CSkeletonModel::_DisplayedAsLodCharacter [private] +
+
+ + + + + +
+   + + +

+True if the skeleton model and his skins have to be displayed with a CLodCharacterShape, instead of the std way This state is modified early during the HRC Traversal. +

+Because Clip traversal need this result. +

+Definition at line 409 of file skeleton_model.h. +

+Referenced by CSkeletonModel, isDisplayedAsLodCharacter, and setDisplayLodCharacterFlag.

+

+ + + + +
+ + +
std::list<CSkeletonModel*>::iterator NL3D::CSkeletonModel::_ItSkeletonInScene [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 313 of file skeleton_model.h. +

+Referenced by initModel, and ~CSkeletonModel.

+

+ + + + +
+ + +
CMRMLevelDetail NL3D::CSkeletonModel::_LevelDetail [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 335 of file skeleton_model.h. +

+Referenced by buildDefaultLevelDetail, changeMRMDistanceSetup, getNumTriangles, and updateSkinRenderLists.

+

+ + + + +
+ + +
float NL3D::CSkeletonModel::_LodCharacterDistance [private] +
+
+ + + + + +
+   + + +

+see setLodCharacterDistance. +

+ +

+Definition at line 412 of file skeleton_model.h. +

+Referenced by computeDisplayLodCharacterPriority, CSkeletonModel, getLodCharacterDistance, setDisplayLodCharacterFlag, and setLodCharacterDistance.

+

+ + + + +
+ + +
float NL3D::CSkeletonModel::_LodInterpMultiplier [private] +
+
+ + + + + +
+   + + +

+For lod interpolation. Inverse of distance. If 0, disable interpolation. +

+ +

+Definition at line 383 of file skeleton_model.h. +

+Referenced by getInterpolationDistance, initBoneUsages, setInterpolationDistance, and updateBoneToCompute.

+

+ + + + +
+ + +
float NL3D::CSkeletonModel::_OOLodCharacterDistance [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 413 of file skeleton_model.h. +

+Referenced by computeDisplayLodCharacterPriority, CSkeletonModel, and setLodCharacterDistance.

+

+ + + + +
+ + +
TTransformArray NL3D::CSkeletonModel::_OpaqueSkins [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 329 of file skeleton_model.h. +

+Referenced by updateSkinRenderLists.

+

+ + + + +
+ + +
TTransformSet NL3D::CSkeletonModel::_Skins [private] +
+
+ + + + + +
+   + + +

+The skins. +

+ +

+Definition at line 319 of file skeleton_model.h. +

+Referenced by bindSkin, computeCLodVertexColors, computeLodTexture, detachSkeletonSon, updateSkinRenderLists, and ~CSkeletonModel.

+

+ + + + +
+ + +
bool NL3D::CSkeletonModel::_SkinToRenderDirty [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 324 of file skeleton_model.h. +

+Referenced by CSkeletonModel, dirtSkinRenderLists, and updateSkinRenderLists.

+

+ + + + +
+ + +
TTransformSet NL3D::CSkeletonModel::_StickedObjects [private] +
+
+ + + + + +
+   + + +

+The StickedObjects. +

+ +

+Definition at line 321 of file skeleton_model.h. +

+Referenced by computeCLodVertexColors, detachSkeletonSon, stickObjectEx, and ~CSkeletonModel.

+

+ + + + +
+ + +
TTransformArray NL3D::CSkeletonModel::_TransparentSkins [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 330 of file skeleton_model.h. +

+Referenced by updateSkinRenderLists.

+

+ + + + +
+ + +
std::vector<CBone> NL3D::CSkeletonModel::Bones +
+
+ + + + + +
+   + + +

+The list of CBone, created from the CSkeletonShape. +

+They are odered in depth-first order. +

+Definition at line 75 of file skeleton_model.h. +

+Referenced by computeAllBones, computeCLodVertexColors, computeCurrentBBox, computeRenderedBBox, decForcedBoneUsageAndParents, flagBoneAndParents, getActiveBoneSkinMatrix, incForcedBoneUsageAndParents, initBoneUsages, registerToChannelMixer, and updateBoneToCompute.

+

+ + + + +
+ + +
CClipTrav* NL3D::CSkeletonModel::ClipTrav [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 431 of file skeleton_model.h. +

+Referenced by bindSkin, computeDisplayLodCharacterPriority, CSkeletonModel, detachSkeletonSon, initModel, stickObjectEx, and ~CSkeletonModel.

+

+ + + + +
+ + +
CHrcTrav* NL3D::CSkeletonModel::HrcTrav [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 430 of file skeleton_model.h. +

+Referenced by bindSkin, CSkeletonModel, detachSkeletonSon, initModel, and stickObjectEx.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1