Biorbd
RotoTransNode.cpp
1 #define BIORBD_API_EXPORTS
2 #include "Utils/RotoTransNode.h"
3 
4 #include "Utils/String.h"
5 
7  biorbd::utils::RotoTrans(),
8  biorbd::utils::Node()
9 {
10  setType();
11 }
12 
14  const RotoTrans &rt,
15  const biorbd::utils::String &name,
16  const biorbd::utils::String &parentName) :
17  biorbd::utils::RotoTrans(rt),
18  biorbd::utils::Node(name, parentName)
19 {
20  setType();
21 }
22 
24 {
26  copy.DeepCopy(*this);
27  return copy;
28 }
29 
31 {
32  this->biorbd::utils::RotoTrans::operator=(other);
34 }
35 
37 {
38  *m_typeOfNode = biorbd::utils::NODE_TYPE::ROTOTRANS;
39 }
40 
42  const biorbd::utils::RotoTrans &other)
43 {
44  *this = RotoTransNode(other, "", "");
45 }
46 
48  const biorbd::utils::RotoTransNode& other) const
49 {
50  return this->biorbd::utils::RotoTrans::operator*(other);
51 }
52 
53 biorbd::utils::RotoTransNode biorbd::utils::operator*(
54  const biorbd::utils::RotoTrans &other,
56 {
58  other.operator*(me),
59  me.biorbd::utils::Node::name(),
60  me.parent());
61 }
biorbd::utils::Node::DeepCopy
void DeepCopy(const biorbd::utils::Node &other)
Deep copy of the node in another node.
Definition: Node.cpp:46
biorbd::utils::Node
A node is an abstract element which is assigned to a parent.
Definition: Node.h:16
biorbd::utils::RotoTransNode::operator*
biorbd::utils::RotoTrans operator*(const biorbd::utils::RotoTransNode &other) const
operator* Matrix multiplication
Definition: RotoTransNode.cpp:47
biorbd::utils::RotoTransNode
A RotoTrans which is attached to a segment.
Definition: RotoTransNode.h:16
biorbd::utils::RotoTransNode::setType
void setType()
Set the type to ROTOTRANS.
Definition: RotoTransNode.cpp:36
biorbd::utils::RotoTransNode::RotoTransNode
RotoTransNode()
Construct a RotoTransNode.
Definition: RotoTransNode.cpp:6
biorbd::utils::RotoTransNode::DeepCopy
biorbd::utils::RotoTransNode DeepCopy() const
Deep copy of a RotoTransNode.
Definition: RotoTransNode.cpp:23
biorbd::utils::RotoTrans
Homogenous matrix to describe translations and rotations simultaneously.
Definition: RotoTrans.h:34
biorbd::utils::RotoTransNode::operator=
void operator=(const biorbd::utils::RotoTrans &other)
operator= Matrix multiplication
Definition: RotoTransNode.cpp:41
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition: String.h:17
biorbd::utils::Node::parent
const biorbd::utils::String & parent() const
Return the parent name of the node.
Definition: Node.cpp:64