|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CSkeletonUser Class ReferenceUSkeleton implementation.
More...
#include <skeleton_user.h>
Inheritance diagram for NL3D::CSkeletonUser:
List of all members.
Public Methods |
|
| CSkeletonUser (CScene *scene, IModel *model) |
| This model should have been created with Scene::createInstance(). More...
|
virtual | ~CSkeletonUser () |
|
virtual bool | bindSkin (UInstance *mi) |
| bind a MeshInstance skin to the skeleton. More...
|
virtual void | stickObject (UTransform *mi, uint boneId) |
| parent a CTransform to a bone of the skeleton. More...
|
virtual void | stickObjectEx (UTransform *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...
|
virtual void | detachSkeletonSon (UTransform *mi) |
| unparent a CTransform from a bone of the skeleton, or unbind a skin. More...
|
|
virtual uint | getNumBones () const |
| retrieve the number of bones. More...
|
virtual UBone & | getBone (uint boneId) |
| retrieve the bone. nlerror if not here. (>=getNumBones()). More...
|
virtual sint | getBoneIdByName (const std::string &boneName) const |
| retrieve the bone Id, by his name. -1 if not found. More...
|
virtual bool | isBoneComputed (uint boneId) const |
| Tell if a bone has been computed in the last frame or not. false if boneId is invalid. More...
|
|
virtual uint | getNumBoneComputed () const |
| return the number of bones currently animated/computed (because of bindSkin()/stickObject() / Lod system). More...
|
virtual void | setInterpolationDistance (float dist) |
| change the Lod Bone interpolation distance (in meters). More...
|
virtual float | getInterpolationDistance () const |
| see setInterpolationDistance(). More...
|
virtual void | setShapeDistMax (float distMax) |
| Change Max Display Skeleton distance. More...
|
virtual float | getShapeDistMax () const |
| see setShapeDistMax(). More...
|
virtual void | changeMRMDistanceSetup (float distanceFinest, float distanceMiddle, float distanceCoarsest) |
| Special version for skins. More...
|
|
virtual void | setLodCharacterShape (sint shapeId) |
| Change the Character Lod shape Id. More...
|
virtual sint | getLodCharacterShape () const |
| see setLodCharacterShape. More...
|
virtual void | setLodCharacterAnimId (uint animId) |
| Change/get the Character Lod anim setup. More...
|
virtual uint | getLodCharacterAnimId () const |
virtual void | setLodCharacterAnimTime (TGlobalAnimationTime time) |
virtual TGlobalAnimationTime | getLodCharacterAnimTime () const |
virtual bool | isDisplayedAsLodCharacter () const |
| True if the skeleton model and his skins have been displayed with a CLodCharacterShape at last scene render. More...
|
virtual 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...
|
virtual float | getLodCharacterDistance () const |
| see setLodCharacterDistance. 0 if disabled. More...
|
virtual void | setLodCharacterWrapMode (bool wrapMode) |
| tells if the animation must loop or clamp. More...
|
virtual bool | getLodCharacterWrapMode () const |
virtual 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...
|
|
virtual bool | computeRenderedBBox (NLMISC::CAABBox &bbox) |
| Retrieve the current approx BBox around the skeleton, computed in the last USene::render(). More...
|
virtual bool | computeCurrentBBox (NLMISC::CAABBox &bbox, UPlayList *playList, double playTime=0, bool forceCompute=false) |
| same as computeRenderedBBox() but force animation and compute of all bones => don't need render(), but slower. More...
|
|
CSkeletonModel * | getSkeleton () |
Public Attributes |
CSkeletonModel * | _Skeleton |
| This is the SAME pointer than _Transform, but correctly casted. More...
|
std::vector< CBoneUser > | _Bones |
| This is a mirror of _Skeleton->Bones. More...
|
Detailed Description
USkeleton implementation.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2001
Definition at line 51 of file skeleton_user.h.
Constructor & Destructor Documentation
NL3D::CSkeletonUser::CSkeletonUser |
( |
CScene * |
scene, |
|
|
IModel * |
model |
|
) |
[inline] |
|
virtual NL3D::CSkeletonUser::~CSkeletonUser |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
bool NL3D::CSkeletonUser::bindSkin |
( |
UInstance * |
mi |
) |
[virtual] |
|
void NL3D::CSkeletonUser::changeMRMDistanceSetup |
( |
float |
distanceFinest, |
|
|
float |
distanceMiddle, |
|
|
float |
distanceCoarsest |
|
) |
[virtual] |
|
|
Special version for skins.
NB: skins never follow their original MRM distance setup, but follow this skeleton MRM setup. Default is 3-10-50. NB: Unlike UInstance::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. |
Implements NL3D::USkeleton.
Definition at line 256 of file skeleton_user.cpp.
References _Skeleton, NL3D_HAUTO_UI_SKELETON, and NL3D_MEM_SKELETON. |
bool NL3D::CSkeletonUser::computeCurrentBBox |
( |
NLMISC::CAABBox & |
bbox, |
|
|
UPlayList * |
playList, |
|
|
double |
playTime = 0, |
|
|
bool |
forceCompute = false |
|
) |
[virtual] |
|
|
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. |
playList |
set NULL if no one, else this playList will be played at the time playTime |
forceCompute |
force evaluation of bbox even if not skinned |
-
Returns:
-
true if the bbox is computed, false otherwise.
Implements NL3D::USkeleton.
Definition at line 272 of file skeleton_user.cpp.
References _Skeleton, NL3D_HAUTO_UI_SKELETON, and NL3D_MEM_SKELETON. |
void NL3D::CSkeletonUser::computeLodTexture |
( |
|
) |
[virtual] |
|
|
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)
Implements NL3D::USkeleton.
Definition at line 286 of file skeleton_user.cpp.
References _Skeleton, NL3D_HAUTO_UI_SKELETON, and NL3D_MEM_SKELETON. |
bool NL3D::CSkeletonUser::computeRenderedBBox |
( |
NLMISC::CAABBox & |
bbox |
) |
[virtual] |
|
|
Retrieve the current approx BBox around the skeleton, computed in the last USene::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.
Implements NL3D::USkeleton.
Definition at line 265 of file skeleton_user.cpp.
References _Skeleton, NL3D_HAUTO_UI_SKELETON, and NL3D_MEM_SKELETON. |
void NL3D::CSkeletonUser::detachSkeletonSon |
( |
UTransform * |
mi |
) |
[virtual] |
|
UBone & NL3D::CSkeletonUser::getBone |
( |
uint |
boneId |
) |
[virtual] |
|
sint NL3D::CSkeletonUser::getBoneIdByName |
( |
const std::string & |
boneName |
) |
const [virtual] |
|
float NL3D::CSkeletonUser::getInterpolationDistance |
( |
|
) |
const [virtual] |
|
uint NL3D::CSkeletonUser::getLodCharacterAnimId |
( |
|
) |
const [virtual] |
|
float NL3D::CSkeletonUser::getLodCharacterDistance |
( |
|
) |
const [virtual] |
|
sint NL3D::CSkeletonUser::getLodCharacterShape |
( |
|
) |
const [virtual] |
|
bool NL3D::CSkeletonUser::getLodCharacterWrapMode |
( |
|
) |
const [virtual] |
|
uint NL3D::CSkeletonUser::getNumBoneComputed |
( |
|
) |
const [virtual] |
|
uint NL3D::CSkeletonUser::getNumBones |
( |
|
) |
const [virtual] |
|
float NL3D::CSkeletonUser::getShapeDistMax |
( |
|
) |
const [virtual] |
|
bool NL3D::CSkeletonUser::isBoneComputed |
( |
uint |
boneId |
) |
const [virtual] |
|
bool NL3D::CSkeletonUser::isDisplayedAsLodCharacter |
( |
|
) |
const [virtual] |
|
void NL3D::CSkeletonUser::setInterpolationDistance |
( |
float |
dist |
) |
[virtual] |
|
void NL3D::CSkeletonUser::setLodCharacterAnimId |
( |
uint |
animId |
) |
[virtual] |
|
void NL3D::CSkeletonUser::setLodCharacterDistance |
( |
float |
dist |
) |
[virtual] |
|
void NL3D::CSkeletonUser::setLodCharacterShape |
( |
sint |
shapeId |
) |
[virtual] |
|
void NL3D::CSkeletonUser::setLodCharacterWrapMode |
( |
bool |
wrapMode |
) |
[virtual] |
|
void NL3D::CSkeletonUser::setShapeDistMax |
( |
float |
distMax |
) |
[virtual] |
|
|
Change Max Display Skeleton distance.
After this distance the shape won't be displayed. setting <0 means -1 and so means DistMax = infinite (default in meshs but multilod meshes). NB: This apply to the shape direclty!! ie All instances using same shape will be affected
Note: If the skeleton himself is sticked to an other skeleton, this setup is not taken into account. ie the skeleton clip follow the ancestor skeleton clip result (ie the first skeleton in hierarchy which is not sticked).
Note (complex): same remark for QuadGridClipManager interaction with this function as in UInstance::setShapeDistMax()
Implements NL3D::USkeleton.
Definition at line 70 of file skeleton_user.cpp.
References _Skeleton, NL3D_HAUTO_UI_SKELETON, and NL3D_MEM_SKELETON. |
void NL3D::CSkeletonUser::stickObject |
( |
UTransform * |
mi, |
|
|
uint |
boneId |
|
) |
[virtual] |
|
void NL3D::CSkeletonUser::stickObjectEx |
( |
UTransform * |
mi, |
|
|
uint |
boneId, |
|
|
bool |
forceCLod |
|
) |
[virtual] |
|
Member Data Documentation
std::vector<CBoneUser> NL3D::CSkeletonUser::_Bones
|
|
|
This is the SAME pointer than _Transform, but correctly casted.
Definition at line 55 of file skeleton_user.h.
Referenced by bindSkin, changeMRMDistanceSetup, computeCurrentBBox, computeLodTexture, computeRenderedBBox, CSkeletonUser, detachSkeletonSon, getBoneIdByName, getInterpolationDistance, getLodCharacterAnimId, getLodCharacterAnimTime, getLodCharacterDistance, getLodCharacterShape, getLodCharacterWrapMode, getNumBoneComputed, getShapeDistMax, getSkeleton, isBoneComputed, isDisplayedAsLodCharacter, setInterpolationDistance, setLodCharacterAnimId, setLodCharacterAnimTime, setLodCharacterDistance, setLodCharacterShape, setLodCharacterWrapMode, setShapeDistMax, stickObject, stickObjectEx, and ~CSkeletonUser. |
The documentation for this class was generated from the following files:
|
|