VisualManagerPass
Render pass element: render the relevant tagged objects in a FBO.
The `VisualManagerPass` manages rendering tagged objects into a Frame Buffer Object (FBO) and controls output resolution and screen display settings.
- module
- Sofa.GL.Component.Shader
- namespace
- sofa::gl::component::shader
- include
- sofa/gl/component/shader/VisualManagerPass.h
- inherits
-
- VisualManager
- description
The VisualManagerPass is a component within the SOFA framework designed to manage rendering operations for tagged objects into a Frame Buffer Object (FBO). It does not directly contribute to any governing equations, operators, or constitutive laws involved in Finite Element Method (FEM) simulations. Instead, it focuses on the visual representation and management of objects during the simulation process.
Role in FEM Pipeline:
- Rendering Pass Management: The component handles the rendering pass by managing tagged objects within an FBO. It ensures that the specified objects are correctly rendered into the FBO according to user-defined parameters such as resolution factor (
factor) and whether to display on screen (renderToScreen).
Numerical Methods / Discretization Choices:
- Resolution Factor: The
factorfield allows for adjusting the output resolution of the render pass. This is a numerical choice that affects how objects are visualized but does not impact the underlying physics or mechanics.
Integration into Variational/Lagrangian Mechanics Framework:
- No Direct Mathematical Content:
VisualManagerPassdoes not directly implement or contribute to governing equations (e.g., mass matrix M, stiffness matrix K, internal force f_int, residual R) or constitutive laws (strain measures, stress tensors, hyperelastic potentials). Its primary role is in the visual management and rendering aspects of the simulation process.
Interaction with Other Components:
- Virtual Methods: The component overrides virtual methods from
VisualManager, including initialization (init), pre-draw setup (preDrawScene), drawing operations (drawScene,fwdDraw,bwdDraw), post-draw cleanup (postDrawScene), and event handling (handleEvent). These methods ensure that the rendering process is integrated seamlessly into the broader SOFA simulation pipeline.
Conclusion:
VisualManagerPass plays a crucial role in managing visual representations during simulations, ensuring that tagged objects are correctly rendered into FBOs. However, it does not contribute directly to any mathematical or physical aspects of the FEM simulation framework.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
factor |
float | |
set the resolution factor for the output pass. default value:1.0 |
renderToScreen |
bool | |
if true, this pass will be displayed on screen (only one renderPass in the scene must be defined as renderToScreen) |
Methods
bool
checkMultipass
(sofa::core::objectmodel::BaseContext * con)
void
init
()
virtual
void
doInitVisual
(const core::visual::VisualParams * )
virtual
void
preDrawScene
(core::visual::VisualParams * vp)
virtual
bool
drawScene
(core::visual::VisualParams * vp)
virtual
void
postDrawScene
(core::visual::VisualParams * vp)
virtual
void
draw
(const core::visual::VisualParams * vparams)
virtual
void
fwdDraw
(core::visual::VisualParams * )
virtual
void
bwdDraw
(core::visual::VisualParams * )
virtual
void
handleEvent
(sofa::core::objectmodel::Event * )
virtual
bool
isPrerendered
()
virtual
sofa::gl::FrameBufferObject &
getFBO
()
virtual
bool
hasFilledFbo
()
int
getOutputName
()
{
"name": "VisualManagerPass",
"namespace": "sofa::gl::component::shader",
"module": "Sofa.GL.Component.Shader",
"include": "sofa/gl/component/shader/VisualManagerPass.h",
"doc": "Render pass element: render the relevant tagged objects in a FBO.",
"inherits": [
"VisualManager"
],
"templates": [],
"data_fields": [
{
"name": "factor",
"type": "float",
"xmlname": "factor",
"help": "set the resolution factor for the output pass. default value:1.0"
},
{
"name": "renderToScreen",
"type": "bool",
"xmlname": "renderToScreen",
"help": "if true, this pass will be displayed on screen (only one renderPass in the scene must be defined as renderToScreen)"
}
],
"links": [],
"methods": [
{
"name": "checkMultipass",
"return_type": "bool",
"params": [
{
"name": "con",
"type": "sofa::core::objectmodel::BaseContext *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "doInitVisual",
"return_type": "void",
"params": [
{
"name": "",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "preDrawScene",
"return_type": "void",
"params": [
{
"name": "vp",
"type": "core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "drawScene",
"return_type": "bool",
"params": [
{
"name": "vp",
"type": "core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "postDrawScene",
"return_type": "void",
"params": [
{
"name": "vp",
"type": "core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "draw",
"return_type": "void",
"params": [
{
"name": "vparams",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "fwdDraw",
"return_type": "void",
"params": [
{
"name": "",
"type": "core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "bwdDraw",
"return_type": "void",
"params": [
{
"name": "",
"type": "core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "handleEvent",
"return_type": "void",
"params": [
{
"name": "",
"type": "sofa::core::objectmodel::Event *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "isPrerendered",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getFBO",
"return_type": "sofa::gl::FrameBufferObject &",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "hasFilledFbo",
"return_type": "bool",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getOutputName",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `VisualManagerPass` is a component in the SOFA framework, specifically within the `sofa::gl::component::shader` namespace, used for managing and rendering tagged objects into a Frame Buffer Object (FBO). This component inherits from `VisualManager`, indicating its role in visual management and rendering operations.\n\n### Role and Purpose:\nThe primary function of `VisualManagerPass` is to handle the rendering pass where relevant tagged objects are rendered into an FBO. It allows for the customization of the output resolution via a factor (default value: 1.0) and provides control over whether the render pass should be displayed on screen.\n\n### Interactions with Other Components:\nThe component interacts primarily through its virtual methods, which it overrides from `VisualManager`. These methods include initialization (`init`), pre-draw scene setup (`preDrawScene`), drawing the scene (`drawScene`, `fwdDraw`, `bwdDraw`), and post-draw cleanup (`postDrawScene`). Additionally, it handles events through `handleEvent` and provides FBO management via `getFBO`. It ensures that only one render pass in the scene can be defined to display on screen by checking for multipass configurations.\n\n### Practical Usage Guidance:\nThe component includes two key data fields: \n- **factor**: A float value used to set the resolution factor for the output pass, with a default value of 1.0.\n- **renderToScreen**: A boolean flag that indicates whether this pass should be displayed on screen; only one renderPass in the scene can have this set to true.\n\nIn practical usage, `VisualManagerPass` is used within shader pipelines and visual rendering contexts to control how objects are rendered into FBOs and whether they are displayed directly on screen. The component manages various stages of the rendering pipeline, ensuring that tagged objects are correctly processed during the drawing pass.",
"maths": "The `VisualManagerPass` is a component within the SOFA framework designed to manage rendering operations for tagged objects into a Frame Buffer Object (FBO). It does not directly contribute to any governing equations, operators, or constitutive laws involved in Finite Element Method (FEM) simulations. Instead, it focuses on the visual representation and management of objects during the simulation process.\n\n### Role in FEM Pipeline:\n- **Rendering Pass Management**: The component handles the rendering pass by managing tagged objects within an FBO. It ensures that the specified objects are correctly rendered into the FBO according to user-defined parameters such as resolution factor (`factor`) and whether to display on screen (`renderToScreen`).\n\n### Numerical Methods / Discretization Choices:\n- **Resolution Factor**: The `factor` field allows for adjusting the output resolution of the render pass. This is a numerical choice that affects how objects are visualized but does not impact the underlying physics or mechanics.\n\n### Integration into Variational/Lagrangian Mechanics Framework:\n- **No Direct Mathematical Content**: `VisualManagerPass` does not directly implement or contribute to governing equations (e.g., mass matrix M, stiffness matrix K, internal force f_int, residual R) or constitutive laws (strain measures, stress tensors, hyperelastic potentials). Its primary role is in the visual management and rendering aspects of the simulation process.\n\n### Interaction with Other Components:\n- **Virtual Methods**: The component overrides virtual methods from `VisualManager`, including initialization (`init`), pre-draw setup (`preDrawScene`), drawing operations (`drawScene`, `fwdDraw`, `bwdDraw`), post-draw cleanup (`postDrawScene`), and event handling (`handleEvent`). These methods ensure that the rendering process is integrated seamlessly into the broader SOFA simulation pipeline.\n\n### Conclusion:\n`VisualManagerPass` plays a crucial role in managing visual representations during simulations, ensuring that tagged objects are correctly rendered into FBOs. However, it does not contribute directly to any mathematical or physical aspects of the FEM simulation framework.",
"abstract": "The `VisualManagerPass` manages rendering tagged objects into a Frame Buffer Object (FBO) and controls output resolution and screen display settings.",
"sheet": "# VisualManagerPass\n\n## Overview\n\nThe `VisualManagerPass` is a component in the SOFA framework that handles the rendering pass for tagged objects into an FBO. It inherits from `VisualManager`, indicating its role in visual management and rendering operations.\n\n## Parameters and Data\n\n- **factor**: A float value used to set the resolution factor for the output pass, with a default value of 1.0.\n- **renderToScreen**: A boolean flag that indicates whether this pass should be displayed on screen; only one renderPass in the scene can have this set to true.\n\n## Dependencies and Connections\n\nThe component interacts primarily through its virtual methods inherited from `VisualManager`. These include initialization (`init`), pre-draw setup (`preDrawScene`), drawing operations (`drawScene`, `fwdDraw`, `bwdDraw`), post-draw cleanup (`postDrawScene`), event handling (`handleEvent`), and FBO management via `getFBO`. It ensures that only one render pass in the scene can be defined to display on screen by checking for multipass configurations."
}