SO3Engine
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SO3::SSkeleton Class Reference

#include <SO3Skeleton.h>

Inheritance diagram for SO3::SSkeleton:
SO3::SNode SO3::SData

Public Types

enum  SkeletonAnimationMode { SO3_ANIMBLEND_AVERAGE , SO3_ANIMBLEND_CUMULATIVE }
 
- Public Types inherited from SO3::SNode
enum  NodeType {
  NODE_TYPE_ID = 0 , ENTITY_TYPE_ID = 1 , CAMERA_TYPE_ID = 2 , LIGHT_TYPE_ID = 3 ,
  SKELETON_TYPE_ID = 4 , BONE_TYPE_ID = 5 , PARTICLE_SYSTEM_TYPE_ID = 6 , DYNAMIC_CUBE_MAP_ID = 7 ,
  DYNAMIC_REFLECTION_MAP_ID = 8 , RENDER_TO_TEXTURE_ID = 9 , LINE_ENTITY_TYPE_ID = 10 , VIRTUAL_POINTER_TYPE_ID = 11
}
 
enum  NodeTransformSpace { SO3_LOCAL_TS = 0 , SO3_PARENT_TS = 1 , SO3_WORLD_TS = 2 }
 

Public Member Functions

 SSkeleton (SScene *parent, const std::string &skeletonName, SEntity *parentEntity)
 
 ~SSkeleton ()
 
void Initialise ()
 
void SetBindingPose ()
 
SkeletonAnimationMode GetBlendMode ()
 
void SetBlendMode (const SkeletonAnimationMode &newBlendMode)
 
unsigned short GetNumBones ()
 
SBoneGetBone (const std::string &boneName)
 
SBoneGetBone (const unsigned short &boneIndex)
 
SBoneMap GetBones () const
 
Ogre::SkeletonInstance * GetOgreSkeletonPointer ()
 
SEntityGetParentEntity ()
 
SBoneMap GetRootBones ()
 
void _OnBoneDeletion (SBone *boneInstance)
 
virtual Ogre::Vector3 GetGlobalPosition ()
 
virtual Ogre::Quaternion GetGlobalOrientation ()
 
virtual Ogre::Vector3 GetGlobalScale ()
 
virtual void SetGlobalPosition (const Ogre::Vector3 &pos, bool updateBody=true)
 
virtual void SetGlobalOrientation (const Ogre::Quaternion &quat, bool updateBody=true)
 
- Public Member Functions inherited from SO3::SNode
 SNode (SScene *parent, const std::string &nodeName, const bool &isRootNode=false)
 
virtual ~SNode ()
 
SSceneGetParentScene ()
 
Ogre::SceneNode * GetOgreSceneNodePointer ()
 
Ogre::MovableObject * GetMovableObjectPointer ()
 
bool GetSceneNodeIsMouseForeground ()
 
void SetSceneNodeIsMouseForeground (const bool &mForeground)
 
bool GetSceneNodeIsMouseClick ()
 
void SetSceneNodeIsMouseClick (const bool &mClickable)
 
int GetSceneNodeMouseFlags ()
 
void SetSceneNodeMouseFlags (const int &flags)
 
bool GetSceneNodeHasBody ()
 
SBodyGetSceneNodeBody ()
 
void RestoreStaticGraph ()
 
void SetAsStaticGeometry (const bool &state)
 
bool GetAsStaticGeometry ()
 
Ogre::StaticGeometry * GetStaticGeometry ()
 
void SetFlags (const int &flags)
 
void SetPhysicsOverride (bool state)
 
bool GetPhysicsOverride ()
 
int GetFlags ()
 
void UpdateNodeBody (const bool &bScale)
 
void DisableAutoTarget ()
 
NodeType GetNodeType ()
 
void AttachToParent (SNode *newParentNode)
 
void DetachFromParent ()
 
SNodeGetParentSceneNode ()
 
const SNodeMap GetChildrenNodes () const
 
virtual int GetNumChildren ()
 
void DetachAllChildren ()
 
virtual void SetCastShadows (const bool &castShadows)
 
virtual bool GetCastShadows ()
 
virtual void SetRenderingDistance (const float &distance)
 
virtual float GetRenderingDistance ()
 
virtual Ogre::Vector3 GetBoundingBoxSize (const bool &childs=false)
 
virtual Ogre::Vector3 GetBoundingBoxCenter (const bool &childs=false)
 
virtual Ogre::Vector3 GetWorldBoundingBoxSize (const bool &childs=false)
 
virtual Ogre::Vector3 GetWorldBoundingBoxCenter (const bool &childs=false)
 
virtual Ogre::Matrix4 GetTransformationMatrix ()
 
virtual Ogre::Vector3 GetPosition ()
 
virtual void SetPosition (const Ogre::Vector3 &pos)
 
virtual Ogre::Quaternion GetOrientation ()
 
virtual void SetOrientation (const Ogre::Quaternion &quat)
 
virtual void AddOrientation (const Ogre::Quaternion &quat)
 
virtual Ogre::Vector3 GetScale ()
 
virtual void SetScale (const Ogre::Vector3 &scale)
 
virtual void SetGlobalScale (const Ogre::Vector3 &scale, bool updateBody=true)
 
virtual void StoreInitialPRS ()
 
virtual void ResetToInitialPRS ()
 
void ResetToInitialPosition ()
 
virtual void ResetToInitialOrientation ()
 
void ResetToInitialScale ()
 
virtual Ogre::Vector3 GetInitialPosition ()
 
virtual Ogre::Quaternion GetInitialOrientation ()
 
virtual Ogre::Vector3 GetInitialScale ()
 
bool GetShowBoundingBox ()
 
void SetShowBoundingBox (const bool &showBounding)
 
void SetAutoTracking (const bool &autoTrack, SNode *targetNode=0, const Ogre::Vector3 &localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z, const Ogre::Vector3 &offset=Ogre::Vector3::ZERO)
 
SNodeGetAutoTrackingTarget ()
 
virtual void Pitch (const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS)
 
virtual void Yaw (const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS)
 
virtual void Roll (const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS)
 
virtual void Rotate (const Ogre::Vector3 &axis, const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS)
 
virtual void Translate (const Ogre::Vector3 &d, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_PARENT_TS)
 
void SetDirection (const Ogre::Vector3 &vec, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS, const Ogre::Vector3 &localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z)
 
Ogre::Vector3 GetDirection (bool derived=false, Ogre::Vector3 axis=Ogre::Vector3::NEGATIVE_UNIT_Z)
 
void LookAt (const Ogre::Vector3 &targetPoint, const SNode::NodeTransformSpace &relativeTo, const Ogre::Vector3 &localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z)
 
bool GetVisible ()
 
void SetVisible (const bool &visible, const bool &cascade=true)
 
SNodeAnimationCreateNodeAnimation (const std::string &animationName, const float &animationLength)
 
void DeleteAnimation (SAnim *existingAnimation)
 
size_t GetNumAnimations ()
 
SAnimGetAnimation (const std::string &animationName)
 
SAnimGetAnimation (const unsigned short &animationIndex)
 
SAnimMap GetAnimations () const
 
bool IsAnimated ()
 
Ogre::Vector3 GetPositionFromNode (SNode *nodeRef)
 
Ogre::Quaternion GetOrientationFromNode (SNode *nodeRef)
 
Ogre::Vector3 GetScaleFromNode (SNode *nodeRef)
 
virtual void SetInheritOrientation (const bool &state)
 
virtual bool GetInheritOrientation ()
 
virtual void ResetOrientation ()
 
void DeleteBody ()
 
SBodyCreateBoxBody (const Ogre::Vector3 &boxsetting)
 
SBodyCreateBoxBody (const Ogre::Vector3 &boxsetting, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateConeBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateConeBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateEllipsoidBody (const Ogre::Vector3 &size)
 
SBodyCreateEllipsoidBody (const Ogre::Vector3 &size, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateCapsuleBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateCapsuleBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateCylinderBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateCylinderBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateChamferCylinderBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateChamferCylinderBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreatePyramidBody (const Ogre::Vector3 &size)
 
SBodyCreatePyramidBody (const Ogre::Vector3 &size, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateConvexHullBody (const Ogre::Real &tolerance)
 
SBodyCreateConcaveHullBody (const Ogre::Real &tolerance)
 
SBodyCreateTreeBody (const bool &optimize)
 
bool IsDirty ()
 
void SetDirty (bool state)
 
void UpdateNodeFromBody ()
 
void ResetNode ()
 
- Public Member Functions inherited from SO3::SData
 SData (const std::string &dataName)
 
virtual ~SData ()
 
std::string GetName () const
 
SUserObjectBindingsGetUserObjectBindings ()
 
const SUserObjectBindingsGetUserObjectBindings () const
 

Protected Member Functions

void AddBone (SBone *existingBone)
 
void RemoveBone (SBone *existingBone)
 
void RemoveBone (const std::string &boneName)
 
- Protected Member Functions inherited from SO3::SNode
 SNode (SScene *parent, const std::string &nodeName, const NodeType &nodeType)
 
void AddAnimation (SAnim *existingAnimation)
 
void RemoveAnimation (SAnim *existingAnimation)
 
void RemoveAnimation (const std::string &animationName)
 
Ogre::Vector3 GetSonsBoundingBox ()
 
Ogre::Vector3 GetSonsWorldBoundingBox ()
 

Protected Attributes

SEntitylinkedEntity
 
Ogre::Entity * ogreLinkedEntity
 
SBoneMap boneList
 
SBoneMap rootBonesList
 
SBoneIndexMap boneListByIndex
 
- Protected Attributes inherited from SO3::SNode
SScenecurrentScene
 
Ogre::SceneNode * O3SceneNode
 
Ogre::MovableObject * ogreMovableObject
 
SBodynodeBody
 
unsigned short animationCounter
 
Ogre::Vector3 initialPosition
 
Ogre::Quaternion initialOrientation
 
Ogre::Vector3 initialScale
 
- Protected Attributes inherited from SO3::SData
std::string name
 

Detailed Description

Definition at line 41 of file SO3Skeleton.h.

Member Enumeration Documentation

◆ SkeletonAnimationMode

Enumerator
SO3_ANIMBLEND_AVERAGE 
SO3_ANIMBLEND_CUMULATIVE 

Definition at line 44 of file SO3Skeleton.h.

Constructor & Destructor Documentation

◆ SSkeleton()

SO3::SSkeleton::SSkeleton ( SScene parent,
const std::string &  skeletonName,
SEntity parentEntity 
)

Definition at line 17 of file SO3Skeleton.cpp.

◆ ~SSkeleton()

SO3::SSkeleton::~SSkeleton ( )

Definition at line 128 of file SO3Skeleton.cpp.

Member Function Documentation

◆ _OnBoneDeletion()

void SO3::SSkeleton::_OnBoneDeletion ( SBone boneInstance)

Hack to avoid problems at bone destruction, SBone internal use only.

Definition at line 214 of file SO3Skeleton.cpp.

◆ AddBone()

void SO3::SSkeleton::AddBone ( SBone existingBone)
protected

Add a SBone object to the list of handled bones.

Definition at line 166 of file SO3Skeleton.cpp.

◆ GetBlendMode()

SSkeleton::SkeletonAnimationMode SO3::SSkeleton::GetBlendMode ( )

Definition at line 154 of file SO3Skeleton.cpp.

◆ GetBone() [1/2]

SBone * SO3::SSkeleton::GetBone ( const std::string &  boneName)

Definition at line 229 of file SO3Skeleton.cpp.

◆ GetBone() [2/2]

SBone * SO3::SSkeleton::GetBone ( const unsigned short &  boneIndex)

Definition at line 238 of file SO3Skeleton.cpp.

◆ GetBones()

SBoneMap SO3::SSkeleton::GetBones ( ) const

Definition at line 247 of file SO3Skeleton.cpp.

◆ GetGlobalOrientation()

Ogre::Quaternion SO3::SSkeleton::GetGlobalOrientation ( )
virtual

Get the node orientation in global space terms.

Reimplemented from SO3::SNode.

Definition at line 272 of file SO3Skeleton.cpp.

◆ GetGlobalPosition()

Ogre::Vector3 SO3::SSkeleton::GetGlobalPosition ( )
virtual

Get the node position in global space terms.

Reimplemented from SO3::SNode.

Definition at line 267 of file SO3Skeleton.cpp.

◆ GetGlobalScale()

Ogre::Vector3 SO3::SSkeleton::GetGlobalScale ( )
virtual

Get the node scale in global space terms.

Reimplemented from SO3::SNode.

Definition at line 277 of file SO3Skeleton.cpp.

◆ GetNumBones()

unsigned short SO3::SSkeleton::GetNumBones ( )

Definition at line 224 of file SO3Skeleton.cpp.

◆ GetOgreSkeletonPointer()

Ogre::SkeletonInstance * SO3::SSkeleton::GetOgreSkeletonPointer ( )

Definition at line 252 of file SO3Skeleton.cpp.

◆ GetParentEntity()

SEntity * SO3::SSkeleton::GetParentEntity ( )

Definition at line 257 of file SO3Skeleton.cpp.

◆ GetRootBones()

SBoneMap SO3::SSkeleton::GetRootBones ( )

Definition at line 262 of file SO3Skeleton.cpp.

◆ Initialise()

void SO3::SSkeleton::Initialise ( )

Definition at line 34 of file SO3Skeleton.cpp.

◆ RemoveBone() [1/2]

void SO3::SSkeleton::RemoveBone ( const std::string &  boneName)
protected

Remove a SBone object from the list of handled bones.

Definition at line 187 of file SO3Skeleton.cpp.

◆ RemoveBone() [2/2]

void SO3::SSkeleton::RemoveBone ( SBone existingBone)
protected

Remove a SBone object from the list of handled bones.

Definition at line 182 of file SO3Skeleton.cpp.

◆ SetBindingPose()

void SO3::SSkeleton::SetBindingPose ( )

Definition at line 148 of file SO3Skeleton.cpp.

◆ SetBlendMode()

void SO3::SSkeleton::SetBlendMode ( const SkeletonAnimationMode newBlendMode)

Definition at line 160 of file SO3Skeleton.cpp.

◆ SetGlobalOrientation()

void SO3::SSkeleton::SetGlobalOrientation ( const Ogre::Quaternion &  quat,
bool  updateBody = true 
)
virtual

Set the node orientation in global space terms.

Reimplemented from SO3::SNode.

Definition at line 287 of file SO3Skeleton.cpp.

◆ SetGlobalPosition()

void SO3::SSkeleton::SetGlobalPosition ( const Ogre::Vector3 &  pos,
bool  updateBody = true 
)
virtual

Set the node position in global space terms.

Reimplemented from SO3::SNode.

Definition at line 282 of file SO3Skeleton.cpp.

Member Data Documentation

◆ boneList

SBoneMap SO3::SSkeleton::boneList
protected

Definition at line 52 of file SO3Skeleton.h.

◆ boneListByIndex

SBoneIndexMap SO3::SSkeleton::boneListByIndex
protected

Definition at line 54 of file SO3Skeleton.h.

◆ linkedEntity

SEntity* SO3::SSkeleton::linkedEntity
protected

Definition at line 50 of file SO3Skeleton.h.

◆ ogreLinkedEntity

Ogre::Entity* SO3::SSkeleton::ogreLinkedEntity
protected

Definition at line 51 of file SO3Skeleton.h.

◆ rootBonesList

SBoneMap SO3::SSkeleton::rootBonesList
protected

Definition at line 53 of file SO3Skeleton.h.


The documentation for this class was generated from the following files: