InteractionPerformer
The `InteractionPerformer` is a class in the SOFA framework under the namespace `sofa::gui::component::performer`, part of the module `Sofa.GUI.Component`. It acts as an abstract base class for interaction-related functionality, primarily handling mouse-based user interactions within the GUI. This component does not have data fields but relies on virtual methods to define its behavior. The key virtual methods include: - **configure**: Configures the performer with a MouseButtonSetting instance (though it is not pure virtual). - **start**: A pure virtual method intended for initiating the interaction process. - **execute**: Another pure virtual method, used to perform actions during an ongoing interaction. - **handleEvent**: Processes incoming events; this method can be overridden but isn't mandatory. - **draw**: Handles visual rendering if needed by any derived classes. - **setPerformerFreeze**: Sets a flag indicating that the performer should freeze its current state. This class interacts with other components through these methods and potentially via event handling, allowing it to integrate seamlessly into the SOFA simulation loop. Derived classes are expected to implement `start` and `execute`, while others can be left as is or overridden for specific functionality.
- abstract
- The `InteractionPerformer` class in SOFA is an abstract base for mouse-based user interactions within the GUI, defining methods to configure, start, execute, handle events, draw visuals, and freeze interaction states.
- sheet
- # InteractionPerformer **Overview** The `InteractionPerformer` is an abstract base class designed to facilitate mouse-based user interactions within the SOFA GUI. It defines several virtual methods that must be implemented by derived classes to provide specific interaction logic, including configuration, event handling, and visual rendering. **Practical Notes** Derived classes are expected to implement the `start` and `execute` methods, which are pure virtual and essential for defining the behavior of interactions. The `handleEvent` method can be overridden to process specific events more precisely, while the `draw` method is optional but useful for custom visualizations. The `setPerformerFreeze` method allows freezing interaction states under certain conditions.
- description
- The `InteractionPerformer` is a class in the SOFA framework under the namespace `sofa::gui::component::performer`, part of the module `Sofa.GUI.Component`. It acts as an abstract base class for interaction-related functionality, primarily handling mouse-based user interactions within the GUI. This component does not have data fields but relies on virtual methods to define its behavior. The key virtual methods include: - **configure**: Configures the performer with a MouseButtonSetting instance (though it is not pure virtual). - **start**: A pure virtual method intended for initiating the interaction process. - **execute**: Another pure virtual method, used to perform actions during an ongoing interaction. - **handleEvent**: Processes incoming events; this method can be overridden but isn't mandatory. - **draw**: Handles visual rendering if needed by any derived classes. - **setPerformerFreeze**: Sets a flag indicating that the performer should freeze its current state. This class interacts with other components through these methods and potentially via event handling, allowing it to integrate seamlessly into the SOFA simulation loop. Derived classes are expected to implement `start` and `execute`, while others can be left as is or overridden for specific functionality.
- maths
- The `InteractionPerformer` class in the SOFA framework is an abstract base class designed to handle mouse-based user interactions within the GUI. This component does not directly contribute to any mathematical or physical models, constitutive laws, kinematic formulations, or numerical methods used in the FEM simulation pipeline. Instead, its primary role is to facilitate interaction mechanisms through a set of virtual methods that can be overridden by derived classes for specific functionality. The key methods and their roles are as follows: 1. **configure** - This method configures the `InteractionPerformer` with a `MouseButtonSetting` instance but does not enforce any specific behavior (since it is not pure virtual). It is intended to be overridden by derived classes for custom configuration needs. 2. **start** - A pure virtual method used to initiate the interaction process. Derived classes must implement this method to define what should happen when an interaction starts, such as setting up initial conditions or preparing data structures needed during the interaction. 3. **execute** - Another pure virtual method that performs actions during ongoing interactions. This method is called repeatedly while the interaction is active and can be used for real-time updates based on user input or other events within the simulation. 4. **handleEvent** - Processes incoming events (e.g., mouse clicks, movements). Although this method is virtual and not pure, it provides a default behavior but can be overridden by derived classes to handle specific event types more precisely. 5. **draw** - Handles visual rendering if needed by any derived classes. This method is also virtual but not pure, indicating that derived classes may or may not need to provide custom visualization logic depending on their requirements. 6. **setPerformerFreeze** - Sets a flag (`m_freezePerformer`) indicating that the `InteractionPerformer` should freeze its current state. This can be useful for temporarily pausing interaction behavior during specific conditions or events within the simulation loop. In summary, the `InteractionPerformer` class serves as an abstract interface for user interactions in SOFA and is not directly involved in the mathematical or physical modeling aspects of FEM simulations. Its primary function is to provide a structured way for derived classes to implement interaction logic through virtual method overrides.
{
"name": "InteractionPerformer",
"main": {
"name": "InteractionPerformer",
"namespace": "sofa::gui::component::performer",
"module": "Sofa.GUI.Component",
"include": "sofa/gui/component/performer/InteractionPerformer.h",
"doc": "",
"inherits": [],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "configure",
"return_type": "void",
"params": [
{
"name": "",
"type": "sofa::component::setting::MouseButtonSetting *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "start",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "execute",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": true,
"is_static": false,
"access": "public"
},
{
"name": "handleEvent",
"return_type": "void",
"params": [
{
"name": "",
"type": "core::objectmodel::Event *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "draw",
"return_type": "void",
"params": [
{
"name": "",
"type": "const core::visual::VisualParams *"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "setPerformerFreeze",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
}
]
},
"desc": {
"description": "The `InteractionPerformer` is a class in the SOFA framework under the namespace `sofa::gui::component::performer`, part of the module `Sofa.GUI.Component`. It acts as an abstract base class for interaction-related functionality, primarily handling mouse-based user interactions within the GUI. This component does not have data fields but relies on virtual methods to define its behavior.\n\nThe key virtual methods include:\n- **configure**: Configures the performer with a MouseButtonSetting instance (though it is not pure virtual).\n- **start**: A pure virtual method intended for initiating the interaction process.\n- **execute**: Another pure virtual method, used to perform actions during an ongoing interaction.\n- **handleEvent**: Processes incoming events; this method can be overridden but isn't mandatory.\n- **draw**: Handles visual rendering if needed by any derived classes.\n- **setPerformerFreeze**: Sets a flag indicating that the performer should freeze its current state.\n\nThis class interacts with other components through these methods and potentially via event handling, allowing it to integrate seamlessly into the SOFA simulation loop. Derived classes are expected to implement `start` and `execute`, while others can be left as is or overridden for specific functionality."
},
"maths": {
"maths": "The `InteractionPerformer` class in the SOFA framework is an abstract base class designed to handle mouse-based user interactions within the GUI. This component does not directly contribute to any mathematical or physical models, constitutive laws, kinematic formulations, or numerical methods used in the FEM simulation pipeline. Instead, its primary role is to facilitate interaction mechanisms through a set of virtual methods that can be overridden by derived classes for specific functionality. The key methods and their roles are as follows:\n\n1. **configure**\n - This method configures the `InteractionPerformer` with a `MouseButtonSetting` instance but does not enforce any specific behavior (since it is not pure virtual). It is intended to be overridden by derived classes for custom configuration needs.\n \n2. **start**\n - A pure virtual method used to initiate the interaction process. Derived classes must implement this method to define what should happen when an interaction starts, such as setting up initial conditions or preparing data structures needed during the interaction.\n\n3. **execute**\n - Another pure virtual method that performs actions during ongoing interactions. This method is called repeatedly while the interaction is active and can be used for real-time updates based on user input or other events within the simulation.\n\n4. **handleEvent**\n - Processes incoming events (e.g., mouse clicks, movements). Although this method is virtual and not pure, it provides a default behavior but can be overridden by derived classes to handle specific event types more precisely.\n\n5. **draw**\n - Handles visual rendering if needed by any derived classes. This method is also virtual but not pure, indicating that derived classes may or may not need to provide custom visualization logic depending on their requirements.\n\n6. **setPerformerFreeze**\n - Sets a flag (`m_freezePerformer`) indicating that the `InteractionPerformer` should freeze its current state. This can be useful for temporarily pausing interaction behavior during specific conditions or events within the simulation loop.\n\nIn summary, the `InteractionPerformer` class serves as an abstract interface for user interactions in SOFA and is not directly involved in the mathematical or physical modeling aspects of FEM simulations. Its primary function is to provide a structured way for derived classes to implement interaction logic through virtual method overrides."
},
"summary": {
"abstract": "The `InteractionPerformer` class in SOFA is an abstract base for mouse-based user interactions within the GUI, defining methods to configure, start, execute, handle events, draw visuals, and freeze interaction states.",
"sheet": "# InteractionPerformer\n\n**Overview**\n\nThe `InteractionPerformer` is an abstract base class designed to facilitate mouse-based user interactions within the SOFA GUI. It defines several virtual methods that must be implemented by derived classes to provide specific interaction logic, including configuration, event handling, and visual rendering.\n\n**Practical Notes**\n\nDerived classes are expected to implement the `start` and `execute` methods, which are pure virtual and essential for defining the behavior of interactions. The `handleEvent` method can be overridden to process specific events more precisely, while the `draw` method is optional but useful for custom visualizations. The `setPerformerFreeze` method allows freezing interaction states under certain conditions."
}
}