DataDisplay
The `DataDisplay` component in the SOFA framework is part of the Sofa.GL.Component.Rendering3D module and provides functionality for color rendering of data associated with a mesh. It inherits from `VisualModel`, which indicates its role in visualizing aspects of a simulation. This component interacts with other components through links to an `OglColorMap` for mapping scalar values to colors and a `BaseMeshTopology` for the topology of the mesh being rendered. The component has several data fields that allow users to customize the rendering, such as setting the range of data to display (`f_maximalRange`, `d_userRange`), specifying different types of data associated with nodes or elements (`f_pointData`, `f_triangleData`, etc.), and defining colors for NaN values (`f_colorNaN`). Additional settings include adjusting the shininess for point-based rendering (`d_shininess`). The component provides methods to initialize, draw, and update visualizations. These include `init` for initialization, `doDrawVisual` and `doUpdateVisual` for visualization updates, and `insertInNode`/`removeInNode` for managing the component's presence in a scene graph node. This component is useful for interactive simulations where users need to visualize data associated with mesh elements or nodes in a color-coded manner. It enables detailed visual feedback on simulation states and supports customization through various configurable fields.
- abstract
- The `DataDisplay` component visualizes color-coded data associated with mesh elements or nodes, providing interactive feedback on simulation states.
- sheet
- # DataDisplay **Overview** The `DataDisplay` component in the SOFA framework provides functionality for rendering and displaying scalar data associated with a mesh. It inherits from `VisualModel`, indicating its role in visualizing aspects of a simulation. The component interacts with other components through links to an `OglColorMap` for mapping scalar values to colors and a `BaseMeshTopology` for the topology of the mesh being rendered. **Parameters and Data** The significant data fields exposed by the component include: - **f_maximalRange**: A boolean flag indicating whether to keep the maximal range through all timesteps (`bool`, default: `false`). - **f_pointData, f_triangleData, f_quadData**: Arrays storing data associated with nodes and mesh elements (triangles and quads) (`VecPointData` or `VecCellData`). - **f_pointTriangleData, f_pointQuadData**: Arrays storing additional data for specific interactions between nodes and mesh elements (`VecPointData`). - **f_colorNaN**: A color used to render NaN values, defaulting to black (RGBA: [0.0, 0.0, 0.0, 1.0]) (`sofa::type::RGBAColor`, default: `[0.0, 0.0, 0.0, 1.0]`). - **d_userRange**: User-defined range values to clamp the data for visualization (`type::Vec2f`). - **d_shininess**: Shininess parameter for point-based rendering in the range [0, 128], where negative values indicate no specularity (`float`, default: `0.0`). **Dependencies and Connections** The component requires links to an `OglColorMap` for mapping scalar data to colors and a `BaseMeshTopology` representing the mesh topology.
- description
- The `DataDisplay` component in the SOFA framework is part of the Sofa.GL.Component.Rendering3D module and provides functionality for color rendering of data associated with a mesh. It inherits from `VisualModel`, which indicates its role in visualizing aspects of a simulation. This component interacts with other components through links to an `OglColorMap` for mapping scalar values to colors and a `BaseMeshTopology` for the topology of the mesh being rendered. The component has several data fields that allow users to customize the rendering, such as setting the range of data to display (`f_maximalRange`, `d_userRange`), specifying different types of data associated with nodes or elements (`f_pointData`, `f_triangleData`, etc.), and defining colors for NaN values (`f_colorNaN`). Additional settings include adjusting the shininess for point-based rendering (`d_shininess`). The component provides methods to initialize, draw, and update visualizations. These include `init` for initialization, `doDrawVisual` and `doUpdateVisual` for visualization updates, and `insertInNode`/`removeInNode` for managing the component's presence in a scene graph node. This component is useful for interactive simulations where users need to visualize data associated with mesh elements or nodes in a color-coded manner. It enables detailed visual feedback on simulation states and supports customization through various configurable fields.
- maths
- The `DataDisplay` component in the SOFA framework is primarily focused on visualizing data associated with mesh elements or nodes. It does not contribute to any governing equations, constitutive laws, or numerical methods directly related to the Finite Element Method (FEM) pipeline. Instead, it serves a role in rendering and displaying simulation results in an interactive manner. ### Mathematical and Physical Description: #### Governing Equations / Operators: - **None**: The `DataDisplay` component does not implement or contribute to any governing equations such as the mass matrix (M), stiffness matrix (K), internal force vector ($ extbf{f}_{ ext{int}}$), residual vector (R), etc. Its primary function is visual rendering. #### Constitutive / Kinematic Laws: - **None**: This component does not involve any constitutive laws such as strain measures, stress tensors, hyperelastic potentials, or damping models. It does not have a role in the mechanics of the simulation. #### Role in Global FEM Pipeline: - **Rendering and Visualization**: The `DataDisplay` component is responsible for visualizing data associated with mesh elements (nodes, triangles, quads) by mapping scalar values to colors through an OglColorMap. This allows users to interpret simulation results visually, providing color-coded feedback on various aspects of the model. #### Numerical Methods / Discretization Choices: - **None**: There are no numerical methods or discretization choices encoded in this component related to FEM. Its functionality is purely visual and does not influence the computational mechanics of the system. #### Integration into Variational / Lagrangian Mechanics Framework: - **Visual Component**: The `DataDisplay` component fits into the broader framework by providing a means to visualize simulation results, but it does not interact with the variational or Lagrangian mechanics directly. It is part of the visualization layer and works in conjunction with other components responsible for the mechanical aspects of the simulation. ### Data Fields: - **f_maximalRange**: A boolean flag indicating whether to keep the maximal range through all timesteps. - **f_pointData, f_triangleData, f_quadData**: Arrays storing data associated with nodes and mesh elements (triangles and quads). - **f_pointTriangleData, f_pointQuadData**: Arrays storing additional data for specific interactions between nodes and mesh elements. - **f_colorNaN**: A color used to render NaN values, defaulting to black (RGBA: [0.0, 0.0, 0.0, 1.0]). - **d_userRange**: User-defined range values to clamp the data for visualization. - **d_shininess**: Shininess parameter for point-based rendering in the range [0, 128], where negative values indicate no specularity. ### Links: - **l_colorMap**: A link to an `OglColorMap` component used for mapping scalar data to colors. - **l_topology**: A link to a `BaseMeshTopology` component representing the mesh topology, which helps in associating data with specific elements and nodes. In summary, the `DataDisplay` component is a visualization tool within SOFA, designed to provide color-coded visual feedback on simulation states without influencing any of the mechanical or numerical aspects of FEM simulations.
{
"name": "DataDisplay",
"main": {
"name": "DataDisplay",
"namespace": "sofa::gl::component::rendering3d",
"module": "Sofa.GL.Component.Rendering3D",
"include": "sofa/gl/component/rendering3d/DataDisplay.h",
"doc": "Color rendering of data associated with a mesh.",
"inherits": [
"VisualModel"
],
"templates": [],
"data_fields": [
{
"name": "f_maximalRange",
"type": "bool",
"xmlname": "maximalRange",
"help": "Keep the maximal range through all timesteps"
},
{
"name": "f_pointData",
"type": "VecPointData",
"xmlname": "pointData",
"help": "Data associated with nodes"
},
{
"name": "f_triangleData",
"type": "VecCellData",
"xmlname": "triangleData",
"help": "Data associated with triangles"
},
{
"name": "f_quadData",
"type": "VecCellData",
"xmlname": "quadData",
"help": "Data associated with quads"
},
{
"name": "f_pointTriangleData",
"type": "VecPointData",
"xmlname": "pointTriangleData",
"help": "Data associated with nodes per triangle"
},
{
"name": "f_pointQuadData",
"type": "VecPointData",
"xmlname": "pointQuadData",
"help": "Data associated with nodes per quad"
},
{
"name": "f_colorNaN",
"type": "sofa::type::RGBAColor",
"xmlname": "colorNaN",
"help": "Color used for NaN values (default=[0.0,0.0,0.0,1.0])"
},
{
"name": "d_userRange",
"type": "type::Vec2f",
"xmlname": "userRange",
"help": "Clamp to this values (if max>min)"
},
{
"name": "d_shininess",
"type": "float",
"xmlname": "shininess",
"help": "Shininess for rendering point-based data [0,128]. <0 means no specularity"
}
],
"links": [
{
"name": "l_colorMap",
"target": "OglColorMap",
"kind": "single",
"xmlname": "colorMap",
"help": "link to the color map"
},
{
"name": "l_topology",
"target": "BaseMeshTopology",
"kind": "single",
"xmlname": "topology",
"help": "link to the topology container"
}
],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "doDrawVisual",
"return_type": "void",
"params": [
{
"name": "vparams",
"type": "const core::visual::VisualParams *"
}
],
"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": "insertInNode",
"return_type": "bool",
"params": [
{
"name": "node",
"type": "core::objectmodel::BaseNode *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeInNode",
"return_type": "bool",
"params": [
{
"name": "node",
"type": "core::objectmodel::BaseNode *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "computeNormals",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
}
]
},
"desc": {
"description": "The `DataDisplay` component in the SOFA framework is part of the Sofa.GL.Component.Rendering3D module and provides functionality for color rendering of data associated with a mesh. It inherits from `VisualModel`, which indicates its role in visualizing aspects of a simulation. This component interacts with other components through links to an `OglColorMap` for mapping scalar values to colors and a `BaseMeshTopology` for the topology of the mesh being rendered.\n\nThe component has several data fields that allow users to customize the rendering, such as setting the range of data to display (`f_maximalRange`, `d_userRange`), specifying different types of data associated with nodes or elements (`f_pointData`, `f_triangleData`, etc.), and defining colors for NaN values (`f_colorNaN`). Additional settings include adjusting the shininess for point-based rendering (`d_shininess`).\n\nThe component provides methods to initialize, draw, and update visualizations. These include `init` for initialization, `doDrawVisual` and `doUpdateVisual` for visualization updates, and `insertInNode`/`removeInNode` for managing the component's presence in a scene graph node.\n\nThis component is useful for interactive simulations where users need to visualize data associated with mesh elements or nodes in a color-coded manner. It enables detailed visual feedback on simulation states and supports customization through various configurable fields."
},
"maths": {
"maths": "The `DataDisplay` component in the SOFA framework is primarily focused on visualizing data associated with mesh elements or nodes. It does not contribute to any governing equations, constitutive laws, or numerical methods directly related to the Finite Element Method (FEM) pipeline. Instead, it serves a role in rendering and displaying simulation results in an interactive manner.\n\n### Mathematical and Physical Description:\n\n#### Governing Equations / Operators:\n- **None**: The `DataDisplay` component does not implement or contribute to any governing equations such as the mass matrix (M), stiffness matrix (K), internal force vector (\f$\textbf{f}_{\text{int}}\f$), residual vector (R), etc. Its primary function is visual rendering.\n\n#### Constitutive / Kinematic Laws:\n- **None**: This component does not involve any constitutive laws such as strain measures, stress tensors, hyperelastic potentials, or damping models. It does not have a role in the mechanics of the simulation.\n\n#### Role in Global FEM Pipeline:\n- **Rendering and Visualization**: The `DataDisplay` component is responsible for visualizing data associated with mesh elements (nodes, triangles, quads) by mapping scalar values to colors through an OglColorMap. This allows users to interpret simulation results visually, providing color-coded feedback on various aspects of the model.\n\n#### Numerical Methods / Discretization Choices:\n- **None**: There are no numerical methods or discretization choices encoded in this component related to FEM. Its functionality is purely visual and does not influence the computational mechanics of the system.\n\n#### Integration into Variational / Lagrangian Mechanics Framework:\n- **Visual Component**: The `DataDisplay` component fits into the broader framework by providing a means to visualize simulation results, but it does not interact with the variational or Lagrangian mechanics directly. It is part of the visualization layer and works in conjunction with other components responsible for the mechanical aspects of the simulation.\n\n### Data Fields:\n- **f_maximalRange**: A boolean flag indicating whether to keep the maximal range through all timesteps.\n- **f_pointData, f_triangleData, f_quadData**: Arrays storing data associated with nodes and mesh elements (triangles and quads).\n- **f_pointTriangleData, f_pointQuadData**: Arrays storing additional data for specific interactions between nodes and mesh elements.\n- **f_colorNaN**: A color used to render NaN values, defaulting to black (RGBA: [0.0, 0.0, 0.0, 1.0]).\n- **d_userRange**: User-defined range values to clamp the data for visualization.\n- **d_shininess**: Shininess parameter for point-based rendering in the range [0, 128], where negative values indicate no specularity.\n\n### Links:\n- **l_colorMap**: A link to an `OglColorMap` component used for mapping scalar data to colors.\n- **l_topology**: A link to a `BaseMeshTopology` component representing the mesh topology, which helps in associating data with specific elements and nodes.\n\nIn summary, the `DataDisplay` component is a visualization tool within SOFA, designed to provide color-coded visual feedback on simulation states without influencing any of the mechanical or numerical aspects of FEM simulations."
},
"summary": {
"abstract": "The `DataDisplay` component visualizes color-coded data associated with mesh elements or nodes, providing interactive feedback on simulation states.",
"sheet": "# DataDisplay\n\n**Overview**\n\nThe `DataDisplay` component in the SOFA framework provides functionality for rendering and displaying scalar data associated with a mesh. It inherits from `VisualModel`, indicating its role in visualizing aspects of a simulation. The component interacts with other components through links to an `OglColorMap` for mapping scalar values to colors and a `BaseMeshTopology` for the topology of the mesh being rendered.\n\n**Parameters and Data**\n\nThe significant data fields exposed by the component include:\n\n- **f_maximalRange**: A boolean flag indicating whether to keep the maximal range through all timesteps (`bool`, default: `false`).\n- **f_pointData, f_triangleData, f_quadData**: Arrays storing data associated with nodes and mesh elements (triangles and quads) (`VecPointData` or `VecCellData`).\n- **f_pointTriangleData, f_pointQuadData**: Arrays storing additional data for specific interactions between nodes and mesh elements (`VecPointData`).\n- **f_colorNaN**: A color used to render NaN values, defaulting to black (RGBA: [0.0, 0.0, 0.0, 1.0]) (`sofa::type::RGBAColor`, default: `[0.0, 0.0, 0.0, 1.0]`).\n- **d_userRange**: User-defined range values to clamp the data for visualization (`type::Vec2f`).\n- **d_shininess**: Shininess parameter for point-based rendering in the range [0, 128], where negative values indicate no specularity (`float`, default: `0.0`).\n\n**Dependencies and Connections**\n\nThe component requires links to an `OglColorMap` for mapping scalar data to colors and a `BaseMeshTopology` representing the mesh topology.\n"
}
}