PauseAnimationOnEvent
This component pauses the simulation when receiving a PauseEvent.
This component pauses the SOFA simulation upon receiving a `PauseEvent`, providing external control over the simulation's progress.
- module
- Sofa.Component.SceneUtility
- namespace
- sofa::component::sceneutility
- include
- sofa/component/sceneutility/PauseAnimationOnEvent.h
- inherits
-
- PauseAnimation
- description
The PauseAnimationOnEvent component in the SOFA framework is primarily concerned with controlling the simulation flow rather than implementing or contributing to any mathematical equations or operators used in the FEM pipeline. This component does not contribute directly to governing equations such as the mass matrix $M$, stiffness matrix $K$, internal force vector $oldsymbol{f}_{int}$, residual $oldsymbol{R}$, etc. It also does not involve any constitutive or kinematic laws, strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, or other physical quantities typically associated with FEM simulations.
The PauseAnimationOnEvent component's primary role is to pause the simulation when it receives a PauseEvent. This functionality is achieved through its method handleEvent, which checks if the received event is of type PauseEvent. If so, it sets an internal boolean flag paused to true and calls the pause() method inherited from the PauseAnimation class. The isPaused method returns whether the animation is currently paused.
Since this component primarily handles events and simulation control rather than numerical or physical computations, its mathematical content is minimal. It does not play a role in assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping within the FEM pipeline. Instead, it provides a mechanism for external control over the simulation's progress.
In summary, PauseAnimationOnEvent serves as an interface to pause the simulation based on event-driven logic and does not contribute to any mathematical formulation specific to computational mechanics.
Methods
void
init
()
virtual
bool
isPaused
()
virtual
void
handleEvent
(sofa::core::objectmodel::Event * event)
virtual
{
"name": "PauseAnimationOnEvent",
"namespace": "sofa::component::sceneutility",
"module": "Sofa.Component.SceneUtility",
"include": "sofa/component/sceneutility/PauseAnimationOnEvent.h",
"doc": "This component pauses the simulation when receiving a PauseEvent.",
"inherits": [
"PauseAnimation"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "isPaused",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "handleEvent",
"return_type": "void",
"params": [
{
"name": "event",
"type": "sofa::core::objectmodel::Event *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `PauseAnimationOnEvent` component in the SOFA framework is designed to pause the simulation when it receives a `PauseEvent`. It inherits from the `PauseAnimation` class and implements methods for initialization (`init`) and event handling (`handleEvent`). The `handleEvent` method checks if the received event is a `PauseEvent`, and if so, sets an internal `paused` flag to `true` and triggers the pause operation. This component is particularly useful in scenarios where external events need to control the simulation flow, such as halting the simulation based on specific conditions or user interactions. The `isPaused` method returns whether the animation is currently paused. No data fields are explicitly defined, and it relies on inheritance for its primary functionality.",
"maths": "The `PauseAnimationOnEvent` component in the SOFA framework is primarily concerned with controlling the simulation flow rather than implementing or contributing to any mathematical equations or operators used in the FEM pipeline. This component does not contribute directly to governing equations such as the mass matrix \\(M\\), stiffness matrix \\(K\\), internal force vector \\(\boldsymbol{f}_{int}\\), residual \\(\boldsymbol{R}\\), etc. It also does not involve any constitutive or kinematic laws, strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, or other physical quantities typically associated with FEM simulations.\n\nThe `PauseAnimationOnEvent` component's primary role is to pause the simulation when it receives a `PauseEvent`. This functionality is achieved through its method `handleEvent`, which checks if the received event is of type `PauseEvent`. If so, it sets an internal boolean flag `paused` to `true` and calls the `pause()` method inherited from the `PauseAnimation` class. The `isPaused` method returns whether the animation is currently paused.\n\nSince this component primarily handles events and simulation control rather than numerical or physical computations, its mathematical content is minimal. It does not play a role in assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping within the FEM pipeline. Instead, it provides a mechanism for external control over the simulation's progress.\n\nIn summary, `PauseAnimationOnEvent` serves as an interface to pause the simulation based on event-driven logic and does not contribute to any mathematical formulation specific to computational mechanics.",
"abstract": "This component pauses the SOFA simulation upon receiving a `PauseEvent`, providing external control over the simulation's progress.",
"sheet": "\n# PauseAnimationOnEvent\n\n## Overview\nThe `PauseAnimationOnEvent` component is designed to pause the simulation when it receives a `PauseEvent`. It inherits from the `PauseAnimation` class and implements methods for initialization (`init`) and event handling (`handleEvent`). This component allows external control over the simulation flow, such as halting based on specific conditions or user interactions.\n\n## Practical Notes\nThe `PauseAnimationOnEvent` component relies on receiving a `PauseEvent` to trigger its pause functionality. It does not have any configurable parameters or data fields. The event handling is straightforward and does not involve complex numerical or physical computations."
}