Atoms Crowd  7.0.0
Joint.impl.h
1 // ===========================================================================
2 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
3 //
4 // Use of this software is subject to the terms of the Toolchefs license
5 // agreement provided at the time of installation or download, or which
6 // otherwise accompanies this software in either electronic or hard copy form.
7 // ===========================================================================
8 namespace AtomsCore
9 {
10  const std::string& Joint::name() const
11  {
12  return m_name;
13  }
14 
15  void Joint::setName(const std::string& name)
16  {
17  m_name = name;
18  }
19 
20  inline unsigned short Joint::id() const
21  {
22  return m_id;
23  }
24 
25  inline void Joint::setId(unsigned short id)
26  {
27  m_id = id;
28  }
29 
30  void Joint::setRotation(const Quaternion& rotation)
31  {
32  m_pose.rotation = rotation;
33  }
34 
35  const Quaternion& Joint::rotation() const
36  {
37  return m_pose.rotation;
38  }
39 
40  void Joint::setScale(const Vector3& scale)
41  {
42  m_pose.scale = scale;
43  }
44 
45  const Vector3& Joint::scale() const
46  {
47  return m_pose.scale;
48  }
49 
50  void Joint::setTranslation(const Vector3& translation)
51  {
52  m_pose.translation = translation;
53  }
54 
55  const Vector3& Joint::translation() const
56  {
57  return m_pose.translation;
58  }
59 
61  {
62  return m_parent;
63  }
64 
66  {
67  return m_parent;
68  }
69 
71  {
72  m_parent = parent;
73  }
74 
75  inline unsigned short Joint::numChildren() const
76  {
77  return static_cast<unsigned short>(m_children.size());
78  }
79 }
Joint class.
Definition: Joint.h:30
void setId(unsigned short id)
Sets the joint id.
Definition: Joint.impl.h:25
const Vector3 & translation() const
Gets the joint translation.
Definition: Joint.impl.h:55
unsigned short id() const
Gets the joint id.
Definition: Joint.impl.h:20
void setParent(JointPtr parent)
Sets the parent joint.
Definition: Joint.impl.h:70
const Vector3 & scale() const
Gets the joint scale.
Definition: Joint.impl.h:45
void setTranslation(const Vector3 &translation)
Sets the joint translation.
Definition: Joint.impl.h:50
void setName(const std::string &name)
Sets the joint name.
Definition: Joint.impl.h:15
JointCPtr parent() const
Gets the parent joint.
Definition: Joint.impl.h:65
unsigned short numChildren() const
Gets the number of children.
Definition: Joint.impl.h:75
const Quaternion & rotation() const
Gets the joint rotation.
Definition: Joint.impl.h:35
void setScale(const Vector3 &scale)
Sets the joint scale.
Definition: Joint.impl.h:40
const std::string & name() const
Gets the joint name.
Definition: Joint.impl.h:10
void setRotation(const Quaternion &rotation)
Sets the joint rotation.
Definition: Joint.impl.h:30
Quaternion rotation
Rotation.
Definition: JointPose.h:46
Vector3 scale
Scale.
Definition: JointPose.h:50
Vector3 translation
Translation.
Definition: JointPose.h:48
AtomsCore namespace.
Definition: Agent.h:344
AtomsMath::Quaternion Quaternion
Quaternion class.
Definition: AtomsMath.h:67
AtomsMath::Vector3 Vector3
Vector3 class.
Definition: AtomsMath.h:57