VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
groundManeuverInFormationPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 #include "vrfobjcore/simObject.h"
17 #include <readerWriter/rwReal.h>
18 #include <readerWriter/rwInt.h>
19 #include <readerWriter/rwBoolean.h>
20 #include <readerWriter/rwString.h>
21 #include "readerWriter/rwVector.h"
27 
28 
32 {
33 public:
34 
37  const DtString& rwName = DtString::nullString(),
38  DtReaderWriterRegistry* parentRegistry = 0);
39 
42  const DtString& rwName = DtString::nullString(),
43  DtReaderWriterRegistry* parentRegistry = 0);
44 
46  virtual ~DtGroundManeuverInFormationPSR() override;
47 
50 
53  const DtString& rwName = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = 0) const override;
54 
57  virtual DtString type() const override;
58 
61  virtual void setClosestSegmentIndex(int idx);
62  virtual int closestSegmentIndex() const;
64 
67  virtual void setCurrentMajorRouteIndex(int currentRouteIndex);
68  virtual int currentMajorRouteIndex() const;
70 
73  virtual void setLeader(const DtUUID& object);
74  virtual DtSimObjectReference leader() const;
76 
79  virtual void setMajorDirection(DtAutoTransmissionGear direction);
80  virtual DtAutoTransmissionGear majorDirection() const;
82 
85  virtual void setNextMajorRouteIndex(int routeIndex);
86  virtual int nextMajorRouteIndex() const;
88 
91  virtual void setMajorRoute(const DtUUID& route);
92  virtual DtSimObjectReference majorRoute() const;
93  virtual void setCreatedOwnMajorRoute(bool);
94  virtual bool createdOwnMajorRoute();
96 
100  virtual void setMajorRouteVertices(const DtLocalVectorIterator& routeIterator);
101  virtual const DtLocalVertexList& majorRouteVertices() const;
103 
105  virtual void emptyMajorRouteVertices();
106 
109  virtual const DtRwNLengthUUIDVector& followers() const;
110  virtual void setFollowers(const DtSimObjectReferenceList&);
112 
115  virtual double formationLength() const;
116  virtual void setFormationLength(double val);
118 
121  virtual double forwardOffsetFromLeader() const;
122  virtual void setForwardOffsetFromLeader(double offset);
124 
127  virtual const DtVector& localDestination() const;
128  virtual void setLocalDestination(const DtVector& dest);
130 
133  virtual DtLocalVectorIterator* majorRouteState() const;
134 
137  virtual int currentMajorVertex() const;
138 
141  virtual double routeOffsetForward() const;
142  virtual void setRouteOffsetForward(double offset);
144 
147  virtual double routeOffsetRight() const;
148  virtual void setRouteOffsetRight(double offset);
150 
153  virtual bool startAtNext() const;
154  virtual void setStartAtNext(bool bYes);
156 
159  virtual int subtaskId() const;
160  virtual void setSubtaskId(int subtaskId);
162 
165  virtual void setUseMajorTaskSpeed(const bool value);
166  virtual bool useMajorTaskSpeed() const;
167 
168  virtual void setMajorTaskSpeed(const double value);
169  virtual double majorTaskSpeed() const;
171 
174  virtual void setUnitRoute(const DtUUID& object);
175  virtual DtSimObjectReference unitRoute() const;
177 
179  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
180  const DtFilename& path = DtReaderWriter::appPath()) override;
181 
182 public:
183 
185  static DtVrfProcessStateRepository* creator (const DtString& rwName,
186  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
187 
188 protected:
189 
192 
195 
199 
202 
205 
208 
211 
214 
221 
233 
236 
239 
242 
247 
251 
257 
260 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwReal myFormationLength
Formation length front to back.
Definition: groundManeuverInFormationPSR.h:204
DtRwVector myLocalDestination
local destination for task visualization
Definition: groundManeuverInFormationPSR.h:213
DtRwInt myNextMajorRouteIndex
Definition: groundManeuverInFormationPSR.h:198
DtRwBoolean myStartAtNextVertex
(start-at-next-vertex) This flag is set by DtGroundFollowInFormationControllerComponent::processFollo...
Definition: groundManeuverInFormationPSR.h:246
File: lclVecIter.h.
Definition: localVectorIterator.h:25
Supplementary PSR for DtGroundManuverAlongInFormationControllerComponent. The primary purpose is to m...
Definition: groundManeuverInFormationPSR.h:31
DtLocalVectorIterator * myMajorRouteState
Route state used to get info about the current route we&#39;re trying to follow (e.g. which vertex to mov...
Definition: groundManeuverInFormationPSR.h:230
Definition: readerWriterRegistry.h:39
DtRwInt myMajorDirection
&quot;major-direction&quot; Indicates forward or reverse gear. Set by default to DtAutoGearForward. DtGroundManeuverInFormationControllerComponent::processManeuverInFormation() will set this depending on sign of ordered speed or task speed from task.
Definition: groundManeuverInFormationPSR.h:220
DtRwSimObjectReference myMajorRoute
From DtGroundMoveAlongController (gndMvAlgCtl.h)
Definition: groundManeuverInFormationPSR.h:227
DtRwReal myForwardOffsetFromLeader
&quot;forwardOffsetFromLeader&quot; from task parameter
Definition: groundManeuverInFormationPSR.h:207
Definition: rwVector.h:23
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwReal myMajorTaskSpeed
Are we using speed from task message, or default ordered speed?
Definition: groundManeuverInFormationPSR.h:254
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
DtRwBoolean myUseMajorTaskSpeed
Are we using speed from task message, or default ordered speed?
Definition: groundManeuverInFormationPSR.h:255
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file. If write unspecified is true, will write entries that are uns...
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
This is a convenience list that will add DtSimObjectReference objects and modify the list as objects ...
Definition: simObjectReferenceList.h:25
DtRwReal myRouteOffsetForward
Follow offset from route vertices, forward + behind -.
Definition: groundManeuverInFormationPSR.h:241
DtRwNLengthUUIDVector is a named, readable/writable vector of DtUUIDs. Can be used in place of a NLen...
Definition: rwNLengthUUIDVector.h:30
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtAutoTransmissionGearEnum
Definition: automotivePSR.h:25
DtRwInt mySubtaskId
(subtask-id) The id of the subtask assigned by DtGroundFollowInFormationControllerComponent ...
Definition: groundManeuverInFormationPSR.h:250
DtRwNLengthUUIDVector myFollowers
UUIDs of followers.
Definition: groundManeuverInFormationPSR.h:201
DtRwInt myCurrentMajorRouteIndex
Definition: groundManeuverInFormationPSR.h:197
DtRwBoolean myCreatedOwnRoute
created own route, so delete it
Definition: groundManeuverInFormationPSR.h:194
DtRwReal myRouteOffsetRight
Follow offset from route vertices, right + left -.
Definition: groundManeuverInFormationPSR.h:238
DtRwSimObjectReference myUnitRoute
route that unit is trying to follow
Definition: groundManeuverInFormationPSR.h:259
virtual DtString type() const =0
Returns the string type of the repository, as defined in psrTypes.h.
voidpf uLong offset
Definition: ioapi.h:42
class DtLocalVertexList:
Definition: localVertexList.h:20
DtLocalVertexList myMajorRouteVertices
my copy of the current route
Definition: groundManeuverInFormationPSR.h:232
DtRwSimObjectReference myLeader
&quot;leader&quot; from task
Definition: groundManeuverInFormationPSR.h:210
DtRwInt myClosestSegmentIndex
closest segment index used by leadFormation for visualization
Definition: groundManeuverInFormationPSR.h:191
File: rwVector.h.
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
char * dest
Definition: lz4.h:440
const DtVrfProcessStateRepository & operator=(const DtVrfProcessStateRepository &orig)
A locally simulated VRF object.
Definition: localObject.h:98
DtRwInt myMajorRouteCurrentVertex
Read/write variables to capture route state.
Definition: groundManeuverInFormationPSR.h:235

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)