Commit f31133bc authored by Nicholas Milef's avatar Nicholas Milef

BUG: fixed visual model examples

parent de242372
......@@ -88,7 +88,6 @@ int main()
/*FixedPoint*/ "1 2 3 4 5 6 7 8 9 10 11",
/*NumberOfIterationInConstraintSolver*/ 5);
deformableObj->setDynamicalModel(pbdModel);
deformableObj->setVisualGeometry(surfMesh);
deformableObj->setPhysicsGeometry(surfMesh);
auto material = std::make_shared<RenderMaterial>();
......@@ -97,6 +96,7 @@ int main()
material->setDisplayMode(RenderMaterial::DisplayMode::WIREFRAME_SURFACE);
auto surfMeshModel = std::make_shared<VisualModel>(surfMesh);
surfMeshModel->setRenderMaterial(material);
deformableObj->addVisualModel(surfMeshModel);
// Solver
auto pbdSolver = std::make_shared<PbdSolver>();
......
......@@ -75,11 +75,12 @@ int main()
collidingGeom->setRadius(20);
auto obj = std::make_shared<CollidingObject>("VirtualCouplingObject");
obj->setCollidingGeometry(collidingGeom);
obj->setVisualGeometry(visualGeom);
auto material = std::make_shared<RenderMaterial>();
//material->setVisibilityOff();
visualGeom->setRenderMaterial(material);
auto visualModel = std::make_shared<VisualModel>(visualGeom);
visualModel->setRenderMaterial(material);
obj->addVisualModel(visualModel);
// Add virtual coupling object (with visual, colliding, and physics geometry) in the scene.
scene->addSceneObject(obj);
......
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