LineAxis
Display scene axis
The `LineAxis` component displays scene axes for visualization purposes, allowing customization of line size, thickness, and whether they are infinite or vanish gradually.
- module
- Sofa.Component.Visual
- namespace
- sofa::component::visual
- include
- sofa/component/visual/LineAxis.h
- inherits
-
- VisualModel
- description
The LineAxis component in the SOFA framework is primarily a visualization tool and does not contribute to any mathematical or physical operators such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, residual $R$, etc. It serves to display axis lines (X, Y, Z) within the simulation scene for orientation purposes.
Role in FEM Pipeline:
The LineAxis component is not part of the core numerical simulation process but rather provides a visual aid during the simulation. It does not participate in any assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping steps of the FEM pipeline.
Numerical Methods and Discretization Choices:
The LineAxis component uses simple geometric operations to draw lines based on user-specified parameters such as size, thickness, and whether the lines are infinite. It does not involve any complex numerical methods or discretization choices relevant to FEM simulations.
Fitting into Variational / Lagrangian Mechanics Framework:
The LineAxis component has no role in the variational or Lagrangian mechanics framework since it is purely a visualization tool and does not contribute to the physics-based simulation of deformable continua.
Data Fields
| Name | Type | Default | Help |
|---|---|---|---|
d_size |
float | |
Size of the lines. |
d_infinite |
bool | |
If true, ignore the 'size' and draw infinite lines. |
d_thickness |
float | |
Thickness of the lines. |
d_vanishing |
bool | |
In case of infinite lines, should the lines gradually vanish. |
Methods
void
init
()
virtual
void
reinit
()
virtual
void
doDrawVisual
(const core::visual::VisualParams * )
virtual
void
doUpdateVisual
(const core::visual::VisualParams * )
virtual
void
updateLine
()
{
"name": "LineAxis",
"namespace": "sofa::component::visual",
"module": "Sofa.Component.Visual",
"include": "sofa/component/visual/LineAxis.h",
"doc": "Display scene axis",
"inherits": [
"VisualModel"
],
"templates": [],
"data_fields": [
{
"name": "d_size",
"type": "float",
"xmlname": "size",
"help": "Size of the lines."
},
{
"name": "d_infinite",
"type": "bool",
"xmlname": "infinite",
"help": "If true, ignore the 'size' and draw infinite lines."
},
{
"name": "d_thickness",
"type": "float",
"xmlname": "thickness",
"help": "Thickness of the lines."
},
{
"name": "d_vanishing",
"type": "bool",
"xmlname": "vanishing",
"help": "In case of infinite lines, should the lines gradually vanish."
}
],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"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": "doDrawVisual",
"return_type": "void",
"params": [
{
"name": "",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "doUpdateVisual",
"return_type": "void",
"params": [
{
"name": "",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "updateLine",
"return_type": "void",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `LineAxis` component in the SOFA framework is part of the Sofa.Component.Visual module and is used to display scene axes for visualization purposes. It inherits from the `VisualModel` class, which indicates its role in rendering visual representations within a simulation scene.\n\n**Role and Purpose:**\nThe primary function of `LineAxis` is to draw axis lines (X, Y, Z) in the scene, aiding in orientation and providing visual cues for spatial understanding. Users can customize the appearance of these axes using various data fields such as size, thickness, and whether they should be infinite or vanish gradually.\n\n**Interactions with Other Components:**\nThe `LineAxis` interacts with other SOFA components through its virtual methods, including `init`, `reinit`, `doDrawVisual`, and `doUpdateVisual`. These methods are part of the `core::visual::VisualModel` interface, allowing `LineAxis` to integrate seamlessly into the visualization pipeline. The `updateLine` method is responsible for updating the axis lines based on user-defined parameters.\n\n**Practical Usage Guidance:**\nThe component provides several configurable data fields:\n- **size**: Controls the length of the drawn lines (unless infinite).\n- **infinite**: Determines whether the lines are finite or extend infinitely in both directions.\n- **thickness**: Sets the thickness of the axis lines.\n- **vanishing**: When set to true, makes infinite lines gradually fade out.\n\nUsers can specify which axes (X, Y, Z) they want to draw through a string configuration field (`axis`). The `init` and `reinit` methods ensure that the component is properly initialized and updated throughout the simulation.",
"maths": "The `LineAxis` component in the SOFA framework is primarily a visualization tool and does not contribute to any mathematical or physical operators such as mass matrix \\(M\\), stiffness matrix \\(K\\), internal force \\(f_{int}\\), residual \\(R\\), etc. It serves to display axis lines (X, Y, Z) within the simulation scene for orientation purposes.\n\n**Role in FEM Pipeline:**\nThe `LineAxis` component is not part of the core numerical simulation process but rather provides a visual aid during the simulation. It does not participate in any assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping steps of the FEM pipeline.\n\n**Numerical Methods and Discretization Choices:**\nThe `LineAxis` component uses simple geometric operations to draw lines based on user-specified parameters such as size, thickness, and whether the lines are infinite. It does not involve any complex numerical methods or discretization choices relevant to FEM simulations.\n\n**Fitting into Variational / Lagrangian Mechanics Framework:**\nThe `LineAxis` component has no role in the variational or Lagrangian mechanics framework since it is purely a visualization tool and does not contribute to the physics-based simulation of deformable continua.",
"abstract": "The `LineAxis` component displays scene axes for visualization purposes, allowing customization of line size, thickness, and whether they are infinite or vanish gradually.",
"sheet": "# LineAxis\n\n## Overview\nThe `LineAxis` component is part of the Sofa.Component.Visual module and inherits from the `VisualModel` class. Its primary role is to display scene axes (X, Y, Z) for orientation purposes within a simulation scene.\n\n## Parameters and Data\n- **size**: Controls the length of the drawn lines unless they are set to be infinite (`float`, default: not specified).\n- **infinite**: Determines whether the lines extend infinitely in both directions (`bool`, default: `false`).\n- **thickness**: Sets the thickness of the axis lines (`float`, default: not specified).\n- **vanishing**: When true, makes infinite lines gradually fade out (`bool`, default: `false`)."
}