55 template <
class Po
intT>
72 template<
typename Po
intT>
75 selected_(_other.selected_),
83 template <
class Po
intT>
96 template <
class Po
intT>
104 template <
class Po
intT>
121 template <
class Po
intT>
128 if (parent ==
this) {
129 std::cerr <<
"Illegal setParent operation (joint " << _newParent->
id() <<
" cannot be parent of " << this->
id() <<
" because this would lead to a cycle. Cancelling." << std::endl;
132 parent = parent->
parent();
141 if ( _newParent != 0)
155 template <
class Po
intT>
163 template <
class Po
intT>
174 template <
class Po
intT>
185 template <
class Po
intT>
196 template<
typename Po
intT>
210 template<
typename Po
intT>
226 template <
class Po
intT>
238 template <
class Po
intT>
241 selected_ = _selected;
246 template<
typename Po
intT>
253 template<
typename Po
intT>
size_t id() const
returns the joint id
size_t size() const
Returns the number of children.
void setSelected(bool _selected)
Set the joint's selction state.
void setParent(Joint *_newParent, SkeletonT< PointT > &_skeleton)
access parent of the joint
std::string name() const
Access the name of the joint.
ChildIter end()
Returns the end iterator for the joints children.
JointT(const Joint &_other)
Constructor.
Represents a single joint in the skeleton.
bool selected() const
Returns the joint's selection state.
Joint * child(size_t _index)
Returns the child joint with the given index.
std::string name_
the name of the joint
size_t id_
An unique identifier, guaranteed to be part of a continuous sequence starting from 0...
void updateFromGlobal(size_t _idJoint)
update the structure when parent changes for a joint
Joint * parent()
Returns the parent joint.
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.
ChildIter begin()
Returns an iterator on the joints children.