NAO documentation
|
C++ Libraries
|
index
libalmath
1.14
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Groups
Pages
almath
types
alrotation.h
1
/*
2
* Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
3
* Use of this source code is governed by a BSD-style license that can be
4
* found in the COPYING file.
5
*/
6
7
8
#pragma once
9
#ifndef _LIBALMATH_ALMATH_TYPES_ALROTATION_H_
10
#define _LIBALMATH_ALMATH_TYPES_ALROTATION_H_
11
12
#include <vector>
13
14
namespace
AL {
15
namespace
Math {
16
19
27
28
29
30
struct
Rotation
31
{
35
float
r1_c1
;
39
float
r1_c2
;
43
float
r1_c3
;
47
float
r2_c1
;
51
float
r2_c2
;
55
float
r2_c3
;
59
float
r3_c1
;
63
float
r3_c2
;
67
float
r3_c3
;
68
71
84
85
Rotation
();
86
95
109
110
111
112
125
126
Rotation
(
const
std::vector<float>& pFloats);
127
132
Rotation
&
operator*=
(
const
Rotation
& pRot2);
133
138
Rotation
operator*
(
const
Rotation
& pRot2)
const
;
139
144
bool
operator==
(
const
Rotation
& pRot2)
const
;
145
150
bool
operator!=
(
const
Rotation
& pRot2)
const
;
151
162
bool
isNear
(
163
const
Rotation
& pRot2,
164
const
float
& pEpsilon=0.0001f)
const
;
165
172
Rotation
transpose
()
const
;
173
177
184
185
186
187
188
float
determinant
()
const
;
189
197
static
Rotation
fromQuaternion
(
198
const
float
pA,
199
const
float
pB,
200
const
float
pC,
201
const
float
pD);
202
203
211
static
Rotation
fromAngleDirection
(
212
const
float
pAngle,
213
const
float
pX,
214
const
float
pY,
215
const
float
pZ);
216
220
226
227
228
static
Rotation
fromRotX
(
const
float
pRotX);
229
233
239
240
241
static
Rotation
fromRotY
(
const
float
pRotY);
242
246
252
253
254
static
Rotation
fromRotZ
(
const
float
pRotZ);
255
265
static
Rotation
from3DRotation
(
266
const
float
& pWX,
267
const
float
& pWY,
268
const
float
& pWZ);
269
273
279
280
std::vector<float>
toVector
()
const
;
281
282
};
// end struct
283
293
Rotation
transpose
(
const
Rotation
& pRot);
294
295
299
306
307
308
309
310
311
312
float
determinant
(
const
Rotation
& pRot);
313
314
326
Rotation
rotationFromQuaternion
(
327
const
float
pA,
328
const
float
pB,
329
const
float
pC,
330
const
float
pD);
331
343
Rotation
rotationFromAngleDirection
(
344
const
float
pAngle,
345
const
float
pX,
346
const
float
pY,
347
const
float
pZ);
348
357
void
applyRotation
(
358
const
AL::Math::Rotation
& pRot,
359
float
& pX,
360
float
& pY,
361
float
& pZ);
362
366
372
373
374
375
376
377
378
Rotation
rotationFromRotX
(
const
float
pRotX);
379
383
389
390
391
392
393
394
395
Rotation
rotationFromRotY
(
const
float
pRotY);
396
400
405
406
407
408
409
410
411
Rotation
rotationFromRotZ
(
const
float
pRotZ);
412
425
Rotation
rotationFrom3DRotation
(
426
const
float
& pWX,
427
const
float
& pWY,
428
const
float
& pWZ);
429
430
}
431
}
432
#endif // _LIBALMATH_ALMATH_TYPES_ALROTATION_H_
Copyright Aldebaran Robotics