Skip to content
Snippets Groups Projects
Commit 8333dafe authored by Mirko Wächter's avatar Mirko Wächter
Browse files

refactoring

parent 158590a2
No related branches found
No related tags found
No related merge requests found
......@@ -88,13 +88,13 @@ namespace VirtualRobot
return margin;
}
void CollisionModel::setMargin(float value)
void CollisionModel::inflateModel(float value)
{
if(margin != value && visualization)
{
visualization->shrinkFatten(value);
model = visu->getTriMeshModel();
model = visualization->getTriMeshModel();
if (model)
{
bbox = model->boundingBox;
......@@ -155,7 +155,7 @@ namespace VirtualRobot
model.reset();
bbox.clear();
setMargin(margin); // updates the model
inflateModel(margin); // updates the model
}
int CollisionModel::getId()
......
......@@ -164,7 +164,12 @@ namespace VirtualRobot
virtual void scale(Eigen::Vector3f& scaleFactor);
float getMargin() const;
void setMargin(float value);
/**
* @brief in/deflates the model. If value is <0 the model is deflated.
* @param margin Each vertex of the model is moved about this margin along its normal.
*/
void inflateModel(float margin);
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment