Public Types | Public Member Functions | Protected Types | Protected Attributes | Friends

OpenTissue::skeleton::Bone< types > Class Template Reference

#include <skeleton_bone.h>

List of all members.

Public Types

typedef types::math_types math_types
typedef types::bone_traits bone_traits
typedef bone_traits::transform_type transform_type
typedef types::bone_type bone_type
typedef types::skeleton_type skeleton_type
typedef std::list< bone_type * > bone_ptr_container
typedef
bone_ptr_container::iterator 
bone_ptr_iterator
typedef
boost::indirect_iterator
< bone_ptr_iterator, bone_type
bone_iterator

Public Member Functions

 Bone ()
real_type const & accumulated_weight () const
real_typeaccumulated_weight ()
transform_type const & relative () const
transform_typerelative ()
transform_type const & bind_pose () const
transform_typebind_pose ()
transform_type const & bone_space () const
transform_typebone_space ()
transform_type const & absolute () const
transform_typeabsolute ()
transform_type const & bone_space_transform () const
transform_typebone_space_transform ()
bool is_root () const
bool set_name (std::string const &name)
std::string const & get_name () const
size_t const & get_number () const
bone_type const * parent () const
skeleton_type const * skeleton () const
bool is_leaf () const

Protected Types

typedef math_types::value_traits value_traits
typedef
types::math_types::coordsys_type 
coordsys_type
typedef
types::math_types::real_type 
real_type

Protected Attributes

std::string m_name
size_t m_number
skeleton_typem_skeleton
bone_typem_parent
bone_ptr_container m_children
transform_type m_bind_pose
 Initial placement of joint frame wrt. parent (given in parent frame).
transform_type m_bone_space
 placement of bone frame wrt. joint frame (given in joint frame)
transform_type m_absolute
 placement of joint frame wrt. parent (given in wcs frame)
transform_type m_transform
 Bone space transform, i.e absolute placement of bone space in root frame.
transform_type m_relative
 placement of joint frame wrt. parent (given in parent frame).
real_type m_accumulated_weight
 Placeholder for accumulated blend weights (see Animation.blend_pose() and BlendScheduler.compute_pose() for details).

Friends

class BoneAccess
 A backdoor into the bone class. Used by skeleton class to manipulate private data in the bone class.

Detailed Description

template<typename types>
class OpenTissue::skeleton::Bone< types >

A Skeleton Bone. Motion of skeleton bones is done by changing their relative coordinate transform. During animation the absolute transform of the bone is computed and the absolute bone space transform.

The initial value of the relative transform is termed the bind pose and it is considered to be a constant. Likewise is the bone space considered to be a constant.


Member Typedef Documentation

template<typename types >
typedef boost::indirect_iterator<bone_ptr_iterator,bone_type> OpenTissue::skeleton::Bone< types >::bone_iterator
template<typename types >
typedef std::list<bone_type*> OpenTissue::skeleton::Bone< types >::bone_ptr_container
template<typename types >
typedef bone_ptr_container::iterator OpenTissue::skeleton::Bone< types >::bone_ptr_iterator
template<typename types >
typedef types::bone_traits OpenTissue::skeleton::Bone< types >::bone_traits
template<typename types >
typedef types::bone_type OpenTissue::skeleton::Bone< types >::bone_type
template<typename types >
typedef types::math_types::coordsys_type OpenTissue::skeleton::Bone< types >::coordsys_type [protected]
template<typename types >
typedef types::math_types OpenTissue::skeleton::Bone< types >::math_types
template<typename types >
typedef types::math_types::real_type OpenTissue::skeleton::Bone< types >::real_type [protected]
template<typename types >
typedef types::skeleton_type OpenTissue::skeleton::Bone< types >::skeleton_type
template<typename types >
typedef bone_traits::transform_type OpenTissue::skeleton::Bone< types >::transform_type
template<typename types >
typedef math_types::value_traits OpenTissue::skeleton::Bone< types >::value_traits [protected]

Constructor & Destructor Documentation

template<typename types >
OpenTissue::skeleton::Bone< types >::Bone (  )  [inline]

Member Function Documentation

template<typename types >
transform_type const& OpenTissue::skeleton::Bone< types >::absolute (  )  const [inline]
template<typename types >
transform_type& OpenTissue::skeleton::Bone< types >::absolute (  )  [inline]
template<typename types >
real_type& OpenTissue::skeleton::Bone< types >::accumulated_weight (  )  [inline]
template<typename types >
real_type const& OpenTissue::skeleton::Bone< types >::accumulated_weight (  )  const [inline]
template<typename types >
transform_type const& OpenTissue::skeleton::Bone< types >::bind_pose (  )  const [inline]
template<typename types >
transform_type& OpenTissue::skeleton::Bone< types >::bind_pose (  )  [inline]
template<typename types >
transform_type& OpenTissue::skeleton::Bone< types >::bone_space (  )  [inline]
template<typename types >
transform_type const& OpenTissue::skeleton::Bone< types >::bone_space (  )  const [inline]
template<typename types >
transform_type const& OpenTissue::skeleton::Bone< types >::bone_space_transform (  )  const [inline]
template<typename types >
transform_type& OpenTissue::skeleton::Bone< types >::bone_space_transform (  )  [inline]
template<typename types >
std::string const& OpenTissue::skeleton::Bone< types >::get_name (  )  const [inline]

Get bone name.

Returns:
A string representation of the bone name.
template<typename types >
size_t const& OpenTissue::skeleton::Bone< types >::get_number (  )  const [inline]

Get Bone Number

Returns:
The bone number.
template<typename types >
bool OpenTissue::skeleton::Bone< types >::is_leaf (  )  const [inline]

Test if this bone has any children. That is if it is a leaf bone.

Returns:
If bone is a leaf then return value is true otherwise it is false.
template<typename types >
bool OpenTissue::skeleton::Bone< types >::is_root (  )  const [inline]

Root Bone Query.

Returns:
If this bone is the root bone then the return value is true otherwise it is false.
template<typename types >
bone_type const* OpenTissue::skeleton::Bone< types >::parent (  )  const [inline]

Get the parent pointer.

Returns:
The parent pointer.
template<typename types >
transform_type& OpenTissue::skeleton::Bone< types >::relative (  )  [inline]
template<typename types >
transform_type const& OpenTissue::skeleton::Bone< types >::relative (  )  const [inline]
template<typename types >
bool OpenTissue::skeleton::Bone< types >::set_name ( std::string const &  name  )  [inline]

Set bone name.

Parameters:
name The new name of the bone.
Returns:
If the bone name was set succesfully then the return value is true otherwise it is false.
template<typename types >
skeleton_type const* OpenTissue::skeleton::Bone< types >::skeleton (  )  const [inline]

Get Skeleton pointer.

Returns:
The skeleton pointer.

Friends And Related Function Documentation

template<typename types >
friend class BoneAccess [friend]

A backdoor into the bone class. Used by skeleton class to manipulate private data in the bone class.


Member Data Documentation

template<typename types >
transform_type OpenTissue::skeleton::Bone< types >::m_absolute [protected]

placement of joint frame wrt. parent (given in wcs frame)

template<typename types >
real_type OpenTissue::skeleton::Bone< types >::m_accumulated_weight [protected]

Placeholder for accumulated blend weights (see Animation.blend_pose() and BlendScheduler.compute_pose() for details).

template<typename types >
transform_type OpenTissue::skeleton::Bone< types >::m_bind_pose [protected]

Initial placement of joint frame wrt. parent (given in parent frame).

template<typename types >
transform_type OpenTissue::skeleton::Bone< types >::m_bone_space [protected]

placement of bone frame wrt. joint frame (given in joint frame)

template<typename types >
bone_ptr_container OpenTissue::skeleton::Bone< types >::m_children [protected]
template<typename types >
std::string OpenTissue::skeleton::Bone< types >::m_name [protected]
template<typename types >
size_t OpenTissue::skeleton::Bone< types >::m_number [protected]
template<typename types >
bone_type* OpenTissue::skeleton::Bone< types >::m_parent [protected]
template<typename types >
transform_type OpenTissue::skeleton::Bone< types >::m_relative [protected]

placement of joint frame wrt. parent (given in parent frame).

template<typename types >
skeleton_type* OpenTissue::skeleton::Bone< types >::m_skeleton [protected]
template<typename types >
transform_type OpenTissue::skeleton::Bone< types >::m_transform [protected]

Bone space transform, i.e absolute placement of bone space in root frame.


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