PauseAnimation
sofa::component::sceneutility::PauseAnimation
BaseObject
Doc (from source)
Abstract class defining how to pause the animation.
Abstract (AI generated)
`PauseAnimation` manages the pause state of animations in SOFA simulations by providing mechanisms to control whether the simulation should be paused or resumed.
Metadata
- module
- Sofa.Component.SceneUtility
- namespace
- sofa::component::sceneutility
- include
- sofa/component/sceneutility/PauseAnimation.h
- inherits
-
- BaseObject
- description
The PauseAnimation component in the SOFA framework is an abstract class designed to define mechanisms for pausing and resuming animation within the simulation environment. It does not contribute directly to any governing equations, constitutive laws, or kinematic formulations that are central to FEM simulations. Instead, its role is purely functional and pertains to controlling the state of the animation during runtime.
Governing Equations / Operators:
- No Contribution: The
PauseAnimationcomponent does not implement any governing equations such as mass matrix $M$, stiffness matrix $K$, internal force $f_{int}$, or nonlinear residual $R$. These are handled by other components within the SOFA simulation pipeline.
Constitutive / Kinematic Laws:
- No Contribution: The component does not involve any constitutive laws, strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, etc. These aspects of the mechanical model are managed by specific mechanical state and force field components within SOFA.
Role in FEM Pipeline:
- State Control:
PauseAnimationis responsible for controlling whether the simulation animation should be paused or resumed. It does not directly participate in assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping steps of the global FEM pipeline.
Numerical Methods / Discretization Choices:
- No Contribution: The component does not encode any numerical methods or discretization choices relevant to the simulation process. It operates at a higher level of abstraction, managing the overall animation state rather than the numerical solution details.
Variational / Lagrangian Mechanics Framework:
- No Direct Involvement:
PauseAnimationis an auxiliary utility component and does not directly fit into the variational or Lagrangian mechanics framework. Its functionality pertains to controlling the simulation runtime behavior, specifically pausing and resuming animation.
Summary:
- The
PauseAnimationcomponent is a scene utility that provides mechanisms for managing the pause state of the animation within the SOFA simulation environment. It does not contribute to any mathematical or physical aspects of the FEM simulation but serves as a control mechanism for runtime behavior.
Methods
void
init
()
virtual
bool
isPaused
()
virtual
void
pause
()
virtual
{
"name": "PauseAnimation",
"namespace": "sofa::component::sceneutility",
"module": "Sofa.Component.SceneUtility",
"include": "sofa/component/sceneutility/PauseAnimation.h",
"doc": "Abstract class defining how to pause the animation.",
"inherits": [
"BaseObject"
],
"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": true,
"is_static": false,
"access": "public"
},
{
"name": "pause",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
],
"description": "The `PauseAnimation` component in the SOFA framework is an abstract class designed to define mechanisms for pausing and resuming animation within the simulation environment. It inherits from `BaseObject`, indicating that it serves as a foundational element in managing scene utilities.\n\n**Role and Purpose:**\n- The primary role of `PauseAnimation` is to provide functionalities for controlling the pause state of the animation. It enables the implementation of custom pause mechanisms, allowing developers to integrate different strategies for pausing the simulation.\n\n**Interactions with Other Components:*\n- Through its virtual method `isPaused`, subclasses can implement specific logic to determine whether the animation should be paused.\n- The `pause` method is designed to stop the animation by setting the root node's animate flag to false, thereby controlling the main loop of the simulation.\n\n**Practical Usage Guidance:**\n- Developers using this component must provide implementations for the pure virtual function `isPaused`. \n- The initialization (`init`) method sets up the context and retrieves the root node to control animation state. This ensures that when the pause method is called, it can correctly propagate the pause command throughout the scene graph.",
"maths": "The `PauseAnimation` component in the SOFA framework is an abstract class designed to define mechanisms for pausing and resuming animation within the simulation environment. It does not contribute directly to any governing equations, constitutive laws, or kinematic formulations that are central to FEM simulations. Instead, its role is purely functional and pertains to controlling the state of the animation during runtime.\n\n### Governing Equations / Operators:\n- **No Contribution**: The `PauseAnimation` component does not implement any governing equations such as mass matrix \\(M\\), stiffness matrix \\(K\\), internal force \\(f_{int}\\), or nonlinear residual \\(R\\). These are handled by other components within the SOFA simulation pipeline.\n\n### Constitutive / Kinematic Laws:\n- **No Contribution**: The component does not involve any constitutive laws, strain measures, stress tensors, hyperelastic potentials, damping models, constraint Jacobians, etc. These aspects of the mechanical model are managed by specific mechanical state and force field components within SOFA.\n\n### Role in FEM Pipeline:\n- **State Control**: `PauseAnimation` is responsible for controlling whether the simulation animation should be paused or resumed. It does not directly participate in assembly, time integration, nonlinear solve, linear solve, constraint handling, or mapping steps of the global FEM pipeline.\n\n### Numerical Methods / Discretization Choices:\n- **No Contribution**: The component does not encode any numerical methods or discretization choices relevant to the simulation process. It operates at a higher level of abstraction, managing the overall animation state rather than the numerical solution details.\n\n### Variational / Lagrangian Mechanics Framework:\n- **No Direct Involvement**: `PauseAnimation` is an auxiliary utility component and does not directly fit into the variational or Lagrangian mechanics framework. Its functionality pertains to controlling the simulation runtime behavior, specifically pausing and resuming animation.\n\n### Summary:\n- The `PauseAnimation` component is a scene utility that provides mechanisms for managing the pause state of the animation within the SOFA simulation environment. It does not contribute to any mathematical or physical aspects of the FEM simulation but serves as a control mechanism for runtime behavior.",
"abstract": "`PauseAnimation` manages the pause state of animations in SOFA simulations by providing mechanisms to control whether the simulation should be paused or resumed.",
"sheet": "# PauseAnimation\n\n## Overview\nThe `PauseAnimation` component is an abstract class that defines how to pause and resume animation within the SOFA framework. It inherits from `BaseObject`, indicating its role as a foundational element in managing scene utilities.\n\n## Practical Notes\nDevelopers must implement the pure virtual function `isPaused` to determine whether the simulation should be paused. The `pause` method stops the animation by setting the root node's animate flag to false, thereby controlling the main loop of the simulation."
}