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