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
alposition6d.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_ALPOSITION6D_H_
10
#define _LIBALMATH_ALMATH_TYPES_ALPOSITION6D_H_
11
12
#include <vector>
13
14
namespace
AL {
15
namespace
Math {
16
23
struct
Position6D
{
25
float
x
;
27
float
y
;
29
float
z
;
31
float
wx
;
33
float
wy
;
35
float
wz
;
36
39
58
59
Position6D
();
60
63
82
83
84
85
explicit
Position6D
(
float
pInit);
86
89
108
109
110
111
112
113
114
115
Position6D
(
116
float
pX,
117
float
pY,
118
float
pZ,
119
float
pWx,
120
float
pWy,
121
float
pWz);
122
125
144
145
146
147
148
149
Position6D
(
const
std::vector<float>& pFloats);
150
155
Position6D
operator+
(
const
Position6D
& pPos2)
const
;
156
161
Position6D
operator-
(
const
Position6D
& pPos2)
const
;
162
166
Position6D
operator+
()
const
;
167
171
Position6D
operator-
()
const
;
172
177
Position6D
&
operator+=
(
const
Position6D
& pPos2);
178
183
Position6D
&
operator-=
(
const
Position6D
& pPos2);
184
189
bool
operator==
(
const
Position6D
& pPos2)
const
;
190
195
bool
operator!=
(
const
Position6D
& pPos2)
const
;
196
201
Position6D
operator*
(
float
pVal)
const
;
202
207
Position6D
operator/
(
float
pVal)
const
;
208
213
Position6D
&
operator*=
(
float
pVal);
214
219
Position6D
&
operator/=
(
float
pVal);
220
232
bool
isNear
(
233
const
Position6D
& pPos2,
234
const
float
& pEpsilon=0.0001f)
const
;
235
246
float
distanceSquared
(
const
Position6D
& pPos2)
const
;
247
258
float
distance
(
const
Position6D
& pPos2)
const
;
259
268
float
norm
()
const
;
269
273
std::vector<float>
toVector
()
const
;
274
};
// end struct
275
276
289
float
distanceSquared
(
290
const
Position6D
& pPos1,
291
const
Position6D
& pPos2);
292
293
305
float
distance
(
306
const
Position6D
& pPos1,
307
const
Position6D
& pPos2);
308
319
float
norm
(
const
Position6D
& pPos);
320
331
Position6D
normalize
(
const
Position6D
& pPos);
332
333
}
// end namespace math
334
}
// end namespace al
335
336
#endif // _LIBALMATH_ALMATH_TYPES_ALPOSITION6D_H_
Copyright Aldebaran Robotics