KeypressedEvent
@author Francois Faure @brief This event is propagated along the objects when a key on the keyboard is pressed.
The `KeypressedEvent` class handles keyboard key press events, propagating them through the SOFA object model for interactive simulations.
- module
- Sofa.framework.Core
- namespace
- sofa::core::objectmodel
- include
- sofa/core/objectmodel/KeypressedEvent.h
- inherits
-
- Event
- description
The KeypressedEvent class in the SOFA framework is not directly involved in mathematical or physical modeling, as it serves a purely user-interaction role. It does not contribute to any governing equations, constitutive laws, kinematic relationships, assembly procedures, time integration schemes, nonlinear solvers, linear solvers, constraints, mappings, or variational formulations that are typical of the FEM pipeline.
The KeypressedEvent class is part of SOFA's event system and is triggered when a key on the keyboard is pressed. It inherits from the base Event class and contains methods for retrieving the character corresponding to the pressed key (getKey) and identifying the event type (checkEventType, GetClassName). This component facilitates user interaction, enabling commands or control inputs during simulation runs.
In summary, while crucial for interactive simulations in SOFA, the KeypressedEvent does not have a direct mathematical or physical role within the FEM framework.
Methods
int
getEventTypeIndex
()
bool
checkEventType
(const Event * event)
char
getKey
()
const char *
GetClassName
()
{
"name": "KeypressedEvent",
"namespace": "sofa::core::objectmodel",
"module": "Sofa.framework.Core",
"include": "sofa/core/objectmodel/KeypressedEvent.h",
"doc": "@author Francois Faure\n\t@brief This event is propagated along the objects when a key on the keyboard is pressed.",
"inherits": [
"Event"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "getEventTypeIndex",
"return_type": "int",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "checkEventType",
"return_type": "bool",
"params": [
{
"name": "event",
"type": "const Event *"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": true,
"access": "public"
},
{
"name": "getKey",
"return_type": "char",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "GetClassName",
"return_type": "const char *",
"params": [],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": true,
"access": "public"
}
],
"description": "The `KeypressedEvent` class in SOFA is part of the `sofa::core::objectmodel` namespace and belongs to the Sofa.Core module. It inherits from the base `Event` class, which facilitates the propagation of events within the SOFA framework's object model.\n\nThis event is specifically designed to be triggered when a key on the keyboard is pressed during simulation interaction. It allows for user input integration into simulations, such as control or manipulation commands.\n\nThe primary method provided by `KeypressedEvent` is `getKey`, which retrieves the character corresponding to the pressed key. Additionally, it includes static methods like `checkEventType` and `GetClassName` for event type verification and class identification respectively.\n\nInteractions with other components in SOFA are primarily through inheritance from the `Event` base class and via method calls that might process or respond to this event within various parts of a simulation pipeline.",
"maths": "The `KeypressedEvent` class in the SOFA framework is not directly involved in mathematical or physical modeling, as it serves a purely user-interaction role. It does not contribute to any governing equations, constitutive laws, kinematic relationships, assembly procedures, time integration schemes, nonlinear solvers, linear solvers, constraints, mappings, or variational formulations that are typical of the FEM pipeline.\n\nThe `KeypressedEvent` class is part of SOFA's event system and is triggered when a key on the keyboard is pressed. It inherits from the base `Event` class and contains methods for retrieving the character corresponding to the pressed key (`getKey`) and identifying the event type (`checkEventType`, `GetClassName`). This component facilitates user interaction, enabling commands or control inputs during simulation runs.\n\nIn summary, while crucial for interactive simulations in SOFA, the `KeypressedEvent` does not have a direct mathematical or physical role within the FEM framework.",
"abstract": "The `KeypressedEvent` class handles keyboard key press events, propagating them through the SOFA object model for interactive simulations.",
"sheet": "# KeypressedEvent\n\n## Overview\nThe `KeypressedEvent` class is part of the `sofa::core::objectmodel` namespace and belongs to the Sofa.Core module. It inherits from the base `Event` class, facilitating the propagation of key press events within the SOFA framework's object model. This event allows for user input integration into simulations, such as control or manipulation commands.\n\n## Parameters and Data\nThe significant methods provided by `KeypressedEvent` include:\n- `getKey`: Retrieves the character corresponding to the pressed key.\n- `checkEventType(event)`: Verifies if an event is of type `KeypressedEvent`.\n- `GetClassName()`: Returns the class name as a string."
}