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