Sofa Front-end

08 Jun Creating a viewer with SFE

When trying to use SOFA in your own application, one of the important problems you have to face is the visualisation of your simulation. SFE brings you two ways to solve that problem: - using the SOFA internal code for OpenGL rendering; - using your own render engine, after retrieving in SOFA all the necessary information. The second method is a more complex but more versatile, as it allows you to use your own render engine rather than the default OpenGL pipeline of SOFA.   Using SOFA OpenGL rendering   The first method can be used each time you have an OpenGL context opened and current. Just call the draw() method on sfe::Simulation and the scene will be displayed exactly as it is done in runSofa. Of course, you will have to set-up yourself the position and characteristics of the camera and the lights, which are not included in the simulation scene. ...

Read More