SO3Engine
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SO3::SBone Class Reference

#include <SO3Bone.h>

Inheritance diagram for SO3::SBone:
SO3::SNode SO3::SData

Public Member Functions

 SBone (SScene *parent, const std::string &boneName, SSkeleton *skeleton, const unsigned short &id)
 
 ~SBone ()
 
void UnsetSkeleton ()
 
Ogre::Bone * GetOgreBonePointer ()
 
SSkeletonGetSkeleton ()
 
virtual void Rotate (const Ogre::Vector3 &axis, const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS)
 
virtual void SetOrientation (const Ogre::Quaternion &quat)
 
virtual void AddOrientation (const Ogre::Quaternion &quat)
 
virtual void ResetToInitialOrientation ()
 
virtual void SetPosition (const Ogre::Vector3 &pos)
 
virtual void Translate (const Ogre::Vector3 &d, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_PARENT_TS)
 
virtual void SetScale (const Ogre::Vector3 &scale)
 
virtual Ogre::Vector3 GetPosition ()
 
virtual Ogre::Quaternion GetOrientation ()
 
virtual Ogre::Vector3 GetScale ()
 
virtual Ogre::Vector3 GetInitialPosition ()
 
virtual Ogre::Quaternion GetInitialOrientation ()
 
virtual Ogre::Vector3 GetInitialScale ()
 
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)
 
virtual void SetGlobalScale (const Ogre::Vector3 &pos, bool updateBody=true)
 
virtual Ogre::Matrix4 GetTransformationMatrix ()
 
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 int GetNumChildren ()
 
virtual void StoreInitialPRS ()
 
virtual void ResetToInitialPRS ()
 
unsigned short GetIndex ()
 
Ogre::Quaternion ConvertWorldToLocalOrientation (const Ogre::Quaternion &quat)
 
virtual void SetInheritOrientation (const bool &state)
 
virtual bool GetInheritOrientation ()
 
virtual void ResetOrientation ()
 
void AttachToBone (Ogre::MovableObject *ogreObject)
 
void DetachFromBone (Ogre::MovableObject *ogreObject)
 
- 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
 
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)
 
void ResetToInitialPosition ()
 
void ResetToInitialScale ()
 
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 ()
 
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)
 
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 AttachToBone (SNode *newChild)
 
void DetachFromBone (SNode *existingChild)
 
- 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

SSkeletonparentSkeleton
 
Ogre::Entity * ogreLinkedEntity
 
unsigned short boneIndex
 
- 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
 

Friends

class SNode
 

Additional Inherited Members

- 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 }
 

Detailed Description

Definition at line 41 of file SO3Bone.h.

Constructor & Destructor Documentation

◆ SBone()

SO3::SBone::SBone ( SScene parent,
const std::string &  boneName,
SSkeleton skeleton,
const unsigned short &  id 
)

Definition at line 16 of file SO3Bone.cpp.

◆ ~SBone()

SO3::SBone::~SBone ( )

Definition at line 54 of file SO3Bone.cpp.

Member Function Documentation

◆ AddOrientation()

void SO3::SBone::AddOrientation ( const Ogre::Quaternion &  quat)
virtual

Add a rotation to the node in local space terms.

Reimplemented from SO3::SNode.

Definition at line 113 of file SO3Bone.cpp.

◆ AttachToBone() [1/2]

void SO3::SBone::AttachToBone ( Ogre::MovableObject *  ogreObject)

Definition at line 538 of file SO3Bone.cpp.

◆ AttachToBone() [2/2]

void SO3::SBone::AttachToBone ( SNode newChild)
protected

Definition at line 479 of file SO3Bone.cpp.

◆ ConvertWorldToLocalOrientation()

Ogre::Quaternion SO3::SBone::ConvertWorldToLocalOrientation ( const Ogre::Quaternion &  quat)

Definition at line 558 of file SO3Bone.cpp.

◆ DetachFromBone() [1/2]

void SO3::SBone::DetachFromBone ( Ogre::MovableObject *  ogreObject)

Definition at line 550 of file SO3Bone.cpp.

◆ DetachFromBone() [2/2]

void SO3::SBone::DetachFromBone ( SNode existingChild)
protected

Definition at line 501 of file SO3Bone.cpp.

◆ GetGlobalOrientation()

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

Get the node orientation in global space terms.

Reimplemented from SO3::SNode.

Definition at line 256 of file SO3Bone.cpp.

◆ GetGlobalPosition()

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

Get the node position in global space terms.

Reimplemented from SO3::SNode.

Definition at line 238 of file SO3Bone.cpp.

◆ GetGlobalScale()

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

Get the node scale in global space terms.

Reimplemented from SO3::SNode.

Definition at line 275 of file SO3Bone.cpp.

◆ GetIndex()

unsigned short SO3::SBone::GetIndex ( )

Definition at line 474 of file SO3Bone.cpp.

◆ GetInheritOrientation()

bool SO3::SBone::GetInheritOrientation ( )
virtual

Reimplemented from SO3::SNode.

Definition at line 576 of file SO3Bone.cpp.

◆ GetInitialOrientation()

Ogre::Quaternion SO3::SBone::GetInitialOrientation ( )
virtual

Get the node orientation before "play".

Reimplemented from SO3::SNode.

Definition at line 219 of file SO3Bone.cpp.

◆ GetInitialPosition()

Ogre::Vector3 SO3::SBone::GetInitialPosition ( )
virtual

Get the node position before "play".

Reimplemented from SO3::SNode.

Definition at line 210 of file SO3Bone.cpp.

◆ GetInitialScale()

Ogre::Vector3 SO3::SBone::GetInitialScale ( )
virtual

Get the node scale before "play".

Reimplemented from SO3::SNode.

Definition at line 228 of file SO3Bone.cpp.

◆ GetNumChildren()

int SO3::SBone::GetNumChildren ( )
virtual

Reimplemented from SO3::SNode.

Definition at line 425 of file SO3Bone.cpp.

◆ GetOgreBonePointer()

Ogre::Bone * SO3::SBone::GetOgreBonePointer ( )

Definition at line 70 of file SO3Bone.cpp.

◆ GetOrientation()

Ogre::Quaternion SO3::SBone::GetOrientation ( )
virtual

Get the node orientation in local space terms.

Reimplemented from SO3::SNode.

Definition at line 192 of file SO3Bone.cpp.

◆ GetPosition()

Ogre::Vector3 SO3::SBone::GetPosition ( )
virtual

Get the node position in local space terms.

Reimplemented from SO3::SNode.

Definition at line 183 of file SO3Bone.cpp.

◆ GetScale()

Ogre::Vector3 SO3::SBone::GetScale ( )
virtual

Get the node scale in local space terms.

Reimplemented from SO3::SNode.

Definition at line 201 of file SO3Bone.cpp.

◆ GetSkeleton()

SSkeleton * SO3::SBone::GetSkeleton ( )

Definition at line 78 of file SO3Bone.cpp.

◆ GetTransformationMatrix()

Ogre::Matrix4 SO3::SBone::GetTransformationMatrix ( )
virtual

Reimplemented from SO3::SNode.

Definition at line 377 of file SO3Bone.cpp.

◆ Pitch()

void SO3::SBone::Pitch ( const float &  radianAngle,
const SNode::NodeTransformSpace relativeTo = SNode::SO3_LOCAL_TS 
)
virtual

Reimplemented from SO3::SNode.

Definition at line 386 of file SO3Bone.cpp.

◆ ResetOrientation()

void SO3::SBone::ResetOrientation ( )
virtual

Reimplemented from SO3::SNode.

Definition at line 585 of file SO3Bone.cpp.

◆ ResetToInitialOrientation()

void SO3::SBone::ResetToInitialOrientation ( )
virtual

Reset the node Orientation as it was before "play" (as it was when "StoreInitialPRS" was called).

Reimplemented from SO3::SNode.

Definition at line 127 of file SO3Bone.cpp.

◆ ResetToInitialPRS()

void SO3::SBone::ResetToInitialPRS ( )
virtual

Reset the node Position, Rotation and Scale as it was before "play" (as it was when "StoreInitialPRS" was called).

Reimplemented from SO3::SNode.

Definition at line 449 of file SO3Bone.cpp.

◆ Roll()

void SO3::SBone::Roll ( const float &  radianAngle,
const SNode::NodeTransformSpace relativeTo = SNode::SO3_LOCAL_TS 
)
virtual

Reimplemented from SO3::SNode.

Definition at line 412 of file SO3Bone.cpp.

◆ Rotate()

void SO3::SBone::Rotate ( const Ogre::Vector3 &  axis,
const float &  radianAngle,
const SNode::NodeTransformSpace relativeTo = SNode::SO3_LOCAL_TS 
)
virtual

Reimplemented from SO3::SNode.

Definition at line 83 of file SO3Bone.cpp.

◆ SetGlobalOrientation()

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

Set the node orientation in global space terms.

Reimplemented from SO3::SNode.

Definition at line 328 of file SO3Bone.cpp.

◆ SetGlobalPosition()

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

Set the node position in global space terms.

Reimplemented from SO3::SNode.

Definition at line 295 of file SO3Bone.cpp.

◆ SetGlobalScale()

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

Set the node scale in global space terms.

Reimplemented from SO3::SNode.

Definition at line 355 of file SO3Bone.cpp.

◆ SetInheritOrientation()

void SO3::SBone::SetInheritOrientation ( const bool &  state)
virtual

Reimplemented from SO3::SNode.

Definition at line 567 of file SO3Bone.cpp.

◆ SetOrientation()

void SO3::SBone::SetOrientation ( const Ogre::Quaternion &  quat)
virtual

Set the node orientation in local space terms.

Reimplemented from SO3::SNode.

Definition at line 97 of file SO3Bone.cpp.

◆ SetPosition()

void SO3::SBone::SetPosition ( const Ogre::Vector3 &  pos)
virtual

Set the node position in local space terms.

Reimplemented from SO3::SNode.

Definition at line 141 of file SO3Bone.cpp.

◆ SetScale()

void SO3::SBone::SetScale ( const Ogre::Vector3 &  scale)
virtual

Set the node scale in local space terms.

Reimplemented from SO3::SNode.

Definition at line 169 of file SO3Bone.cpp.

◆ StoreInitialPRS()

void SO3::SBone::StoreInitialPRS ( )
virtual

Store the node actual Position, Rotation and Scale before "play".

Reimplemented from SO3::SNode.

Definition at line 434 of file SO3Bone.cpp.

◆ Translate()

void SO3::SBone::Translate ( const Ogre::Vector3 &  d,
const SNode::NodeTransformSpace relativeTo = SNode::SO3_PARENT_TS 
)
virtual

Reimplemented from SO3::SNode.

Definition at line 155 of file SO3Bone.cpp.

◆ UnsetSkeleton()

void SO3::SBone::UnsetSkeleton ( )

Definition at line 64 of file SO3Bone.cpp.

◆ Yaw()

void SO3::SBone::Yaw ( const float &  radianAngle,
const SNode::NodeTransformSpace relativeTo = SNode::SO3_LOCAL_TS 
)
virtual

Reimplemented from SO3::SNode.

Definition at line 399 of file SO3Bone.cpp.

Friends And Related Symbol Documentation

◆ SNode

friend class SNode
friend

Definition at line 43 of file SO3Bone.h.

Member Data Documentation

◆ boneIndex

unsigned short SO3::SBone::boneIndex
protected

Definition at line 48 of file SO3Bone.h.

◆ ogreLinkedEntity

Ogre::Entity* SO3::SBone::ogreLinkedEntity
protected

Definition at line 47 of file SO3Bone.h.

◆ parentSkeleton

SSkeleton* SO3::SBone::parentSkeleton
protected

Definition at line 46 of file SO3Bone.h.


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