Commit b3ef320b authored by Jan Möbius's avatar Jan Möbius

Skeleton Joint Type moved to size_t

parent 65586257
Pipeline #3567 passed with stage
in 130 minutes and 10 seconds
......@@ -100,7 +100,7 @@ JointT<PointT>::~JointT()
* not to change, unless joints are deleted from the skeleton.
*/
template <class PointT>
inline unsigned int JointT<PointT>::id()
inline size_t JointT<PointT>::id() const
{
return id_;
}
......@@ -108,7 +108,7 @@ inline unsigned int JointT<PointT>::id()
//-----------------------------------------------------------------------------------------------------
template <class PointT>
inline void JointT<PointT>::setId(unsigned int _id)
inline void JointT<PointT>::setId(const size_t _id)
{
id_ = _id;
}
......@@ -167,9 +167,9 @@ inline JointT<PointT> *JointT<PointT>::parent()
//-----------------------------------------------------------------------------------------------------
template <class PointT>
inline bool JointT<PointT>::isRoot()
inline bool JointT<PointT>::isRoot() const
{
return parent_ == NULL;
return (parent_ == NULL);
}
//-----------------------------------------------------------------------------------------------------
......@@ -200,7 +200,7 @@ inline typename JointT<PointT>::ChildIter JointT<PointT>::end()
* @brief Returns the number of children
*/
template<typename PointT>
inline size_t JointT<PointT>::size()
inline size_t JointT<PointT>::size() const
{
return children_.size();
}
......@@ -230,7 +230,7 @@ inline JointT<PointT> *JointT<PointT>::child(size_t _index)
*
*/
template <class PointT>
inline bool JointT<PointT>::selected()
inline bool JointT<PointT>::selected() const
{
return selected_;
}
......@@ -250,14 +250,14 @@ inline void JointT<PointT>::setSelected(bool _selected)
//-----------------------------------------------------------------------------------------------------
template<typename PointT>
inline std::string JointT<PointT>::name() {
inline std::string JointT<PointT>::name() const {
return name_;
}
//-----------------------------------------------------------------------------------------------------
template<typename PointT>
inline void JointT<PointT>::setName(std::string _name) {
inline void JointT<PointT>::setName(const std::string _name) {
name_ = _name;
}
......
......@@ -82,13 +82,13 @@ public:
~JointT();
/// returns the joint id
inline unsigned int id();
inline size_t id() const;
/// access parent of the joint
inline void setParent(Joint *_newParent, SkeletonT<PointT> &_skeleton);
inline Joint *parent();
inline bool isRoot();
inline bool isRoot() const;
public:
/**
......@@ -98,7 +98,7 @@ public:
//@{
inline ChildIter begin();
inline ChildIter end();
inline size_t size();
inline size_t size() const;
inline Joint *child(size_t _index);
//@}
......@@ -107,21 +107,21 @@ public:
* change and access selection state
*/
//@{
inline bool selected();
inline bool selected() const;
inline void setSelected(bool _selected);
//@}
/// Access the name of the joint
inline std::string name();
inline void setName(std::string _name);
inline std::string name() const;
inline void setName(const std::string _name);
private:
/// An unique identifier, guaranteed to be part of a continuous sequence starting from 0
unsigned int id_;
size_t id_;
bool selected_;
protected:
inline void setId(unsigned int _id);
inline void setId(const size_t _id);
/// The parent joint; this joint is in its parents JointT::children_ vector. It's 0 for the root node.
Joint *parent_;
......
......@@ -132,7 +132,7 @@ void InfoSkeletonObjectPlugin::printSkeletonInfo( Skeleton* _skeleton, unsigned
// Check if we have a parent joint
if ( _skeleton->joint(_index)->parent() !=0 ) {
adjacentHandles = adjacentHandles + "Parent: " + locale.toString( _skeleton->joint(_index)->parent()->id() ) + " ;";
adjacentHandles = adjacentHandles + "Parent: " + QString::number( _skeleton->joint(_index)->parent()->id() ) + " ;";
}
// Check for children
......@@ -143,7 +143,7 @@ void InfoSkeletonObjectPlugin::printSkeletonInfo( Skeleton* _skeleton, unsigned
for ( Skeleton::Joint::ChildIter it = _skeleton->joint(_index)->begin(); it != _skeleton->joint(_index)->end(); ++it) {
Skeleton::Joint *joint = *it;
adjacentHandles = adjacentHandles + " " + locale.toString(joint->id());
adjacentHandles = adjacentHandles + " " + QString::number(joint->id());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment