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>
Joint * child(size_t _index)
Returns the child joint with the given index.
void setParent(Joint *_newParent, SkeletonT< PointT > &_skeleton)
access parent of the joint
bool selected() const
Returns the joint's selection state.
void setSelected(bool _selected)
Set the joint's selction state.
ChildIter end()
Returns the end iterator for the joints children.
std::string name() const
Access the name of the joint.
Joint * parent()
Returns the parent joint.
size_t id_
An unique identifier, guaranteed to be part of a continuous sequence starting from 0...
Represents a single joint in the skeleton.
ChildIter begin()
Returns an iterator on the joints children.
std::string name_
the name of the joint
std::vector< Joint * > children_
The joints children, use the JointT::getChild method to access them.
void updateFromGlobal(size_t _idJoint)
update the structure when parent changes for a joint
size_t size() const
Returns the number of children.
size_t id() const
returns the joint id
JointT(const Joint &_other)
Constructor.
Joint * parent_
The parent joint; this joint is in its parents JointT::children_ vector. It's 0 for the root node...