VR-Engage  2.2
Loading...
Searching...
No Matches
vreRotaryWingActuator.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreRotaryWingActuator.h
7//! \ingroup vreVrfmodel
8//! \brief Actuator for rotary-wing aircraft simulation
9//!
10//! This file defines the DtVreRotaryWingActuatorComponent class which provides
11//! a kinematics-based model for rotary-wing aircraft. It extends the base actuator
12//! with VR-Engage specific functionality including improved collision detection
13//! and crash handling.
14#pragma once
15
16#include "export.h"
17
18#include <vrfmodel/rotaryWingActuatorComponent.h>
20
21namespace makVre
22{
23//! \brief Type identifier for the VRE rotary wing actuator component
24const char DtVreRotaryWingActuatorType[] = "vre-rotary-wing-actuator";
25
26//! \brief Rotary-wing aircraft actuator with enhanced collision and crash handling
27//!
28//! DtVreRotaryWingActuatorComponent extends the base rotary wing actuator to provide
29//! VR-Engage specific functionality, particularly for collision detection and crash
30//! handling. It includes improved logic for determining landing versus crash states
31//! and configurable options for generating detonation events on crash.
32class VREVRFMODEL_DLL DtVreRotaryWingActuatorComponent : public DtVreSimComponent<DtRotaryWingActuatorComponent>
33{
34public:
35 //! \brief Constructor
36 //! \param name The name of this component
37 //! \param owner The local object that owns this component
38 //! \param simManager The simulation services manager
39 //! \param desc Component descriptor with configuration parameters
40 //! \param parentRegistry Optional parent registry for reader/writer functionality
41 //!
42 //! Creates a new rotary wing actuator component with the specified parameters.
43 DtVreRotaryWingActuatorComponent(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
44 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
45
46 //! \brief Virtual destructor
47 //!
48 //! Cleans up resources used by the rotary wing actuator component,
49 //! removing process state from the process state manager before deleting it.
51
52 //! \brief Gets the type identifier for this component
53 //! \return String identifying the component type (DtVreRotaryWingActuatorType)
54 //!
55 //! Implements the DtSimComponent::type() method to return the
56 //! type identifier for this component.
57 virtual const char* type() const override;
58
59 //! \brief Factory method to create a new instance of this component
60 //! \param name The name for the new component
61 //! \param owner The local object that will own this component
62 //! \param simManager The simulation services manager
63 //! \param desc Optional component descriptor
64 //! \param parentRegistry Optional parent registry for reader/writer functionality
65 //! \return Pointer to the newly created component
66 //!
67 //! Static factory method used by the component creation system to instantiate
68 //! new instances of this component type.
69 static DtSimComponent* creator(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
70 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
71
72protected:
73 //! \brief Sends a detonation event at the crash location if configured
74 //! \param geocentricLocation The geocentric coordinates of the crash location
75 //!
76 //! Checks the component descriptor to determine whether a detonation event
77 //! should be generated when the aircraft crashes. If enabled, creates and
78 //! sends a detonation event at the specified location, which can generate
79 //! visual effects and damage to nearby entities.
80 virtual void sendDetonation(const DtVector& geocentricLocation) override;
81
82 //! \brief Determines if the aircraft has landed or crashed
83 //!
84 //! Overridden to perform the landed check before determining if a crash
85 //! has occurred. This prevents false positives where normal landings are
86 //! incorrectly classified as crashes, fixing an issue with frequent
87 //! crash events occurring during standard landing procedures.
88 virtual void checkLandedOrCrashed() override;
89};
90} // namespace makVre
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
virtual void checkLandedOrCrashed() override
Determines if the aircraft has landed or crashed.
virtual ~DtVreRotaryWingActuatorComponent() override
Virtual destructor.
DtVreRotaryWingActuatorComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
virtual const char * type() const override
Gets the type identifier for this component.
virtual void sendDetonation(const DtVector &geocentricLocation) override
Sends a detonation event at the crash location if configured.
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:54
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtVreRotaryWingActuatorType[]
Type identifier for the VRE rotary wing actuator component.
Definition vreRotaryWingActuator.h:24
Base template class for VR-Engage simulation components.