Commit 7a44a32c authored by artificiel's avatar artificiel
Browse files

CropFilter: utilisation du ofMaterial

parent 8fe63aea
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment