ARGoS
3
A parallel, multi-engine simulator for swarm robotics
vector3.cpp
Go to the documentation of this file.
1
7
#include "
vector3.h
"
8
#include "
quaternion.h
"
9
10
namespace
argos
{
11
12
/****************************************/
13
/****************************************/
14
15
const
CVector3
CVector3::X
(1.0, 0.0, 0.0);
16
const
CVector3
CVector3::Y
(0.0, 1.0, 0.0);
17
const
CVector3
CVector3::Z
(0.0, 0.0, 1.0);
18
const
CVector3
CVector3::ZERO
;
19
20
/****************************************/
21
/****************************************/
22
23
CVector3
&
CVector3::Rotate
(
const
CQuaternion
& c_quaternion) {
24
CQuaternion
cResult;
25
cResult = c_quaternion;
26
cResult *=
CQuaternion
(0.0f, m_fX, m_fY, m_fZ);
27
cResult *= c_quaternion.
Inverse
();
28
m_fX = cResult.
GetX
();
29
m_fY = cResult.
GetY
();
30
m_fZ = cResult.
GetZ
();
31
return
*
this
;
32
}
33
34
/****************************************/
35
/****************************************/
36
37
}
vector3.h
quaternion.h
argos
The namespace containing all the ARGoS related code.
Definition
ci_actuator.h:12
argos::CQuaternion
Definition
quaternion.h:15
argos::CQuaternion::Inverse
CQuaternion Inverse() const
Definition
quaternion.h:98
argos::CQuaternion::GetX
Real GetX() const
Definition
quaternion.h:53
argos::CQuaternion::GetZ
Real GetZ() const
Definition
quaternion.h:61
argos::CQuaternion::GetY
Real GetY() const
Definition
quaternion.h:57
argos::CVector3
A 3D vector class.
Definition
vector3.h:31
argos::CVector3::Y
static const CVector3 Y
The y axis.
Definition
vector3.h:39
argos::CVector3::Rotate
CVector3 & Rotate(const CQuaternion &c_quaternion)
Rotates this vector by the given quaternion.
Definition
vector3.cpp:23
argos::CVector3::X
static const CVector3 X
The x axis.
Definition
vector3.h:36
argos::CVector3::Z
static const CVector3 Z
The z axis.
Definition
vector3.h:42
argos::CVector3::ZERO
static const CVector3 ZERO
The zero vector (0,0,0)
Definition
vector3.h:45
core
utility
math
vector3.cpp
Generated on Wed Jan 1 2025 00:18:09 for ARGoS by
1.12.0