Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Mezzanine::Graphics::Bone Class Reference

This class encapsulates the bones contained in a skeleton used for animation. More...

#include <bone.h>

+ Inheritance diagram for Mezzanine::Graphics::Bone:
+ Collaboration diagram for Mezzanine::Graphics::Bone:

Public Member Functions

Ogre::Bone * _GetInternalBone () const
 Gets the internal bone pointer. More...
 
BoneCreateChild (const UInt16 Handle, const Vector3 &Trans, const Quaternion &Rot)
 Creates a new bone in the parent skeleton as a child of this bone. More...
 
BoneGetChild (const UInt16 Index) const
 Gets a child bone by it's index. More...
 
BoneGetChild (const String &Name) const
 Gets a child bone by it's name. More...
 
UInt16 GetHandle () const
 Gets the unique identifying number belonging to this bone. More...
 
SkeletonGetHost () const
 Gets the host skeleton this bone belongs to. More...
 
Vector3 GetLocation () const
 Gets this objects current location. More...
 
Boole GetManuallyControlled () const
 Gets whether or not this bone is being manually controlled. More...
 
const StringGetName () const
 Gets the name of this Bone. More...
 
UInt16 GetNumChildren () const
 Gets the number of child bones contained by this bone. More...
 
Quaternion GetOrientation () const
 Gets this objects current orientation. More...
 
Vector3 GetScale () const
 Gets the scaling currently being applied to this object. More...
 
void Pitch (const Real Angle, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Rotate the object around the X axis. More...
 
void RemoveChild (Bone *ToBeRemoved)
 Removes a bone from this bone. More...
 
void RemoveChild (const UInt16 Index)
 Removes a bone from this bone by index. More...
 
void RemoveChild (const String &Name)
 Removes a bone from this bone. More...
 
void Roll (const Real Angle, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Rotate the object around the Z axis. More...
 
void Rotate (const Vector3 &Axis, const Real Angle, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Rotates the object from it's existing rotation. More...
 
void Rotate (const Quaternion &Rotation, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Rotates the object from it's existing rotation. More...
 
void Scale (const Vector3 &Scale)
 Scales the object from it's current size. More...
 
void Scale (const Real X, const Real Y, const Real Z)
 Scales the object from it's current size. More...
 
void SetLocation (const Vector3 &Loc)
 Sets the location of this object in parent space. More...
 
void SetLocation (const Real X, const Real Y, const Real Z)
 Sets the location of this object in parent space via Reals. More...
 
void SetManuallyControlled (Boole Manual)
 Sets whether or not this bone is to be manually controlled. More...
 
void SetOrientation (const Quaternion &Ori)
 Sets the orientation of this object in parent space. More...
 
void SetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets the orientation of this object in parent space via Reals. More...
 
void SetScale (const Vector3 &Sc)
 Sets the scaling to be applied to this object. More...
 
void SetScale (const Real X, const Real Y, const Real Z)
 Sets the scaling to be applied to this object via Reals. More...
 
void Translate (const Vector3 &Trans, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Moves this object from it's current location. More...
 
void Translate (const Real X, const Real Y, const Real Z, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Moves this object from it's current location. More...
 
void Yaw (const Real Angle, const Mezzanine::TransformSpace Space=Mezzanine::TS_Parent)
 Rotate the object around the Y axis. More...
 
- Public Member Functions inherited from Mezzanine::TransformableChildObject
virtual ~TransformableChildObject ()
 Class Destructor.
 

Protected Member Functions

 Bone (Skeleton *HostSkel, Ogre::Bone *InternalBone)
 Internal constructor. More...
 
 ~Bone ()
 Class destructor.
 

Protected Attributes

Ogre::Bone * GraphicsBone
 The pointer to the internal Bone this is based on. More...
 
SkeletonHost
 The host skeleton this bone belongs to. More...
 

Friends

class Skeleton
 

Detailed Description

This class encapsulates the bones contained in a skeleton used for animation.

Definition at line 59 of file bone.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Bone::Bone ( Skeleton HostSkel,
Ogre::Bone *  InternalBone 
)
protected

Internal constructor.

Parameters
HostSkelThe parent skeleton this bone blongs to.
InternalBoneThe internal bone this Bone is based on.

Definition at line 68 of file bone.cpp.

Member Function Documentation

Ogre::Bone * Mezzanine::Graphics::Bone::_GetInternalBone ( ) const

Gets the internal bone pointer.

Returns
Returns a shared pointer pointing to the internal bone.

Definition at line 182 of file bone.cpp.

Bone * Mezzanine::Graphics::Bone::CreateChild ( const UInt16  Handle,
const Vector3 Trans,
const Quaternion Rot 
)

Creates a new bone in the parent skeleton as a child of this bone.

Parameters
HandleThe handle to be given to the bone being created. Must be unique to the parent skeleton.
TransThe translation to apply to the created bone.
RotThe rotation to apply to the created bone.
Returns
Returns a pointer to the created child bone.

Definition at line 101 of file bone.cpp.

Bone * Mezzanine::Graphics::Bone::GetChild ( const UInt16  Index) const

Gets a child bone by it's index.

Parameters
IndexThe index of the bone to retrieve.
Returns
Returns a pointer to the requested Bone.

Definition at line 107 of file bone.cpp.

Bone * Mezzanine::Graphics::Bone::GetChild ( const String Name) const

Gets a child bone by it's name.

Parameters
NameThe name of the bone to retrieve.
Returns
Returns a pointer to the requested Bone.

Definition at line 110 of file bone.cpp.

UInt16 Mezzanine::Graphics::Bone::GetHandle ( ) const

Gets the unique identifying number belonging to this bone.

Returns
Returns a UInt16 representing the identifier unique to this bone within it's parent skeleton.

Definition at line 89 of file bone.cpp.

Skeleton * Mezzanine::Graphics::Bone::GetHost ( ) const

Gets the host skeleton this bone belongs to.

Returns
Returns a pointer to the parent skeleton.

Definition at line 83 of file bone.cpp.

Vector3 Mezzanine::Graphics::Bone::GetLocation ( ) const
virtual

Gets this objects current location.

Returns
Returns Vector3 representing the current rotation of this object in parent space.

Implements Mezzanine::TransformableChildObject.

Definition at line 131 of file bone.cpp.

Boole Mezzanine::Graphics::Bone::GetManuallyControlled ( ) const

Gets whether or not this bone is being manually controlled.

Returns
Returns true if this bone can be directly manipulated, false otherwise.

Definition at line 95 of file bone.cpp.

const String & Mezzanine::Graphics::Bone::GetName ( ) const

Gets the name of this Bone.

Returns
Returns a const reference to a string containing the name of this bone.

Definition at line 86 of file bone.cpp.

UInt16 Mezzanine::Graphics::Bone::GetNumChildren ( ) const

Gets the number of child bones contained by this bone.

Returns
Returns a UInt16 containing the number of bones that are children of this bone.

Definition at line 104 of file bone.cpp.

Quaternion Mezzanine::Graphics::Bone::GetOrientation ( ) const
virtual

Gets this objects current orientation.

Returns
Returns a Quaternion representing the current orientation of this object in parent space.

Implements Mezzanine::TransformableChildObject.

Definition at line 140 of file bone.cpp.

Vector3 Mezzanine::Graphics::Bone::GetScale ( ) const
virtual

Gets the scaling currently being applied to this object.

Returns
Returns a Vector3 representing the amount this object is being scaled.

Implements Mezzanine::TransformableChildObject.

Definition at line 149 of file bone.cpp.

void Mezzanine::Graphics::Bone::Pitch ( const Real  Angle,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Rotate the object around the X axis.

Parameters
AngleThe angle to rotate this object in radians.
SpaceThe transform space in which to apply this rotation.

Implements Mezzanine::TransformableChildObject.

Definition at line 161 of file bone.cpp.

void Mezzanine::Graphics::Bone::RemoveChild ( Bone ToBeRemoved)

Removes a bone from this bone.

Note
This does not remove the bone from the skeleton.
Parameters
ToBeRemovedThe child bone to be removed from this bone.

Definition at line 113 of file bone.cpp.

void Mezzanine::Graphics::Bone::RemoveChild ( const UInt16  Index)

Removes a bone from this bone by index.

Note
This does not remove the bone from the skeleton.
Parameters
IndexThe index of the child bone to be removed from this bone.

Definition at line 116 of file bone.cpp.

void Mezzanine::Graphics::Bone::RemoveChild ( const String Name)

Removes a bone from this bone.

Note
This does not remove the bone from the skeleton.
Parameters
NameThe name of the child bone to be removed from this bone.

Definition at line 119 of file bone.cpp.

void Mezzanine::Graphics::Bone::Roll ( const Real  Angle,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Rotate the object around the Z axis.

Parameters
AngleThe angle to rotate this object in radians.
SpaceThe transform space in which to apply this rotation.

Implements Mezzanine::TransformableChildObject.

Definition at line 164 of file bone.cpp.

void Mezzanine::Graphics::Bone::Rotate ( const Vector3 Axis,
const Real  Angle,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Rotates the object from it's existing rotation.

Note
This method has an additive effect with the objects current rotation. Unlike "SetOrientation" this method does not replace the existing orientation with what you provide.
Parameters
AxisThe axis on which this object will be rotated.
AngleThe angle to rotate this object in radians.
SpaceThe transform space in which to apply this rotation.

Implements Mezzanine::TransformableChildObject.

Definition at line 167 of file bone.cpp.

void Mezzanine::Graphics::Bone::Rotate ( const Quaternion Rotation,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Rotates the object from it's existing rotation.

Note
This method has an additive effect with the objects current rotation. Unlike "SetOrientation" this method does not replace the existing orientation with what you provide.
Parameters
RotationThe rotation to apply to this object.
SpaceThe transform space in which to apply this rotation.

Implements Mezzanine::TransformableChildObject.

Definition at line 170 of file bone.cpp.

void Mezzanine::Graphics::Bone::Scale ( const Vector3 Scale)
virtual

Scales the object from it's current size.

Note
This method has an additive effect with the objects' current scaling. Unlike "SetScale" this method does not replace the existing scale with what you provide.
Parameters
ScaleA Vector3 representing the scaling to apply to this object.

Implements Mezzanine::TransformableChildObject.

Definition at line 173 of file bone.cpp.

void Mezzanine::Graphics::Bone::Scale ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Scales the object from it's current size.

Note
This method has an additive effect with the objects' current scaling. Unlike "SetScale" this method does not replace the existing scale with what you provide.
Parameters
XThe scaling factor to apply on the X axis.
YThe scaling factor to apply on the Y axis.
ZThe scaling factor to apply on the Z axis.

Implements Mezzanine::TransformableChildObject.

Definition at line 176 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetLocation ( const Vector3 Loc)
virtual

Sets the location of this object in parent space.

Parameters
LocA Vector3 representing the location this object is to be set to.

Implements Mezzanine::TransformableChildObject.

Definition at line 125 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetLocation ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Sets the location of this object in parent space via Reals.

Parameters
XThe position on the X axis where this object is to be set.
YThe position on the Y axis where this object is to be set.
ZThe position on the Z axis where this object is to be set.

Implements Mezzanine::TransformableChildObject.

Definition at line 128 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetManuallyControlled ( Boole  Manual)

Sets whether or not this bone is to be manually controlled.

Parameters
ManualTrue to allow this bone to be explicitly altered, false to make it only accept animation updates.

Definition at line 92 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetOrientation ( const Quaternion Ori)
virtual

Sets the orientation of this object in parent space.

Parameters
OriA Quaternion representing the rotation this object is to be set to.

Implements Mezzanine::TransformableChildObject.

Definition at line 134 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetOrientation ( const Real  X,
const Real  Y,
const Real  Z,
const Real  W 
)
virtual

Sets the orientation of this object in parent space via Reals.

Parameters
XThe X component of the Axis.
YThe Y component of the Axis.
ZThe Z component of the Axis.
WRotation on the Axis X, Y and Z defined.

Implements Mezzanine::TransformableChildObject.

Definition at line 137 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetScale ( const Vector3 Sc)
virtual

Sets the scaling to be applied to this object.

Parameters
ScA Vector3 representing the amount of scaling to apply to this object.

Implements Mezzanine::TransformableChildObject.

Definition at line 143 of file bone.cpp.

void Mezzanine::Graphics::Bone::SetScale ( const Real  X,
const Real  Y,
const Real  Z 
)
virtual

Sets the scaling to be applied to this object via Reals.

Parameters
XThe scaling factor to apply on the X axis.
YThe scaling factor to apply on the Y axis.
ZThe scaling factor to apply on the Z axis.

Implements Mezzanine::TransformableChildObject.

Definition at line 146 of file bone.cpp.

void Mezzanine::Graphics::Bone::Translate ( const Vector3 Trans,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Moves this object from it's current location.

Note
This method has an additive effect with the objects current location. Unlike "SetLocation" this method does not replace the existing location with what you provide.
Parameters
TransA Vector3 representing the amount of movement to apply to this object.
SpaceThe transform space in which to apply this translation.

Implements Mezzanine::TransformableChildObject.

Definition at line 152 of file bone.cpp.

void Mezzanine::Graphics::Bone::Translate ( const Real  X,
const Real  Y,
const Real  Z,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Moves this object from it's current location.

Note
This method has an additive effect with the objects current location. Unlike "SetLocation" this method does not replace the existing location with what you provide.
Parameters
XThe amount of movement to apply on the X axis.
YThe amount of movement to apply on the Y axis.
ZThe amount of movement to apply on the Z axis.
SpaceThe transform space in which to apply this translation.

Implements Mezzanine::TransformableChildObject.

Definition at line 155 of file bone.cpp.

void Mezzanine::Graphics::Bone::Yaw ( const Real  Angle,
const Mezzanine::TransformSpace  Space = Mezzanine::TS_Parent 
)
virtual

Rotate the object around the Y axis.

Parameters
AngleThe angle to rotate this object in radians.
SpaceThe transform space in which to apply this rotation.

Implements Mezzanine::TransformableChildObject.

Definition at line 158 of file bone.cpp.

Member Data Documentation

Ogre::Bone* Mezzanine::Graphics::Bone::GraphicsBone
protected

The pointer to the internal Bone this is based on.

Definition at line 65 of file bone.h.

Skeleton* Mezzanine::Graphics::Bone::Host
protected

The host skeleton this bone belongs to.

Definition at line 68 of file bone.h.


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