Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
af17db4d
Commit
af17db4d
authored
5 years ago
by
Raphael Grimm
Browse files
Options
Downloads
Patches
Plain Diff
Add and clean up viz::PointCloud::addPoint
parent
0006f6fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/ArViz/Client/elements/PointCloud.h
+18
-34
18 additions, 34 deletions
...ce/RobotAPI/components/ArViz/Client/elements/PointCloud.h
with
18 additions
and
34 deletions
source/RobotAPI/components/ArViz/Client/elements/PointCloud.h
+
18
−
34
View file @
af17db4d
...
...
@@ -49,34 +49,33 @@ namespace armarx::viz
return
*
this
;
}
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
)
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
,
const
data
::
Color
&
color
)
{
ColoredPoint
p
;
p
.
x
=
x
;
p
.
y
=
y
;
p
.
z
=
z
;
p
.
color
=
viz
::
Color
::
fromRGBA
(
0
,
0
,
0
,
255
)
;
p
.
color
=
color
;
return
addPoint
(
p
);
}
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
,
std
::
size_t
id
,
int
alpha
=
255
)
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
,
const
simox
::
color
::
Color
&
color
)
{
ColoredPoint
p
;
p
.
x
=
x
;
p
.
y
=
y
;
p
.
z
=
z
;
p
.
color
=
Color
::
fromRGBA
(
simox
::
color
::
GlasbeyLUT
::
at
(
id
,
alpha
));
return
addPoint
(
p
);
return
addPoint
(
x
,
y
,
z
,
Color
{
color
});
}
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
,
std
::
uint8_t
r
,
std
::
uint8_t
g
,
std
::
uint8_t
b
,
std
::
uint8_t
a
=
255
)
{
ColoredPoint
p
;
p
.
x
=
x
;
p
.
y
=
y
;
p
.
z
=
z
;
p
.
color
=
Color
::
fromRGBA
(
r
,
g
,
b
,
a
);
return
addPoint
(
p
);
return
addPoint
(
x
,
y
,
z
,
Color
{
r
,
g
,
b
,
a
});
}
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
)
{
return
addPoint
(
x
,
y
,
z
,
0
,
0
,
0
,
255
);
}
PointCloud
&
addPoint
(
float
x
,
float
y
,
float
z
,
std
::
size_t
id
,
int
alpha
=
255
)
{
return
addPoint
(
x
,
y
,
z
,
simox
::
color
::
GlasbeyLUT
::
at
(
id
,
alpha
));
}
// Templated setters for PCL point clouds.
...
...
@@ -85,35 +84,20 @@ namespace armarx::viz
std
::
enable_if_t
<
!
detail
::
has_members_rgba
<
PointT
>
::
value
,
int
>
=
0
>
PointCloud
&
addPoint
(
const
PointT
&
p
,
Color
color
=
Color
::
gray
())
{
ColoredPoint
&
pv
=
data_
->
points
.
emplace_back
(
ColoredPoint
());
pv
.
x
=
p
.
x
;
pv
.
y
=
p
.
y
;
pv
.
z
=
p
.
z
;
pv
.
color
=
color
;
return
*
this
;
return
addPoint
(
p
.
x
,
p
.
y
,
p
.
z
,
color
);
}
template
<
class
PointT
,
std
::
enable_if_t
<
detail
::
has_members_rgba
<
PointT
>
::
value
,
int
>
=
0
>
PointCloud
&
addPoint
(
const
PointT
&
p
)
{
ColoredPoint
&
pv
=
data_
->
points
.
emplace_back
(
ColoredPoint
());
pv
.
x
=
p
.
x
;
pv
.
y
=
p
.
y
;
pv
.
z
=
p
.
z
;
pv
.
color
=
Color
::
fromRGBA
(
p
.
r
,
p
.
g
,
p
.
b
,
p
.
a
);
return
*
this
;
return
addPoint
(
p
.
x
,
p
.
y
,
p
.
z
,
p
.
r
,
p
.
g
,
p
.
b
,
p
.
a
);
}
template
<
class
PointT
>
PointCloud
&
addPoint
(
const
PointT
&
p
,
Color
color
)
{
ColoredPoint
&
pv
=
data_
->
points
.
emplace_back
(
ColoredPoint
());
pv
.
x
=
p
.
x
;
pv
.
y
=
p
.
y
;
pv
.
z
=
p
.
z
;
pv
.
color
=
color
;
return
*
this
;
return
addPoint
(
p
.
x
,
p
.
y
,
p
.
z
,
color
);
}
template
<
class
PointCloudT
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment