61 template <
class Po
intT>
78 template<
typename Po
intT>
81 selected_(_other.selected_),
89 template <
class Po
intT>
102 template <
class Po
intT>
110 template <
class Po
intT>
127 template <
class Po
intT>
131 Joint *parent = _newParent;
134 if (parent ==
this) {
135 std::cerr <<
"Illegal setParent operation (joint " << _newParent->
id() <<
" cannot be parent of " << this->id() <<
" because this would lead to a cycle. Cancelling." << std::endl;
138 parent = parent->
parent();
142 if(std::remove(parent_->children_.begin(), parent_->children_.end(),
this) != parent_->children_.end())
143 parent_->
children_.resize(parent_->children_.size() - 1);
145 parent_ = _newParent;
147 if ( _newParent != 0)
161 template <
class Po
intT>
169 template <
class Po
intT>
172 return parent_ == NULL;
180 template <
class Po
intT>
183 return children_.begin();
191 template <
class Po
intT>
194 return children_.end();
202 template<
typename Po
intT>
205 return children_.size();
216 template<
typename Po
intT>
219 assert( _index < children_.size() );
221 if(_index >= children_.size())
223 return children_[_index];
232 template <
class Po
intT>
244 template <
class Po
intT>
247 selected_ = _selected;
252 template<
typename Po
intT>
259 template<
typename Po
intT>
JointT(const Joint &_other)
Constructor.
ChildIter begin()
Returns an iterator on the joints children.
std::string name()
Access the name of the joint.
Joint * child(size_t _index)
Returns the child joint with the given index.
std::vector< Joint * > children_
The joints children, use the JointT::getChild method to access them.
ChildIter end()
Returns the end iterator for the joints children.
bool selected()
Returns the joint's selection state.
Joint * parent()
Returns the parent joint.
void updateFromGlobal(unsigned int _idJoint)
update the structure when parent changes for a joint
unsigned int id()
returns the joint id
void setSelected(bool _selected)
Set the joint's selction state.
size_t size()
Returns the number of children.
Represents a single joint in the skeleton.
void setParent(Joint *_newParent, SkeletonT< PointT > &_skeleton)
access parent of the joint