#include <adaptor.h>
Inheritance diagram for BoneAdaptor:
Public Types | |
Public Member Functions | |
BoneAdaptor (Skeleton *pkSkeleton, Bone *pkParent, SceneNode *pkNode) | |
BoneAdaptor (BoneAdaptor &rkNode, Skeleton *pkSkeleton, Bone *pkParent) | |
virtual | ~BoneAdaptor () |
virtual void | NotifyUpdate (bool bRecurse=true) |
virtual BoneAdaptor * | Duplicate (Skeleton *pkSkeleton, Bone *pkParent) |
virtual void | Accept (BaseVisitor &rkVisitor)=0 |
virtual Bone * | Duplicate () |
virtual void | SetTranslation (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
virtual void | SetRotation (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
virtual void | SetScaling (float fScaling, bool bNotifyUpdate=true) |
void | SetName (const HashString &rstrName) |
const HashString & | GetName () const |
Bone * | GetParent () |
virtual int | AttachNode (Bone *pkNode, bool bKeepWorldSRT=false) |
virtual int | DetachNode (Bone *pkNode) |
void | DetachFromParent () |
const Vector3d & | GetWorldTranslation () |
const Quaternion & | GetWorldRotation () |
float | GetWorldScaling () |
const Matrix & | GetWorldTransform () |
const Matrix & | GetInverseWorldTransform () |
const std::vector< Bone * > & | GetChildren () |
Bone * | GetByName (const HashString &rstrName, NODESEARCHMODE eMode=BREADTH_FIRST, bool bInitSearch=true) |
virtual void | Traverse (BaseVisitor &rkVisitor, NODESEARCHMODE eMode=DEPTH_FIRST, int iDirection=1, bool bInitSearch=true) |
virtual void | TraverseNode (BaseVisitor &rkVisitor) |
const Vector3d & | GetTranslation () const |
const Quaternion & | GetRotation () const |
float | GetScaling () const |
void | Translate (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | TranslateWorld (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | Rotate (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | RotateWorld (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | Scale (float fScaling, bool bNotifyUpdate=true) |
Public Attributes | |
unsigned int | m_uiID |
Protected Member Functions | |
virtual bool | UpdateWorld () |
virtual Bone * | Get () |
Static Protected Member Functions | |
template<class NodeType> void | AcceptImpl (NodeType &rkVisited, BaseVisitor &rkVisitor) |
Protected Attributes | |
Skeleton * | m_pkSkeleton |
SceneNode * | m_pkSceneNode |
bool | m_bWorldUpdate |
float | m_fWorldScaling |
Quaternion | m_kWorldRotation |
Vector3d | m_kWorldTranslation |
std::vector< Bone * > | m_vpkChildren |
Bone * | m_pkParent |
HashString | m_strName |
Matrix | m_kWorldTransform |
Matrix | m_kInverseWorldTransform |
float | m_fScaling |
Quaternion | m_kRotation |
Vector3d | m_kTranslation |
|
Create adaptor for a scene node
|
|
Create adaptor from reference object (including duplicating child nodes)
|
|
Deallocates child nodes and detaches from parent |
|
Set world update flag. If flag is set, a call to any of the GetWorldScaling, GetWorldRotation, GetWorldTranslation will cause world cache data to be updated. Optionally recurses on all child nodes (default).
Reimplemented from HierarchyNode< Bone >. |
|
Duplicate adaptor
|
|
Accept visitors if implementation available
|
|
Accept a visitor
|
|
Duplicate bone
|
|
Updates cached world-relative SRT data if needed
|
|
Used to get this as correct type
|
|
Set position relative parent node. Will set flag to update world cache data, and optionally recurse and flag child nodes to update data
Reimplemented from SRTNode. |
|
Set rotation relative parent node. Will set flag to update world cache data, and optionally recurse and flag child nodes to update data
Reimplemented from SRTNode. |
|
Set uniform scaling relative parent node. Will set flag to update world cache data, and optionally recurse and flag child nodes to update data
Reimplemented from SRTNode. |
|
Set name
|
|
|
|
|
|
Attach node. If the node is attached to a parent, detach it first. This will cause the node to get it's world SRT data as local SRT data. If bKeepWorldSRT is set, node will be updated with inverse of this (new parent) node's SRT data, effectively keeping it intact in world space. If flag not set, node will effectivaly get new parent world SRT data added to own (used in initialization phase, for example).
|
|
Detach node. The node will store world SRT data in local SRT data.
|
|
Detach this node from parent, if any. Will store world SRT data (and update first if needed) in local SRT data to remain in same world position and orientation. |
|
Get position relative world coordinate system origo. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get rotation relative world unrotated coordinate system. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get total unform scaling factor relative world scale. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get total transform matrix relative world coordinate system origo. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get inverse total transform matrix relative world coordinate system origo. The world SRT data is the combined hierarchial data of any parent nodes and this node.
|
|
Get all child nodes
|
|
Search hierarchy for named node, including this node. Will return first node found along selected search mode.
|
|
Traverse the hierarchy applying the visitor to the nodes.
|
|
Traverse this nodes
|
|
|
|
|
|
|
|
Translate node from current position, in local (along current rotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Translate node from current position, in world (along unrotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in local (current rotation) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in world (unrotated) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Scale node by uniform factor. Will use SetScaling for setting new scaling of node, derived classes do not need to overload this method directly. Must be >0, where a value of 1.0f indicates no scaling
|
|
|
Node type |
|
Bone ID |
|
Flag indicating we need to update world relative SRT information |
|
Total scaling relative world (cached) |
|
Total rotation relative world (cached) |
|
Total translation relative world (cached) |
|
Child nodes |
|
Parent node |
|
Name |
|
Total transformation matrix relative world (cached) |
|
Total inverse transformation matrix relative world (cached) |
|
Uniform scaling factor (must be >0, default 1) |
|
Rotation |
|
Translation |