Primitive
`Primitive` represents basic geometric primitives used for rendering in SOFA simulations, providing methods to access vertex positions, colors, bounding boxes, and the number of vertices.
- namespace
- vrender
- include
- Primitive.h
- description
The Primitive class in the SOFA framework is part of the vrender module and serves as an abstract base class for representing basic geometric primitives used primarily for rendering purposes. It provides several methods that allow access to essential geometric information required for visualization tasks within the simulation environment. However, it does not directly contribute to the core computational mechanics or FEM pipeline. The mathematical content is limited to the representation of geometric data rather than constitutive laws, governing equations, or numerical methods commonly associated with deformable body simulations.
The Primitive class includes the following pure virtual functions:
- sommet3DColor(int): Returns a reference to a Feedback3DColor, which presumably represents the color information for a vertex identified by an integer index. This method is used in rendering tasks and does not have any direct impact on the physical simulation.
egin{equation} exttt{const Feedback3DColor& sommet3DColor(int index)}
ag{1}
ext{where } exttt{index} ext{ identifies a vertex.}
ext{This function does not contribute to the physics or FEM pipeline.}
ag{2}
ext{The color information is used in visualization, not mechanics.}
ag{3}
ext{Thus, no mathematical or physical equations are involved.}
ag{4}
ext{The function is purely for graphical representation.}
ag{5}
ext{No constitutive laws or governing equations are relevant here.}
ag{6}
- vertex(int): Returns a reference to the position vector
Vector3of a vertex identified by an integer index. This method is used to access the geometric data necessary for rendering and collision detection.
egin{equation} exttt{const Vector3& vertex(int index)}
ag{7}
ext{where } exttt{index} ext{ identifies a vertex.}
ag{8}
ext{This function does not contribute to the physics or FEM pipeline.}
ag{9}
- bbox(): Returns an
AxisAlignedBox_xyz, which represents the axis-aligned bounding box of the primitive. This method is useful for collision detection, spatial partitioning, and other visualization tasks.
egin{equation} exttt{AxisAlignedBox_xyz bbox()}
ag{10}
ext{This function does not contribute to the physics or FEM pipeline.}
ag{11}
- nbVertices(): Returns an integer representing the number of vertices associated with the primitive, which is useful for rendering and geometric processing tasks.
egin{equation} exttt{int nbVertices()}
ag{12}
ext{This function does not contribute to the physics or FEM pipeline.}
ag{13}
In summary, the Primitive class provides essential methods for accessing geometric information required for rendering and visualization but does not directly participate in the mathematical or physical aspects of the FEM simulation process such as mass matrix assembly, stiffness computation, internal forces evaluation, or nonlinear solution procedures. The methods are purely related to graphical representation and do not involve any constitutive laws, governing equations, or numerical discretization schemes associated with computational mechanics.
Methods
const Feedback3DColor &
sommet3DColor
(int )
virtual
const Vector3 &
vertex
(int )
virtual
AxisAlignedBox_xyz
bbox
()
virtual
int
nbVertices
()
{
"name": "Primitive",
"namespace": "vrender",
"module": "",
"include": "Primitive.h",
"doc": "",
"inherits": [],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "sommet3DColor",
"return_type": "const Feedback3DColor &",
"params": [
{
"name": "",
"type": "int"
}
],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "vertex",
"return_type": "const Vector3 &",
"params": [
{
"name": "",
"type": "int"
}
],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "bbox",
"return_type": "AxisAlignedBox_xyz",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "nbVertices",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `Primitive` class in the SOFA framework is part of the vrender module and is designed to represent basic geometric primitives used for rendering. It provides methods to access vertices, vertex colors, bounding boxes, and the number of vertices, which are essential for visualization tasks within the simulation environment. The pure virtual functions `sommet3DColor` and `vertex` suggest that this class is intended to be inherited from and implemented by specific primitive classes like spheres or cubes. The method `bbox` returns the axis-aligned bounding box of the primitive, aiding in collision detection or spatial partitioning. `nbVertices` provides a count of vertices associated with the primitive, useful for rendering and geometric processing tasks.",
"maths": "The `Primitive` class in the SOFA framework is part of the vrender module and serves as an abstract base class for representing basic geometric primitives used primarily for rendering purposes. It provides several methods that allow access to essential geometric information required for visualization tasks within the simulation environment. However, it does not directly contribute to the core computational mechanics or FEM pipeline. The mathematical content is limited to the representation of geometric data rather than constitutive laws, governing equations, or numerical methods commonly associated with deformable body simulations.\n\nThe `Primitive` class includes the following pure virtual functions:\n- **sommet3DColor(int)**: Returns a reference to a `Feedback3DColor`, which presumably represents the color information for a vertex identified by an integer index. This method is used in rendering tasks and does not have any direct impact on the physical simulation.\n\n\begin{equation}\texttt{const Feedback3DColor& sommet3DColor(int index)}\n\tag{1}\n\text{where } \texttt{index} \text{ identifies a vertex.}\n\text{This function does not contribute to the physics or FEM pipeline.}\n\tag{2}\n\text{The color information is used in visualization, not mechanics.}\n\tag{3}\n\text{Thus, no mathematical or physical equations are involved.}\n\tag{4}\n\text{The function is purely for graphical representation.}\n\tag{5}\n\text{No constitutive laws or governing equations are relevant here.}\n\tag{6}\n\n- **vertex(int)**: Returns a reference to the position vector `Vector3` of a vertex identified by an integer index. This method is used to access the geometric data necessary for rendering and collision detection.\n\n\begin{equation}\texttt{const Vector3& vertex(int index)}\n\tag{7}\n\text{where } \texttt{index} \text{ identifies a vertex.}\n\tag{8}\n\text{This function does not contribute to the physics or FEM pipeline.}\n\tag{9}\n\n- **bbox()**: Returns an `AxisAlignedBox_xyz`, which represents the axis-aligned bounding box of the primitive. This method is useful for collision detection, spatial partitioning, and other visualization tasks.\n\n\begin{equation}\texttt{AxisAlignedBox_xyz bbox()}\n\tag{10}\n\text{This function does not contribute to the physics or FEM pipeline.}\n\tag{11}\n\n- **nbVertices()**: Returns an integer representing the number of vertices associated with the primitive, which is useful for rendering and geometric processing tasks.\n\n\begin{equation}\texttt{int nbVertices()}\n\tag{12}\n\text{This function does not contribute to the physics or FEM pipeline.}\n\tag{13}\n\nIn summary, the `Primitive` class provides essential methods for accessing geometric information required for rendering and visualization but does not directly participate in the mathematical or physical aspects of the FEM simulation process such as mass matrix assembly, stiffness computation, internal forces evaluation, or nonlinear solution procedures. The methods are purely related to graphical representation and do not involve any constitutive laws, governing equations, or numerical discretization schemes associated with computational mechanics.\n",
"abstract": "`Primitive` represents basic geometric primitives used for rendering in SOFA simulations, providing methods to access vertex positions, colors, bounding boxes, and the number of vertices.",
"sheet": "# Primitive\n\n## Overview\nThe `Primitive` class is an abstract base class in the vrender module of SOFA. It serves as a template for representing basic geometric primitives used primarily for rendering purposes within the simulation environment. This class does not directly contribute to computational mechanics or FEM but provides essential methods for accessing geometric data required for visualization tasks.\n\n## Parameters and Data\nThe `Primitive` class exposes several public methods that allow access to essential geometric information:\n- **sommet3DColor(int index)**: Returns a reference to the color information (`Feedback3DColor`) of a vertex identified by an integer index. This method is used in rendering tasks.\n- **vertex(int index)**: Returns a reference to the position vector (`Vector3`) of a vertex identified by an integer index. This method provides access to geometric data necessary for rendering and collision detection.\n- **bbox()**: Returns the axis-aligned bounding box (`AxisAlignedBox_xyz`) of the primitive, aiding in collision detection or spatial partitioning tasks.\n- **nbVertices()**: Returns an integer representing the number of vertices associated with the primitive, useful for rendering and geometric processing tasks."
}