Instance of a Skeleton, main external interface for retrieving bone positions and applying animations.
More...
#include <OgreSkeletonInstance.h>
Instance of a Skeleton, main external interface for retrieving bone positions and applying animations.
- I.e. if there is 1 root bone with 6 child bones; the root node will be animated solo, the first 4 child bones will be animated at the same time, and the 2 last bones will be animated together in the next loop iteration.
- Note however, when updating bones in the hierarchy to obtain the derived transforms (rather than animating), the root bone will be updated together using SIMD with the root bones from 3 other SkeletonInstances that share the same SkeletonDef. Only animating them has this restriction. The animation system won't be able to "share" though, if the SkeletonDef had 3 root nodes instead of 1; because we need to put them in a SIMD block in a repeating pattern And repeating 3 bones at least twice gives 6 bones, which doesn't fit in SSE2 (though it should in AVX, where ARRAY_PACKED_REALS = 8)
To those interested in the original repository of OgreAnimation to obtain full history, go to: https://bitbucket.org/dark_sylinc/ogreanimation
◆ BoneVec
◆ SkeletonInstance()
◆ ~SkeletonInstance()
Ogre::SkeletonInstance::~SkeletonInstance |
( |
| ) |
|
◆ _decrementRefCount()
void Ogre::SkeletonInstance::_decrementRefCount |
( |
| ) |
|
◆ _disableAnimation()
Internal use. Disables given animation. Input should belong to us and already being animated.
◆ _enableAnimation()
Internal use. Enables given animation. Input should belong to us and not already animated.
◆ _getBoneFullTransform()
FORCEINLINE const SimpleMatrixAf4x3 & Ogre::SkeletonInstance::_getBoneFullTransform |
( |
size_t |
index | ) |
const |
|
inline |
Gets full transform of a bone by its index.
◆ _getMemoryBlock()
const void * Ogre::SkeletonInstance::_getMemoryBlock |
( |
| ) |
const |
◆ _getMemoryUniqueOffset()
const void * Ogre::SkeletonInstance::_getMemoryUniqueOffset |
( |
| ) |
const |
◆ _getRefCount()
uint16 Ogre::SkeletonInstance::_getRefCount |
( |
| ) |
const |
◆ _getTransformArray()
const TransformArray & Ogre::SkeletonInstance::_getTransformArray |
( |
| ) |
const |
|
inline |
◆ _incrementRefCount()
void Ogre::SkeletonInstance::_incrementRefCount |
( |
| ) |
|
◆ _updateBoneStartTransforms()
void Ogre::SkeletonInstance::_updateBoneStartTransforms |
( |
| ) |
|
Updates the contents of SkeletonInstance::mBoneStartTransforms.
Needed when our memory manager performs a cleanup or similar memory change.
◆ addAnimationsFromSkeleton()
void Ogre::SkeletonInstance::addAnimationsFromSkeleton |
( |
const String & |
skelName, |
|
|
const String & |
groupName |
|
) |
| |
Add all animation clips found in skelName.
◆ getActiveAnimations()
Returns all animations that are currently active.
◆ getAnimation()
Returns the requested animations. Throws if not found. O(N) Linear search.
◆ getAnimations()
Return all animations associated with this skeleton.
◆ getAnimationsNonConst()
Return all animations associated with this skeleton Be careful with this one! Do not insert/remove elements.
◆ getBone() [1/2]
Gets the bone with given name. Throws if not found.
◆ getBone() [2/2]
Bone * Ogre::SkeletonInstance::getBone |
( |
size_t |
index | ) |
|
Gets the bone from its index. Don't overflow!.
- See also
- getNumBones
◆ getDefinition()
const SkeletonDef * Ogre::SkeletonInstance::getDefinition |
( |
| ) |
const |
|
inline |
◆ getNumBones()
size_t Ogre::SkeletonInstance::getNumBones |
( |
| ) |
const |
Gets the number of bones.
◆ getParentNode()
Node * Ogre::SkeletonInstance::getParentNode |
( |
| ) |
const |
|
inline |
Returns our parent node. May be null.
◆ getTransforms()
◆ hasAnimation()
bool Ogre::SkeletonInstance::hasAnimation |
( |
IdString |
name | ) |
const |
◆ hasBone()
bool Ogre::SkeletonInstance::hasBone |
( |
IdString |
name | ) |
const |
◆ isManualBone()
bool Ogre::SkeletonInstance::isManualBone |
( |
Bone * |
bone | ) |
|
Returns true if the bone is manually controlled.
- See also
- setManualBone
- Parameters
-
◆ resetToPose()
void Ogre::SkeletonInstance::resetToPose |
( |
| ) |
|
Resets the transform of all bones to the binding pose. Manual bones are not reset.
◆ setManualBone()
void Ogre::SkeletonInstance::setManualBone |
( |
Bone * |
bone, |
|
|
bool |
isManual |
|
) |
| |
Sets the given node to manual.
Manual bones won't be reset to binding pose (see resetToPose) and thus are suitable for manual control. However if the bone is animated, you're responsible for resetting the position/rotation/scale before each call to
- See also
- update
- See also
- SkeletonAnimation::setBoneWeight
- Parameters
-
bone | Bone to set/unset to manual. Must belong to this SkeletonInstance (an assert is triggered on non-release builds). Behavior is undefined if node doesn't belong to this instance. |
isManual | True to set to manual, false to restore it. |
◆ setParentNode()
void Ogre::SkeletonInstance::setParentNode |
( |
Node * |
parentNode | ) |
|
Sets our parent node so that our bones are in World space.
Iterates through all our bones and sets the root bones
◆ setSceneNodeAsParentOfBone()
void Ogre::SkeletonInstance::setSceneNodeAsParentOfBone |
( |
Bone * |
bone, |
|
|
SceneNode * |
nodeParent |
|
) |
| |
Sets a regular SceneNode to be parent of this Bone for manually controlling a bone (e.g.
have a bone follow a character). You may want to also call setManualBone as well to prevent animation on this bone.
- Parameters
-
nodeParent | Node to be parent of this scene node. Use a null pointer to remove the attachment. |
◆ update()
void Ogre::SkeletonInstance::update |
( |
| ) |
|
The documentation for this class was generated from the following file: