Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ofxaddons
ofxCloudLib
Commits
7a44a32c
Commit
7a44a32c
authored
Dec 08, 2017
by
artificiel
Browse files
CropFilter: utilisation du ofMaterial
parent
8fe63aea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ofxCloudLib/CropFilter.hpp
View file @
7a44a32c
...
...
@@ -68,6 +68,8 @@ class CropFilter
index_
=
i
;
result_
.
reset
(
new
pcl
::
PointCloud
<
pcl
::
PointXYZ
>
);
color_
.
setHsb
((
float
(
i
)
/
float
(
total
))
*
255
,
255
,
128
,
200
);
material_
.
setAmbientColor
(
ofColor
(
20
,
20
,
20
));
material_
.
setSpecularColor
(
ofColor
(
200
,
200
,
200
));
}
float
get_fill
()
...
...
@@ -156,6 +158,7 @@ class CropFilter
ofColor
color_
;
size_t
index_
;
float
distance_
=
10000
;
ofMaterial
material_
;
};
class
CropBoxFilter
:
public
CropFilter
...
...
@@ -253,13 +256,17 @@ class CropCylinderFilter : public CropFilter
}
if
(
parameters_
.
state_
)
{
ofSetColor
(
color_
);
material_
.
setDiffuseColor
(
color_
);
}
else
{
auto
c
=
color_
;
c
.
a
=
128
;
ofSetColor
(
color_
);
material_
.
setDiffuseColor
(
color_
);
}
material_
.
begin
();
ofDrawCylinder
(
parameters_
.
pos_
->
x
,
parameters_
.
pos_
->
y
,
parameters_
.
pos_
->
z
,
size
.
x
,
size
.
z
);
material_
.
end
();
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment