VR-Engage  2.2
Loading...
Searching...
No Matches
vreRlStateRepository.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreRlStateRepository.h
7//! \ingroup vreVrfRtd
8//! \brief Rotary-wing state repository for VREngage
9//!
10//! This file defines the DtVreRlStateRepository class, which manages the state
11//! information for rotary-wing aircraft in VREngage, including position, orientation,
12//! and other simulation state variables.
13
14#pragma once
15
16#pragma warning(push)
17#pragma warning(disable : 4263)
18#include <vrfobjcore/rotaryWingEntityStateRepository.h>
19#pragma warning(pop)
20
22
23namespace RlCgfVrf
24{
26
27//! \brief Type string for VREngage rotary-wing state repository component
28//!
29//! Constant used to identify this component type in the simulation system.
30const char TS_VREngageStateRepository[] = "rotorlib-cgf-vr-engage-state-repository";
31//! \brief Rotary-wing aircraft state repository for VREngage
32//!
33//! This class maintains the state information for rotary-wing aircraft within
34//! the VREngage simulation, including position, orientation, velocity, and other
35//! aircraft state variables. It provides methods for initializing, updating, and
36//! querying this state information.
37class RTD_VRF_BACKEND_PLUGIN_EXPORT DtVreRlStateRepository : public DtRotaryWingEntityStateRepository
38{
39 //! Friend class that needs direct access to state repository internals
40 friend class Controller;
41
42private:
43 //! \brief Copy constructor (not implemented)
44 //! \param orig The source object
46
47 //! \brief Assignment operator (not implemented)
48 //! \param orig The source object
49 //! \return Reference to this object
51
52public:
53 //! \brief Constructor
54 //! \param vrfObject The local object this repository belongs to
55 //! \param name The name of the repository
56 //! \param parentRegistry Parent registry for reader/writer functionality
57 //!
58 //! Initializes a new rotary-wing state repository for VREngage control.
59 DtVreRlStateRepository(DtLocalObject* vrfObject, const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
60
61 //! \brief Virtual destructor
62 //!
63 //! Cleans up resources used by the state repository.
64 virtual ~DtVreRlStateRepository() override;
65
66 //! \brief Initializes the state repository
67 //! \return True if initialization was successful
68 //!
69 //! Performs initial setup of the state repository, including configuration
70 //! loading and state initialization.
71 virtual bool init() override;
72
73 //! \brief Gets the component type
74 //! \return The type string for this component
75 //!
76 //! Returns TS_VREngageStateRepository as the component type identifier.
77 virtual DtString type() const override;
78
79 //! \brief Initializes state from parameters
80 //!
81 //! Sets up the initial state values based on the parameters defined
82 //! in the component's descriptor.
83 virtual void initializeFromParameters() override;
84
85 //! \brief Component factory function
86 //! \param name The name for the new repository
87 //! \param vrfObject The local object the repository will belong to
88 //! \param parentRegistry Parent registry for reader/writer functionality
89 //! \return Pointer to the newly created repository
90 //!
91 //! Static factory function used for component creation through the component registry.
92 static DtVrfObjectStateRepository* creator(
93 const DtString& name, DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
94
95 //! \brief Gets the rotary-wing parameters
96 //! \return Pointer to the rotary-wing parameters
97 //!
98 //! Returns the parameters used to configure this rotary-wing aircraft.
100
101 //! \brief Places the aircraft at a specified location and heading
102 //! \param location The position vector where the aircraft should be placed
103 //! \param heading The heading (in radians) the aircraft should face
104 //! \param clampToGroundFlag If true, adjusts the aircraft altitude to ground level
105 //! \param dataAvailable Optional output parameter indicating if terrain data is available
106 //! \param requireAllData If true, requires complete terrain data to be available
107 //!
108 //! Moves the aircraft to the specified location and orientation, optionally
109 //! adjusting its altitude to maintain proper ground clearance.
110 virtual void place(const DtVector& location,
111 const DtReal heading,
112 bool clampToGroundFlag = true,
113 bool* dataAvailable = 0,
114 bool requireAllData = false) override;
115};
116
117} // namespace RlCgfVrf
Rotary-wing parameters for VREngage.
Definition vreRlParameters.h:38
virtual void place(const DtVector &location, const DtReal heading, bool clampToGroundFlag=true, bool *dataAvailable=0, bool requireAllData=false) override
Places the aircraft at a specified location and heading.
static DtVrfObjectStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Component factory function.
virtual void initializeFromParameters() override
Initializes state from parameters.
virtual ~DtVreRlStateRepository() override
Virtual destructor.
DtVreRlStateRepository(DtLocalObject *vrfObject, const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
const DtVreRlParameters * getParameters() const
Gets the rotary-wing parameters.
const DtVreRlStateRepository & operator=(const DtVreRlStateRepository &orig)
Assignment operator (not implemented)
friend class Controller
Friend class that needs direct access to state repository internals.
Definition vreRlStateRepository.h:40
DtVreRlStateRepository(const DtVreRlStateRepository &orig)
Copy constructor (not implemented)
virtual bool init() override
Initializes the state repository.
virtual DtString type() const override
Gets the component type.
Definition vreRlActuator.h:40
const char TS_VREngageStateRepository[]
Type string for VREngage rotary-wing state repository component.
Definition vreRlStateRepository.h:30
Common definitions for the RTD backend library.