VR-Engage  2.2
Loading...
Searching...
No Matches
topAndDirectMissileFlightPSR.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file topAndDirectMissileFlightPSR.h
7//! \ingroup vreVrfobjcore
8//! \brief Javelin missile flight process state repository for VREngage
9//!
10//! This file defines the DtJavelinMissileFlightPSR class, which provides a process state repository
11//! for Javelin missile flight components in VREngage. It extends the base missile flight PSR
12//! with Javelin-specific flight phases, attack modes, and starting location.
13
14#pragma once
15
17
18#include <vrfobjcore/missileFlightPSR.h>
19
20namespace makVre
21{
22const char DtTopAndDirectMissileFlightPSRType[] = "top-and-direct-missile-flight-PSR";
23
24//! class DtTopAndDirectMissileFlightPSR:
25//!
26//! Instances of DtTopAndDirectMissileFlightPSR are
27//!
28//! Instances of DtTopAndDirectMissileFlightPSR are used to hold the shared/checkpointable
29//! state data associated with the process of missile flight. Extended to
30//! include the concept of phases of flight for the missile.
31
32class VREVRFOBJCORE_DLL DtTopAndDirectMissileFlightPSR : public DtMissileFlightPSR
33{
34public:
35 //! \brief Constructor with VRF object and optional name
36 //! \param vrfObject Pointer to the local object this PSR is associated with
37 //! \param rwName Optional reader/writer name
38 //! \param parentRegistry Optional parent registry for reader/writer functionality
39 //!
40 //! Creates a new Javelin missile flight PSR for the specified VRF object.
41 DtTopAndDirectMissileFlightPSR(DtLocalObject* vrfObject, const DtString& rwName = DtString::nullString(),
42 DtReaderWriterRegistry* parentRegistry = 0);
43
44 //! \brief Copy constructor
45 //! \param orig The source PSR to copy from
46 //! \param rwName Optional reader/writer name
47 //! \param parentRegistry Optional parent registry for reader/writer functionality
48 //!
49 //! Creates a new Javelin missile flight PSR as a copy of the provided original.
51 const DtString& rwName = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = 0);
52
53 //! \brief Virtual destructor
54 //!
55 //! Cleans up resources used by the PSR.
57
58 //! \brief Assignment operator (not implemented)
59 //! \param orig The source PSR to copy from
60 //! \return Reference to this PSR after assignment
61 //!
62 //! Assignment operator is declared but may not be fully implemented.
64
65 //! \brief Creates a clone of this PSR
66 //! \param rwName Optional reader/writer name for the clone
67 //! \param parentRegistry Optional parent registry for reader/writer functionality
68 //! \return Pointer to a new PSR that is a clone of this one
69 //!
70 //! Creates a new Javelin missile flight PSR as a deep copy of this one.
71 virtual DtVrfProcessStateRepository* clone(const DtString& rwName = DtString::nullString(),
72 DtReaderWriterRegistry* parentRegistry = 0) const override;
73
74 //! Returns the string type of the repository,
75 //! (DtTopAndDirectMissileFlightProcessStateRepositoryType).
76 virtual DtString type() const override;
77
78 //! \brief Sets the missile flight phase
79 //! \param phase The flight phase to set
80 //!
81 //! Sets the current flight phase of the Javelin missile.
82 //! Javelin missiles typically go through several flight phases including
83 //! launch, motor burn, coast, terminal guidance, etc.
84 virtual void setFlightPhase(const DtString& phase);
85
86 //! \brief Gets the missile flight phase
87 //! \return String identifying the current flight phase
88 //!
89 //! Returns the current flight phase of the Javelin missile.
90 virtual DtString flightPhase() const;
91
92 //! \brief Sets the missile attack mode
93 //! \param mode The attack mode to set ("top" for top attack, "direct" for direct attack)
94 //!
95 //! Sets the attack mode for the Javelin missile.
96 //! Top attack mode causes the missile to fly a high arc to impact the target from above,
97 //! while direct attack mode flies a more direct path to the target.
98 virtual void setAttackMode(const DtString& mode);
99
100 //! \brief Gets the missile attack mode
101 //! \return String identifying the current attack mode ("top" or "direct")
102 //!
103 //! Returns the current attack mode of the Javelin missile.
104 virtual DtString attackMode() const;
105
106 //! \brief Sets the missile starting location
107 //! \param location The starting location in geocentric coordinates
108 //!
109 //! Sets the starting location of the missile in geocentric coordinates.
110 //! This is used for various flight calculations and trajectory planning.
111 virtual void setStartingLocation(const DtVector& location);
112
113 //! \brief Gets the missile starting location
114 //! \return The starting location in geocentric coordinates
115 //!
116 //! Returns the starting location of the missile in geocentric coordinates.
117 virtual const DtVector& startingLocation() const;
118
119 //! \brief Factory function to create a new instance of this PSR
120 //! \param rwName The reader/writer name for the new instance
121 //! \param vrfObject Pointer to the local object this PSR will be associated with
122 //! \param parentRegistry Parent registry for reader/writer functionality
123 //! \return Pointer to a newly created PSR instance
124 //!
125 //! Static factory function used by the PSR creation system to instantiate
126 //! new instances of this PSR type.
127 static DtVrfProcessStateRepository* creator(
128 const DtString& rwName, DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
129
130protected:
131 //! Flight phase (used by the missile).
132 DtRwString myFlightPhase;
133
134 //! \brief The missile attack mode
135 //!
136 //! Stores the attack mode for the Javelin missile ("top" or "direct").
137 //! Top attack mode causes the missile to fly a high arc to impact the target from above,
138 //! while direct attack mode flies a more direct path to the target.
139 DtRwString myAttackMode;
140
141 //! \brief The missile starting location
142 //!
143 //! Stores the starting location of the missile in geocentric coordinates.
144 //! This is used for various flight calculations and trajectory planning.
146};
147} // namespace makVre
virtual DtString type() const override
Returns the string type of the repository, (DtTopAndDirectMissileFlightProcessStateRepositoryType).
static DtVrfProcessStateRepository * creator(const DtString &rwName, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Factory function to create a new instance of this PSR.
DtRwString myAttackMode
The missile attack mode.
Definition topAndDirectMissileFlightPSR.h:139
DtRwString myFlightPhase
Flight phase (used by the missile).
Definition topAndDirectMissileFlightPSR.h:132
virtual DtString flightPhase() const
Gets the missile flight phase.
DtTopAndDirectMissileFlightPSR(const DtTopAndDirectMissileFlightPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
virtual const DtVector & startingLocation() const
Gets the missile starting location.
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this PSR.
virtual ~DtTopAndDirectMissileFlightPSR() override
Virtual destructor.
virtual void setAttackMode(const DtString &mode)
Sets the missile attack mode.
virtual void setFlightPhase(const DtString &phase)
Sets the missile flight phase.
DtRwVector myStartingLocation
The missile starting location.
Definition topAndDirectMissileFlightPSR.h:145
DtTopAndDirectMissileFlightPSR & operator=(const DtTopAndDirectMissileFlightPSR &orig)
Assignment operator (not implemented)
DtTopAndDirectMissileFlightPSR(DtLocalObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
Constructor with VRF object and optional name.
virtual DtString attackMode() const
Gets the missile attack mode.
virtual void setStartingLocation(const DtVector &location)
Sets the missile starting location.
Export macros for the VREngage Object Core library.
#define VREVRFOBJCORE_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtTopAndDirectMissileFlightPSRType[]
Definition topAndDirectMissileFlightPSR.h:22