Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
JointT< PointT > Class Template Reference

Represents a single joint in the skeleton. More...

`#include <ObjectTypes/Skeleton/JointT.hh>`

## Public Types
typedef PointT | Point
typedef Point::value_type | Scalar
typedef JointT< PointT > | Joint
typedef std::vector< Joint * > ::iterator | ChildIter

## Public Member Functions
| JointT (const Joint &_other)
| Constructor. More...
| JointT (Joint *_parent, std::string _name="")
| Default constructor, creates a joint pointing to the origin.
| ~JointT ()
| Destructor.
unsigned int | id ()
| returns the joint id More...
void | setParent (Joint *_newParent, SkeletonT< PointT > &_skeleton)
| access parent of the joint More...
Joint * | parent ()
| Returns the parent joint. More...
bool | isRoot ()
std::string | name ()
| Access the name of the joint.
void | setName (std::string _name)
Child access
Use this iterator to access the joints child nodes
ChildIter | begin ()
| Returns an iterator on the joints children.
ChildIter | end ()
| Returns the end iterator for the joints children.
size_t | size ()
| Returns the number of children.
Joint * | child (size_t _index)
| Returns the child joint with the given index. More...
Selections
change and access selection state
bool | selected ()
| Returns the joint's selection state.
void | setSelected (bool _selected)
| Set the joint's selction state.

## Protected Member Functions
void | setId (unsigned int _id)

## Protected Attributes
Joint * | parent_
| The parent joint; this joint is in its parents JointT::children_ vector. It's 0 for the root node.
std::vector< Joint * > | children_
| The joints children, use the JointT::getChild method to access them.
std::string | name_
| the name of the joint

## Private Attributes
unsigned int | id_
| An unique identifier, guaranteed to be part of a continuous sequence starting from 0.
bool | selected_

## Friends
template<class >
class | SkeletonT

## Detailed Description

### template<class PointT>
class JointT< PointT >

Represents a single joint in the skeleton.

The skeleton is made up by a hierarchical structure of joints. The joints don't store their position themselves. Instead, the joint positions are stored in poses. The poses are managed by the AnimationT class and the skeleton.

Definition at line 66 of file JointT.hh.

## Constructor & Destructor Documentation

template<typename PointT >

JointT< PointT >::JointT | ( | const Joint & | _other | ) |

Constructor.

Copy constructor, creates an incomplete copy of the given joint.

The parent and children cannot be copied, since they are provided as pointers only. Furthermore, if a skeleton is being cloned the corresponding joints may not yet exist in this skeleton.

Definition at line 79 of file JointT.cc.

## Member Function Documentation

template<typename PointT >

JointT< PointT > * JointT< PointT >::child | ( | size_t | _index | ) |
| inline

Returns the child joint with the given index.

Parameters

  _index | The child nodes index

Returns
  A pointer to the child joint or zero if the index was out of range

Definition at line 217 of file JointT.cc.

template<class PointT >

unsigned int JointT< PointT >::id | ( |  | ) |
| inline

returns the joint id

Returns the joints index.

The index is part of a continuous sequence out of the interval [0, number of joints). It is guaranteed not to change, unless joints are deleted from the skeleton.

Definition at line 103 of file JointT.cc.

template<class PointT >

JointT< PointT > * JointT< PointT >::parent | ( |  | ) |
| inline

Returns the parent joint.

If you want to know the root position of a joint, then just take its parents global position. They always match, since a joint is always directly attached to its parent.

Definition at line 162 of file JointT.cc.

template<class PointT>

void JointT< PointT >::setParent | ( | Joint * | _newParent,
|  | SkeletonT< PointT > & | _skeleton
| ) |  |
| inline

access parent of the joint

Replaces this joints parent joint.

After calling this method this joint is child of the given joint. Keep in mind that this will corrupt the joints local matrix in all poses.

Parameters

  _newParent | The new parent joint
  _skeleton | The skeleton this joint is part of, used to update the poses local matrices

Definition at line 128 of file JointT.cc.

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

- ObjectTypes/Skeleton/JointT.hh
- ObjectTypes/Skeleton/JointT.cc