Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
SpatialTransform.cpp
1
#define BIORBD_API_EXPORTS
2
#include "Utils/SpatialTransform.h"
3
4
#include "Utils/Error.h"
5
#include "Utils/Matrix3d.h"
6
#include "Utils/RotoTrans.h"
7
#include "Utils/String.h"
8
#include "Utils/Vector3d.h"
9
10
using namespace
BIORBD_NAMESPACE;
11
12
utils::SpatialTransform::SpatialTransform
()
13
: RigidBodyDynamics::Math::
SpatialTransform
() {}
14
15
utils::SpatialTransform::SpatialTransform
(
const
utils::SpatialTransform
& other)
16
: RigidBodyDynamics::Math::
SpatialTransform
(other) {}
17
18
utils::SpatialTransform::SpatialTransform
(
19
const
utils::Matrix3d
&
rotation
,
20
const
utils::Vector3d
&
translation
)
21
: RigidBodyDynamics::Math::
SpatialTransform
(
rotation
,
translation
) {}
22
23
utils::SpatialTransform::SpatialTransform
(
const
utils::RotoTrans
&
rototrans
)
24
: RigidBodyDynamics::Math::
SpatialTransform
(
25
rototrans
.block<3, 3>(0, 0),
26
rototrans
.trans()) {}
27
28
utils::SpatialTransform::SpatialTransform
(
29
const
RigidBodyDynamics::Math::SpatialTransform& other)
30
: RigidBodyDynamics::Math::
SpatialTransform
(other) {}
31
32
void
utils::SpatialTransform::operator=
(
const
utils::SpatialTransform
& other) {
33
this->RigidBodyDynamics::Math::SpatialTransform::operator=(other);
34
}
35
36
utils::RotoTrans
utils::SpatialTransform::rototrans
()
const
{
37
return
RotoTrans
(*
this
);
38
}
39
40
utils::Matrix3d
utils::SpatialTransform::rotation
()
const
{
41
return
utils::Matrix3d
(this->E);
42
}
43
44
utils::Vector3d
utils::SpatialTransform::translation
()
const
{
return
this->r; }
BIORBD_NAMESPACE::utils::Matrix3d
A wrapper for the Eigen::MatrixXd.
Definition
Matrix3d.h:21
BIORBD_NAMESPACE::utils::RotoTrans
Homogenous matrix to describe translations and rotations simultaneously.
Definition
RotoTrans.h:33
BIORBD_NAMESPACE::utils::RotoTrans::RotoTrans
RotoTrans(const RigidBodyDynamics::Math::Matrix4d &matrix=RigidBodyDynamics::Math::Matrix4d::Identity())
Construct RotoTrans matrix.
Definition
RotoTrans.cpp:14
BIORBD_NAMESPACE::utils::SpatialTransform
Wrapper of the SpatialTransform (rotation and translation).
Definition
SpatialTransform.h:24
BIORBD_NAMESPACE::utils::SpatialTransform::rotation
utils::Matrix3d rotation() const
Return the rotation part of the transform.
Definition
SpatialTransform.cpp:40
BIORBD_NAMESPACE::utils::SpatialTransform::operator=
void operator=(const SpatialTransform &other)
operator= For submatrices
Definition
SpatialTransform.cpp:32
BIORBD_NAMESPACE::utils::SpatialTransform::rototrans
utils::RotoTrans rototrans() const
Return the transformation matrix, i.e. the rototrans matrix.
Definition
SpatialTransform.cpp:36
BIORBD_NAMESPACE::utils::SpatialTransform::SpatialTransform
SpatialTransform()
Construct SpatialTransform.
Definition
SpatialTransform.cpp:12
BIORBD_NAMESPACE::utils::SpatialTransform::translation
utils::Vector3d translation() const
Return the translation part of the transform.
Definition
SpatialTransform.cpp:44
BIORBD_NAMESPACE::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition
Vector3d.h:27
src
Utils
SpatialTransform.cpp
Generated by
1.18.0