|
VR-Engage
2.2
|
This module manages the communication between VR-Forces and the Vortex physics engine. It handles the synchronization of extension updates and parts updates, allowing for controlled modification of Vortex entities during simulation.
#include <vortexIntegrationModule.h>
Public Types | |
| enum class | Operation { PARTS_UPDATE = 0 , EXTENSION_UPDATE } |
| using | OperationEvent = std::pair<Operation, VxSim::EventData> |
Public Member Functions | |
| DtVxSimModule (VxSim::VxSimulatorModule *iProxy) | |
| virtual | ~DtVxSimModule () override |
| virtual void | onApplicationModeChange (VxSim::eApplicationMode previous, VxSim::eApplicationMode next) override |
| virtual void | onAddToApplication (VxSim::VxApplication *application) override |
| virtual void | onRemoveFromApplication (VxSim::VxApplication *application) override |
| virtual void | onPreUpdate (VxSim::eApplicationMode mode) override |
Static Public Attributes | |
| static const VxSim::VxFactoryKey | kModuleKey |
| static const VxSim::EventId | kExtensionUpdate |
| static const VxSim::EventId | kPartsUpdate |
Protected Member Functions | |
| void | processExtensionUpdate (const VxSim::EventData &data) |
| void | extensionUpdateCallback (const VxSim::EventData &data) |
| void | processPartsUpdate (const VxSim::EventData &data) |
| void | partsUpdateCallback (const VxSim::EventData &data) |
Protected Attributes | |
| std::deque< OperationEvent > | myQueuedOperations |
| int | myNumberOfOperationsPerFrame |
| VxSim::EventListener | myExtensionUpdateListener |
| VxSim::EventListener | myPartsUpdateListener |
| using makVre::DtVxSimModule::OperationEvent = std::pair<Operation, VxSim::EventData> |
Pair of operation type and event data for queued operations.
|
strong |
Operation types that can be queued for processing.
| Enumerator | |
|---|---|
| PARTS_UPDATE | Update operation for Vortex parts. |
| EXTENSION_UPDATE | Update operation for Vortex extensions. |
| makVre::DtVxSimModule::DtVxSimModule | ( | VxSim::VxSimulatorModule * | iProxy | ) |
Constructor.
Initializes the module with the provided simulator module proxy.
| iProxy | Pointer to the simulator module proxy |
|
overridevirtual |
Destructor.
|
overridevirtual |
Handles application mode changes.
Called when the Vortex application transitions between modes (e.g., edit mode, simulation mode).
| previous | Previous application mode |
| next | New application mode |
|
overridevirtual |
Called when this module is added to the Vortex application.
Registers event listeners for extension and parts update events.
| application | Pointer to the Vortex application |
|
overridevirtual |
Called when this module is removed from the Vortex application.
Unregisters event listeners and performs cleanup.
| application | Pointer to the Vortex application |
|
overridevirtual |
Called before each simulation update.
Processes a limited number of queued operations per frame to avoid performance issues.
| mode | Current application mode |
|
protected |
Processes an extension update operation.
Enables or disables a Vortex extension based on the event data.
| data | Event data containing extension information and enable/disable flag |
|
protected |
Callback for extension update events.
Queues extension update operations for processing.
| data | Event data for the extension update |
|
protected |
Processes a parts update operation.
Updates the control type of Vortex parts based on the event data.
| data | Event data containing part information and control type |
|
protected |
Callback for parts update events.
Queues parts update operations for processing.
| data | Event data for the parts update |
|
static |
Factory key for the DtVxSimModule.
Unique identifier used to register and create instances of this module.
|
static |
Event ID for extension update operations.
Used to register and trigger extension update events.
|
static |
Event ID for parts update operations.
Used to register and trigger parts update events.
|
protected |
Queue of operations to be processed.
|
protected |
Maximum number of operations to process per frame.
|
protected |
Listener for extension update events.
|
protected |
Listener for parts update events.