VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
automotivePSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include "vrfobjcore/simObject.h"
16 #include <readerWriter/rwReal.h>
17 #include <readerWriter/rwInt.h>
18 #include <readerWriter/rwBoolean.h>
19 #include <readerWriter/rwString.h>
20 #include "readerWriter/rwVector.h"
24 
26 {
31 };
32 
34 {
39 };
40 
42 
46 {
47 public:
48 
50  DtAutomotivePSR(DtLocalObject* vrfObject,
51  const DtString& rwName = DtString::nullString(),
52  DtReaderWriterRegistry* parentRegistry = 0);
53 
55  DtAutomotivePSR(const DtAutomotivePSR& orig,
56  const DtString& rwName = DtString::nullString(),
57  DtReaderWriterRegistry* parentRegistry = 0);
58 
60  virtual ~DtAutomotivePSR() override;
61 
64 
67  const DtString& rwName = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = 0) const override;
68 
71  virtual DtString type() const override;
72 
75  virtual void setCurrentGear(DtAutoTransmissionGear gear);
76  virtual DtAutoTransmissionGear currentGear() const;
78 
81  virtual void setHeadingToTurnTo(double headingToTurnTo);
82  virtual double headingToTurnTo() const;
84 
87  virtual void setTurnToMode(int);
88  virtual int turnToMode() const;
90 
97  virtual void setTurnRadiusForTask(const double r);
98  virtual double turnRadiusForTask() const;
99 
104  virtual void setKTurnReverseGoalHeading(double kTurnReverseGoalHeading);
105  virtual double kTurnReverseGoalHeading() const;
107 
110  void setCurrentRouteIndex(int currentRouteIndex);
111  int currentRouteIndex() const;
113 
118  virtual void setKTurnReverseComplete(bool kTurnReverseComplete);
119  virtual bool kTurnReverseComplete() const;
121 
125  virtual void setControlObject(const DtUUID& object);
126 
128  virtual DtSimObjectReference controlObject() const;
130 
135  virtual void setContinueFlag(bool flag);
136  virtual bool continueFlag() const;
138 
140  virtual void setFinalSpeed(const double s);
141  virtual double finalSpeed() const;
142 
148  virtual void setWorldDestination(const DtVector& destination);
149  virtual const DtVector& worldDestination() const;
151 
154  virtual void setEntityToFollow(const DtUUID& objectName);
155  virtual DtSimObjectReference entityToFollow() const;
157 
161  virtual void setFollowingOffsetVector(const DtVector& offsetVector);
162  virtual const DtVector& followingOffsetVector() const;
164 
168  virtual void setRoute(const DtUUID& route);
169 
171  virtual DtSimObjectReference route() const;
173 
177  virtual void setRouteVertices(const DtLocalVectorIterator& routeIterator);
178  virtual const DtLocalVertexList& routeVertices() const;
180 
182  virtual void emptyRouteVertices();
183 
186  virtual DtLocalVectorIterator* routeState() const;
187 
190  virtual void setReversePatrol(bool flag);
191  virtual bool reversePatrol() const;
193 
196  virtual void setFirstWaypoint(const DtUUID& waypoint);
197  virtual DtSimObjectReference firstWaypoint() const;
199 
202  virtual void setSecondWaypoint(const DtUUID& waypoint);
203  virtual DtSimObjectReference secondWaypoint() const;
205 
209  virtual void setCheckForTerrainCollisions(bool checkForCollisions);
210  virtual bool checkForTerrainCollisions() const;
212 
213 
224  virtual void setUseHighFidelityGroundClamping(bool yesOrNo);
225  virtual bool useHighFidelityGroundClamping() const;
227 
228 
231  virtual void setUseTaskSpeed(const bool value);
232  virtual bool useTaskSpeed() const;
233 
234  virtual void setTaskSpeed(const double value);
235  virtual double taskSpeed() const;
237 
239  virtual void setAccelerationLevel(const DtAutoAccelerationLevel l);
240  virtual enum DtAutoAccelerationLevel accelerationLevel() const;
241 
245  virtual void setFinalSpeedNotSpecified();
246  virtual bool isFinalSpeedSpecified() const;
247 
249  virtual void setTaskAtDistance(const double d);
250  virtual double taskAtDistance()const;
251  virtual void setTaskAtDistanceUnspecified();
252  virtual bool isTaskAtDistanceSpecified()const;
253 
256  virtual int currentVertex() const;
257 
259  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
260  const DtFilename& path = DtReaderWriter::appPath()) override;
261 
263  static DtVrfProcessStateRepository* creator (const DtString& rwName,
264  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
265 
270 
271  virtual void setIsCollisionAvoidanceEnabled(bool enabled);
272  virtual bool isCollisionAvoidanceEnabled() const;
273 
274  virtual void setIsColliding(bool colliding);
275  virtual bool isColliding() const;
276 
277  virtual void setIsClearing(bool clearing);
278  virtual bool isClearing() const;
279 
280  virtual void setAvoidingLeft(bool avoidingLeft);
281  virtual bool avoidingLeft() const;
282 
284 
285  virtual void setGroundMoveToSubtaskId(int id);
286  virtual int groundMoveToSubtaskId() const;
287 
288 
292 
294  virtual bool intermediateWorldDestinationValid() const;
295  virtual void invalidateIntermediateWorldDestination();
296  virtual void setIntermediateWorldDestination(const DtVector& destination);
297  virtual const DtVector& intermediateWorldDestination() const;
298 
299  virtual void setRouteIsDiscovered(bool value);
300  virtual bool routeIsDiscovered() const;
301 
302 
308  virtual void setIsUsingBotSteering(const bool b);
309  virtual bool isUsingBotSteering() const;
310 
312 
313 protected:
314 
324 
331 
338 
352 
357 
366 
375 
378 
381 
383 
387 
391 
394 
401 
407 
410 
412 
414 
416 
418 
420 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwBoolean myReverseFlag
From DtGroundPatrolRouteController (gndPtrlRtCtl.h)
Definition: automotivePSR.h:356
Definition: automotivePSR.h:28
DtRwInt myCurrentRouteIndex
From DtGroundAutoController (gndAutoCntlr.h) (enum DtAutoTransmissionGear)
Definition: automotivePSR.h:319
DtRwInt myAccelerationLevel
Definition: automotivePSR.h:415
DtRwSimObjectReference myEntityToFollow
From DtGroundFollowEntityController (gndFollwCtl.h)
Definition: automotivePSR.h:336
DtLocalVertexList myVertices
my copy of the current route
Definition: automotivePSR.h:349
DtRwInt myCurrentVertex
Read/write variables to capture route state.
Definition: automotivePSR.h:351
File: lclVecIter.h.
Definition: localVectorIterator.h:25
DtRwBoolean myIsColliding
Reuse above myReverseFlag from DtGroundPatrolRouteController bool myReverseFlag;. ...
Definition: automotivePSR.h:372
DtRwBoolean myCheckForTerrainCollisions
Definition: automotivePSR.h:382
DtRwBoolean myIsClearing
Definition: automotivePSR.h:373
DtRwVector myWorldDestination
World point for move to location tasks.
Definition: automotivePSR.h:377
DtRwReal myKTurnReverseGoalHeading
Definition: automotivePSR.h:322
DtRwVector myIntermediateWorldDestination
Intermediate world point for move to location tasks.
Definition: automotivePSR.h:380
DtRwBoolean myUseHighFidelityGroundClamping
Used by the automotive actuator when determining the orientation of the entity.
Definition: automotivePSR.h:386
Definition: readerWriterRegistry.h:39
DtRwReal myTaskAtDistance
At distance specified by task.
Definition: automotivePSR.h:409
DtAutoTransmissionGearEnum DtAutoTransmissionGear
Definition: automotivePSR.h:41
DtRwBoolean myRouteIsDiscovered
If continuing, what is the desired speed at the end of the move.
Definition: automotivePSR.h:399
DtRwBoolean myContinueFlag
Definition: automotivePSR.h:392
DtRwSimObjectReference myControlObject
From DtGroundMoveToControllerComponent (gndMvToCntlr.h)
Definition: automotivePSR.h:330
DtRwReal myTaskSpeed
Are we using speed from task message, or default ordered speed?
Definition: automotivePSR.h:404
Definition: automotivePSR.h:37
Definition: rwVector.h:23
DtRwBoolean myAvoidingLeft
Definition: automotivePSR.h:374
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
DtRwInt myGroundMoveToSubtaskId
Definition: automotivePSR.h:419
Instances of DtAutomotivePSR are used to hold the shared/checkpointable data for an automotive system...
Definition: automotivePSR.h:45
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Definition: automotivePSR.h:29
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
Definition: automotivePSR.h:38
DtRwSimObjectReference myRoute
From DtGroundMoveAlongController (gndMvAlgCtl.h)
Definition: automotivePSR.h:344
DtRwVector myOffsetVector
Definition: automotivePSR.h:337
DtRwInt myTurnToMode
Definition: automotivePSR.h:411
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...
DtRwSimObjectReference myFirstWaypoint
From DtGroundPatrolBetweenController.
Definition: automotivePSR.h:362
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
Definition: automotivePSR.h:27
DtRwBoolean myIsCollisionAvoidanceEnabled
Used by the collision avoidance controller to determine if it should perform avoidance.
Definition: automotivePSR.h:390
DtRwReal myHeadingToTurnTo
Definition: automotivePSR.h:321
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
Definition: automotivePSR.h:35
DtRwBoolean myIsUsingBotSteering
Definition: automotivePSR.h:417
DtRwSimObjectReference mySecondWaypoint
Definition: automotivePSR.h:363
virtual DtString type() const =0
Returns the string type of the repository, as defined in psrTypes.h.
Definition: automotivePSR.h:30
DtLocalVectorIterator * myRouteState
Route state used to get info about the current route we&#39;re trying to follow (e.g. which vertex to mov...
Definition: automotivePSR.h:347
DtRwReal myTurnRadiusForTask
Definition: automotivePSR.h:413
class DtLocalVertexList:
Definition: localVertexList.h:20
Definition: automotivePSR.h:36
DtRwReal myFinalSpeed
Determines whether we will keep moving after this task is done and hence shouldn&#39;t slow down...
Definition: automotivePSR.h:393
DtRwBoolean myKTurnReverseComplete
Definition: automotivePSR.h:323
File: rwVector.h.
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
const DtVrfProcessStateRepository & operator=(const DtVrfProcessStateRepository &orig)
DtRwInt myCurrentGear
Definition: automotivePSR.h:320
A locally simulated VRF object.
Definition: localObject.h:98
DtAutoAccelerationLevel
Definition: automotivePSR.h:33
DtRwBoolean myUseTaskSpeed
Are we using speed from task message, or default ordered speed?
Definition: automotivePSR.h:405

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)