ice_point_operators.cpp
Go to the documentation of this file.
1
#include "
ice_point_operators.h
"
2
3
4
namespace
visionx
5
{
6
7
bool
eq
(
float
lhs,
float
rhs,
float
tol = 1e-6f)
8
{
9
return
std::abs
(lhs - rhs) < tol;
10
}
11
12
bool
operator!=
(
const
Point3D& lhs,
const
Point3D& rhs)
13
{
14
return
!
eq
(lhs.x, rhs.x) || !
eq
(lhs.y, rhs.y) || !
eq
(lhs.z, rhs.z);
15
}
16
17
std::ostream&
operator<<
(std::ostream& os,
const
Point3D& rhs)
18
{
19
return
os <<
"["
<< rhs.x <<
" "
<< rhs.y <<
" "
<< rhs.z <<
"]"
;
20
}
21
22
23
std::ostream&
operator<<
(std::ostream& os,
const
RGBA& rhs)
24
{
25
return
os <<
"["
<< rhs.r <<
" "
<< rhs.g <<
" "
<< rhs.b <<
" "
<< rhs.a <<
"]"
;
26
}
27
28
29
bool
operator!=
(
const
ColoredPoint3D& lhs,
const
ColoredPoint3D& rhs)
30
{
31
return
lhs.point != rhs.point || lhs.color != rhs.color;
32
}
33
34
std::ostream&
operator<<
(std::ostream& os,
const
ColoredPoint3D& rhs)
35
{
36
return
os <<
"("
<< rhs.point <<
" "
<< rhs.color <<
")"
;
37
}
38
39
40
bool
operator!=
(
const
LabeledPoint3D& lhs,
const
LabeledPoint3D& rhs)
41
{
42
return
lhs.point != rhs.point || lhs.label != rhs.label;
43
}
44
45
std::ostream&
operator<<
(std::ostream& os,
const
LabeledPoint3D& rhs)
46
{
47
return
os <<
"("
<< rhs.point <<
" "
<< rhs.label <<
")"
;
48
}
49
}
visionx::operator!=
bool operator!=(const Point3D &lhs, const Point3D &rhs)
Definition:
ice_point_operators.cpp:12
visionx
ArmarX headers.
Definition:
OpenPoseStressTest.h:38
visionx::operator<<
std::ostream & operator<<(std::ostream &os, const Point3D &rhs)
Definition:
ice_point_operators.cpp:17
armarx::abs
std::vector< T > abs(const std::vector< T > &v)
Definition:
VectorHelpers.h:253
ice_point_operators.h
visionx::eq
bool eq(float lhs, float rhs, float tol=1e-6f)
Definition:
ice_point_operators.cpp:7
VisionX
components
pointcloud_core
ice_point_operators.cpp
Generated on Sat Oct 12 2024 09:14:16 for armarx_documentation by
1.8.17