OglAttribute
OglFloatAttribute
`OglAttribute` manages OpenGL attributes for visual rendering within SOFA simulations, inheriting from `VisualModel`. It allows handling of topological changes through the `handleDynamicTopology` parameter.
- module
- Sofa.GL.Component.Shader
- namespace
- sofa::gl::component::shader
- include
- sofa/gl/component/shader/OglAttribute.h
- inherits
-
- VisualModel
- description
The OglAttribute component in the SOFA framework is primarily concerned with the management of OpenGL attributes used for visual rendering. It does not directly contribute to the governing equations or operators that are typically associated with finite element analysis, such as mass matrix $M$, stiffness matrix $K$, internal force vector $f_{int}$, residual $R$, etc. Instead, its role is focused on the visualization aspects of the simulation pipeline.
Role in Global FEM Pipeline
The OglAttribute component fits into the broader SOFA framework by serving as part of the shader module. It inherits from VisualModel, which indicates that it plays a crucial role in rendering visual elements within SOFA simulations. The methods provided, such as init, doInitVisual, and reinit, suggest that this component is involved in the initialization and update phases of the visualization process.
Numerical Methods or Discretization Choices
The OglAttribute does not encode any specific numerical methods or discretization choices related to FEM simulation. Instead, its functionality revolves around managing OpenGL attributes for rendering purposes. The method handleDynamicTopology, which is a boolean flag, allows the component to adapt to topological changes within the simulation, ensuring that visual elements are updated accordingly.
Mathematical Content
Since this component does not directly involve mathematical operations related to FEM or variational mechanics, there is no governing equation or operator it implements. Its primary purpose is to manage and provide OpenGL attributes for visualization purposes, which is outside the scope of FEM computations.
In summary, the OglAttribute component serves as a visual management tool within the SOFA framework, handling OpenGL attribute data without involving any direct mathematical operations related to finite element analysis or Lagrangian mechanics.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
handleDynamicTopology |
bool | |
Activate handling of topological changes on the values of this attribute (resizes only) |
Methods
void
init
()
virtual
void
doInitVisual
(const core::visual::VisualParams * vparams)
virtual
void
reinit
()
virtual
void
doUpdateVisual
(const core::visual::VisualParams * vparams)
virtual
int *
beginEdit
()
void
endEdit
()
const int &
getValue
()
void
setValue
(const int & value)
void
enable
()
void
disable
()
void
bwdDraw
(core::visual::VisualParams * )
virtual
void
fwdDraw
(core::visual::VisualParams * )
virtual
void
setUsage
(unsigned int usage)
ShaderElementType
getSEType
()
virtual
const core::objectmodel::BaseData *
getSEValue
()
virtual
int
getSESizePerVertex
()
virtual
int
getSETotalSize
()
virtual
{
"name": "OglAttribute",
"namespace": "sofa::gl::component::shader",
"module": "Sofa.GL.Component.Shader",
"include": "sofa/gl/component/shader/OglAttribute.h",
"doc": "OglFloatAttribute",
"inherits": [
"VisualModel"
],
"templates": [],
"data_fields": [
{
"name": "handleDynamicTopology",
"type": "bool",
"xmlname": "handleDynamicTopology",
"help": "Activate handling of topological changes on the values of this attribute (resizes only)"
}
],
"links": [],
"methods": [
{
"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": "vparams",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "reinit",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "doUpdateVisual",
"return_type": "void",
"params": [
{
"name": "vparams",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "beginEdit",
"return_type": "int *",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "endEdit",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getValue",
"return_type": "const int &",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setValue",
"return_type": "void",
"params": [
{
"name": "value",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "enable",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "disable",
"return_type": "void",
"params": [],
"is_virtual": false,
"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": "fwdDraw",
"return_type": "void",
"params": [
{
"name": "",
"type": "core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setUsage",
"return_type": "void",
"params": [
{
"name": "usage",
"type": "unsigned int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getSEType",
"return_type": "ShaderElementType",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getSEValue",
"return_type": "const core::objectmodel::BaseData *",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getSESizePerVertex",
"return_type": "int",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "getSETotalSize",
"return_type": "int",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `OglAttribute` component in the SOFA framework is part of the shader module and is responsible for managing OpenGL attributes used in rendering visual elements. It inherits from `VisualModel`, indicating its role in the visualization pipeline within SOFA simulations.\n\nThis component interacts with other components through methods like `init`, `doInitVisual`, `reinit`, `doUpdateVisual`, which are part of the initialization and update processes for visual models in SOFA. The `handleDynamicTopology` data field allows enabling or disabling the handling of topological changes, impacting how this attribute responds to dynamic changes within the simulation.\n\nThe component includes methods such as `beginEdit`, `endEdit`, `getValue`, `setValue`, `enable`, and `disable`, which are used for editing and managing the state of the OpenGL attribute. Methods like `bwdDraw` and `fwdDraw` suggest that this component plays a role in both forward and backward passes during rendering.\n\nThe method `getSEType`, `getSEValue`, `getSESizePerVertex`, and `getSETotalSize` provide information about the shader element type, its value, size per vertex, and total size, respectively. These methods are likely used for interoperability with other components in the shader pipeline.\n\nPractical usage of this component involves setting up OpenGL attributes that need to be managed within a visual model, and it can be configured to handle dynamic topology changes.",
"maths": "The `OglAttribute` component in the SOFA framework is primarily concerned with the management of OpenGL attributes used for visual rendering. It does not directly contribute to the governing equations or operators that are typically associated with finite element analysis, such as mass matrix \\(M\\), stiffness matrix \\(K\\), internal force vector \\(f_{int}\\), residual \\(R\\), etc. Instead, its role is focused on the visualization aspects of the simulation pipeline.\n\n### Role in Global FEM Pipeline\nThe `OglAttribute` component fits into the broader SOFA framework by serving as part of the shader module. It inherits from `VisualModel`, which indicates that it plays a crucial role in rendering visual elements within SOFA simulations. The methods provided, such as `init`, `doInitVisual`, and `reinit`, suggest that this component is involved in the initialization and update phases of the visualization process.\n\n### Numerical Methods or Discretization Choices\nThe `OglAttribute` does not encode any specific numerical methods or discretization choices related to FEM simulation. Instead, its functionality revolves around managing OpenGL attributes for rendering purposes. The method `handleDynamicTopology`, which is a boolean flag, allows the component to adapt to topological changes within the simulation, ensuring that visual elements are updated accordingly.\n\n### Mathematical Content\nSince this component does not directly involve mathematical operations related to FEM or variational mechanics, there is no governing equation or operator it implements. Its primary purpose is to manage and provide OpenGL attributes for visualization purposes, which is outside the scope of FEM computations.\n\nIn summary, the `OglAttribute` component serves as a visual management tool within the SOFA framework, handling OpenGL attribute data without involving any direct mathematical operations related to finite element analysis or Lagrangian mechanics.",
"abstract": "`OglAttribute` manages OpenGL attributes for visual rendering within SOFA simulations, inheriting from `VisualModel`. It allows handling of topological changes through the `handleDynamicTopology` parameter.",
"sheet": "# OglAttribute\n\n## Overview\nThe `OglAttribute` component in the SOFA framework is part of the shader module and manages OpenGL attributes used for visual rendering. It inherits from `VisualModel`, indicating its role in the visualization pipeline within SOFA simulations.\n\n## Parameters and Data\n- **handleDynamicTopology**: A boolean flag that activates handling of topological changes on the values of this attribute (resizes only). This parameter controls whether the component adapts to dynamic topology changes during the simulation."
}