CylinderVisualModel
The `CylinderVisualModel` is a visual representation component in the SOFA ecosystem designed to visualize sets of cylinders within simulations. It inherits from the `core::visual::VisualModel` and implements methods for drawing, initialization, and node management. **Role and Purpose**: The primary role of `CylinderVisualModel` is to provide a visual representation of cylinder-shaped objects in simulations. This component can be used to depict various cylindrical structures or elements within medical, biomechanical, or general interactive simulation environments. **Interactions with Other Components**: Through the API, `CylinderVisualModel` interacts with other SOFA components by inheriting from `core::visual::VisualModel`. It provides methods such as `doDrawVisual`, which allows it to draw cylinders using visual parameters provided by a `drawTool` within the simulation framework. Additionally, it uses data fields like `radius`, `color`, and `d_edges` (a list of edge indices) for configuring the appearance and geometry of the cylinders. **Practical Usage Guidance**: To use this component effectively, one must specify the radius (`radius`) and color (`color`) of the cylinders. The set of edges (`d_edges`) defines the connections between points that form the cylindrical structures. It can be integrated into a simulation by inserting it into the SOFA scenegraph via `insertInNode` method. **Data Fields**: - `radius`: Specifies the radius of each cylinder in the model (float type). - `color`: Defines the color of the cylinders (RGBAColor type). - `d_edges`: Represents a list of edge indices that define the connections between points forming the cylindrical structures.
- abstract
- The `CylinderVisualModel` provides visual representation for sets of cylinders within simulations by specifying their radius, color, and edge connections.
- sheet
- # CylinderVisualModel **Overview**: The `CylinderVisualModel` is a component in the SOFA framework that handles the visualization of cylindrical objects. It inherits from `core::visual::VisualModel`, providing methods for drawing cylinders based on specified geometric properties and colors. **Parameters and Data**: - **radius**: Specifies the radius of each cylinder (float type). - **color**: Defines the color of the cylinders using RGBAColor (red, green, blue, alpha components). - **d_edges**: Represents a list of edge indices that define the connections between points forming the cylindrical structures. **Practical Notes**: To effectively use this component, specify the radius and color via the respective data fields. Ensure that `d_edges` is properly configured to form the desired cylindrical structures within the simulation.
- description
- The `CylinderVisualModel` is a visual representation component in the SOFA ecosystem designed to visualize sets of cylinders within simulations. It inherits from the `core::visual::VisualModel` and implements methods for drawing, initialization, and node management. **Role and Purpose**: The primary role of `CylinderVisualModel` is to provide a visual representation of cylinder-shaped objects in simulations. This component can be used to depict various cylindrical structures or elements within medical, biomechanical, or general interactive simulation environments. **Interactions with Other Components**: Through the API, `CylinderVisualModel` interacts with other SOFA components by inheriting from `core::visual::VisualModel`. It provides methods such as `doDrawVisual`, which allows it to draw cylinders using visual parameters provided by a `drawTool` within the simulation framework. Additionally, it uses data fields like `radius`, `color`, and `d_edges` (a list of edge indices) for configuring the appearance and geometry of the cylinders. **Practical Usage Guidance**: To use this component effectively, one must specify the radius (`radius`) and color (`color`) of the cylinders. The set of edges (`d_edges`) defines the connections between points that form the cylindrical structures. It can be integrated into a simulation by inserting it into the SOFA scenegraph via `insertInNode` method. **Data Fields**: - `radius`: Specifies the radius of each cylinder in the model (float type). - `color`: Defines the color of the cylinders (RGBAColor type). - `d_edges`: Represents a list of edge indices that define the connections between points forming the cylindrical structures.
- maths
- The `CylinderVisualModel` is a visual representation component in the SOFA framework designed to visualize sets of cylinders within simulations. This component does not directly participate in the physical or mathematical modeling aspects but serves as an essential tool for visualization purposes. **Role and Purpose**: The primary role of `CylinderVisualModel` is to provide a visual representation of cylinder-shaped objects in simulations. It does this by drawing cylindrical structures based on specified geometric properties (radius) and color attributes. **Mathematical Description**: - **Geometry**: Each cylinder is defined by its radius \( r \), which is provided via the `radius` data field, and a pair of points that define the axis of the cylinder. These points are stored in the `d_edges` data field as edge indices. - For an edge index \( e = (i, j) \), the corresponding endpoints \( p_1 \) and \( p_2 \) are retrieved from the position vector \( extbf{x} \). - **Drawing**: The `doDrawVisual` method iterates over each edge in `d_edges`, retrieves the coordinates of the points defining the axis, and calls a drawing tool to render the cylinder with the specified radius and color. - Mathematically, for an edge connecting points \( p_1 = (x_{i}, y_{i}, z_{i}) \) and \( p_2 = (x_{j}, y_{j}, z_{j}) \), a cylindrical segment is drawn with radius \( r \). - **Color Representation**: The color of the cylinders is specified by an RGBAColor data field, which includes the red, green, blue, and alpha components. This color is applied to each cylinder during rendering. **Interaction with Other Components**: - `CylinderVisualModel` inherits from `core::visual::VisualModel`, allowing it to interact with other visual elements in the SOFA framework. - It uses data fields like `radius`, `color`, and `d_edges` for configuring the appearance and geometry of the cylinders. The method `doDrawVisual` leverages a drawing tool (`drawTool`) provided by the simulation framework to visualize these cylindrical structures. **Usage Guidance**: To effectively use this component, one must specify the radius and color of the cylinders via the respective data fields. Additionally, the set of edges (defining the connections between points) should be properly configured in `d_edges` to form the desired cylindrical structures within the simulation.
{
"name": "CylinderVisualModel",
"main": {
"name": "CylinderVisualModel",
"namespace": "sofa::component::visual",
"module": "Sofa.Component.Visual",
"include": "sofa/component/visual/CylinderVisualModel.h",
"doc": "Visualize a set of cylinders.",
"inherits": [
"VisualModel"
],
"templates": [],
"data_fields": [
{
"name": "radius",
"type": "float",
"xmlname": "radius",
"help": "Radius of the cylinder."
},
{
"name": "color",
"type": "sofa::type::RGBAColor",
"xmlname": "color",
"help": "Color of the cylinders."
},
{
"name": "d_edges",
"type": "SeqEdges",
"xmlname": "edges",
"help": "List of edge indices"
}
],
"links": [],
"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": "exportOBJ",
"return_type": "void",
"params": [
{
"name": "",
"type": "int"
},
{
"name": "",
"type": "int *"
},
{
"name": "",
"type": "int *"
},
{
"name": "",
"type": "int &"
},
{
"name": "",
"type": "int &"
},
{
"name": "",
"type": "int &"
},
{
"name": "",
"type": "int &"
}
],
"is_virtual": false,
"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"
}
]
},
"desc": {
"description": "The `CylinderVisualModel` is a visual representation component in the SOFA ecosystem designed to visualize sets of cylinders within simulations. It inherits from the `core::visual::VisualModel` and implements methods for drawing, initialization, and node management.\n\n**Role and Purpose**: The primary role of `CylinderVisualModel` is to provide a visual representation of cylinder-shaped objects in simulations. This component can be used to depict various cylindrical structures or elements within medical, biomechanical, or general interactive simulation environments.\n\n**Interactions with Other Components**: Through the API, `CylinderVisualModel` interacts with other SOFA components by inheriting from `core::visual::VisualModel`. It provides methods such as `doDrawVisual`, which allows it to draw cylinders using visual parameters provided by a `drawTool` within the simulation framework. Additionally, it uses data fields like `radius`, `color`, and `d_edges` (a list of edge indices) for configuring the appearance and geometry of the cylinders.\n\n**Practical Usage Guidance**: To use this component effectively, one must specify the radius (`radius`) and color (`color`) of the cylinders. The set of edges (`d_edges`) defines the connections between points that form the cylindrical structures. It can be integrated into a simulation by inserting it into the SOFA scenegraph via `insertInNode` method.\n\n**Data Fields**:\n- `radius`: Specifies the radius of each cylinder in the model (float type).\n- `color`: Defines the color of the cylinders (RGBAColor type).\n- `d_edges`: Represents a list of edge indices that define the connections between points forming the cylindrical structures."
},
"maths": {
"maths": "The `CylinderVisualModel` is a visual representation component in the SOFA framework designed to visualize sets of cylinders within simulations. This component does not directly participate in the physical or mathematical modeling aspects but serves as an essential tool for visualization purposes.\n\n**Role and Purpose**: The primary role of `CylinderVisualModel` is to provide a visual representation of cylinder-shaped objects in simulations. It does this by drawing cylindrical structures based on specified geometric properties (radius) and color attributes.\n\n**Mathematical Description**:\n- **Geometry**: Each cylinder is defined by its radius \\( r \\), which is provided via the `radius` data field, and a pair of points that define the axis of the cylinder. These points are stored in the `d_edges` data field as edge indices.\n - For an edge index \\( e = (i, j) \\), the corresponding endpoints \\( p_1 \\) and \\( p_2 \\) are retrieved from the position vector \\( \textbf{x} \\).\n- **Drawing**: The `doDrawVisual` method iterates over each edge in `d_edges`, retrieves the coordinates of the points defining the axis, and calls a drawing tool to render the cylinder with the specified radius and color.\n - Mathematically, for an edge connecting points \\( p_1 = (x_{i}, y_{i}, z_{i}) \\) and \\( p_2 = (x_{j}, y_{j}, z_{j}) \\), a cylindrical segment is drawn with radius \\( r \\).\n- **Color Representation**: The color of the cylinders is specified by an RGBAColor data field, which includes the red, green, blue, and alpha components. This color is applied to each cylinder during rendering.\n\n**Interaction with Other Components**:\n- `CylinderVisualModel` inherits from `core::visual::VisualModel`, allowing it to interact with other visual elements in the SOFA framework.\n- It uses data fields like `radius`, `color`, and `d_edges` for configuring the appearance and geometry of the cylinders. The method `doDrawVisual` leverages a drawing tool (`drawTool`) provided by the simulation framework to visualize these cylindrical structures.\n\n**Usage Guidance**: To effectively use this component, one must specify the radius and color of the cylinders via the respective data fields. Additionally, the set of edges (defining the connections between points) should be properly configured in `d_edges` to form the desired cylindrical structures within the simulation.\n"
},
"summary": {
"abstract": "The `CylinderVisualModel` provides visual representation for sets of cylinders within simulations by specifying their radius, color, and edge connections.",
"sheet": "# CylinderVisualModel\n\n**Overview**: The `CylinderVisualModel` is a component in the SOFA framework that handles the visualization of cylindrical objects. It inherits from `core::visual::VisualModel`, providing methods for drawing cylinders based on specified geometric properties and colors.\n\n**Parameters and Data**:\n- **radius**: Specifies the radius of each cylinder (float type).\n- **color**: Defines the color of the cylinders using RGBAColor (red, green, blue, alpha components).\n- **d_edges**: Represents a list of edge indices that define the connections between points forming the cylindrical structures.\n\n**Practical Notes**: To effectively use this component, specify the radius and color via the respective data fields. Ensure that `d_edges` is properly configured to form the desired cylindrical structures within the simulation."
}
}