SEARCH
TOOLBOX
LANGUAGES
VisualLoop

VisualLoop

From SOFAWiki

Jump to: navigation, search

Contents

VisualLoop components

sofa::core::visual::VisualLoop is an API managing steps for drawing, rendering the scene.

Components which inherit from this API need to be unique in the root node of the scene. This component is responsible of launching the visual visitors and managing the update of the visual models of the scene.

The DefaultVisualManager component

sofa::simulation::DefaultAnimationLoop is the default implementation of the visual loop that SOFA provides.

It is added by default in the SOFA scene if no other components deriving from sofa::core::visual::VisualLoop is found.

VisualParams

sofa::core::visual::VisualParams are conveyed by the Visitors responsible of handling the operations regarding the VisualModels of the scene like the sofa::simulation::VisualVisitor. Like other sofa::core::ExecParams they contain information about the execution model, but also specific information for the rendering, like the current pass, the render target, the camera mode, the viewport...

They are received in a readonly fashion in the draw method of VisualModels, and in read/write access during the fwdDraw and bwdDraw methods.

VisualManagers

sofa::core::visual::VisualManagers can perform some preprocessing / postprocessing of the scene. A concrete implementation of a VisualManager is sofa::component::visualmodel::LightManager which controls the computation of the shadow map corresponding to the various sofa::component::visualmodel::Light present in the scene.