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 
38 {
39 public:
40 
42  DtAutomotivePSR(DtLocalObject* vrfObject,
43  const DtString& rwName = DtString::nullString(),
44  DtReaderWriterRegistry* parentRegistry = 0);
45 
47  DtAutomotivePSR(const DtAutomotivePSR& orig,
48  const DtString& rwName = DtString::nullString(),
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
52  virtual ~DtAutomotivePSR();
53 
56 
59  const DtString& rwName = DtString::nullString(),
60  DtReaderWriterRegistry* parentRegistry = 0) const;
61 
64  virtual DtString type() const;
65 
68  virtual void setCurrentGear(DtAutoTransmissionGear gear);
69  virtual DtAutoTransmissionGear currentGear() const;
71 
74  virtual void setHeadingToTurnTo(double headingToTurnTo);
75  virtual double headingToTurnTo() const;
77 
80  virtual void setTurnToMode(int);
81  virtual int turnToMode() const;
83 
88  virtual void setKTurnReverseGoalHeading(double kTurnReverseGoalHeading);
89  virtual double kTurnReverseGoalHeading() const;
91 
94  void setCurrentRouteIndex(int currentRouteIndex);
95  int currentRouteIndex() const;
97 
102  virtual void setKTurnReverseComplete(bool kTurnReverseComplete);
103  virtual bool kTurnReverseComplete() const;
105 
109  virtual void setControlObject(const DtUUID& object);
110 
112  virtual DtSimObjectReference controlObject() const;
114 
119  virtual void setContinueFlag(bool flag);
120  virtual bool continueFlag() const;
122 
128  virtual void setWorldDestination(const DtVector& destination);
129  virtual const DtVector& worldDestination() const;
131 
137  virtual bool intermediateWorldDestinationValid() const;
138  virtual void invalidateIntermediateWorldDestination();
139  virtual void setIntermediateWorldDestination(const DtVector& destination);
140  virtual const DtVector& intermediateWorldDestination() const;
142 
145  virtual void setEntityToFollow(const DtUUID& objectName);
146  virtual DtSimObjectReference entityToFollow() const;
148 
152  virtual void setFollowingOffsetVector(const DtVector& offsetVector);
153  virtual const DtVector& followingOffsetVector() const;
155 
158  virtual void setEntityToInterceptAndDestroy(const DtUUID&);
159  virtual DtSimObjectReference entityToInterceptAndDestroy() const;
161 
164  virtual void setStandOffDistance(const double distance);
165  virtual const double standOffDistance() const;
167 
171  virtual void setRoute(const DtUUID& route);
172 
174  virtual DtSimObjectReference route() const;
176 
180  virtual void setRouteVertices(const DtLocalVectorIterator& routeIterator);
181  virtual const DtLocalVertexList& routeVertices() const;
183 
185  virtual void emptyRouteVertices();
186 
189  virtual DtLocalVectorIterator* routeState() const;
190 
193  virtual void setReversePatrol(bool flag);
194  virtual bool reversePatrol() const;
196 
199  virtual void setFirstWaypoint(const DtUUID& waypoint);
200  virtual DtSimObjectReference firstWaypoint() const;
202 
205  virtual void setSecondWaypoint(const DtUUID& waypoint);
206  virtual DtSimObjectReference secondWaypoint() const;
208 
211  virtual void setIsColliding(bool colliding);
212  virtual bool isColliding() const;
214 
217  virtual void setIsClearing(bool clearing);
218  virtual bool isClearing() const;
220 
223  virtual void setAvoidingLeft(bool avoidingLeft);
224  virtual bool avoidingLeft() const;
226 
230  virtual void setCheckForTerrainCollisions(bool checkForCollisions);
231  virtual bool checkForTerrainCollisions() const;
233 
234 
245  virtual void setUseHighFidelityGroundClamping(bool yesOrNo);
246  virtual bool useHighFidelityGroundClamping() const;
248 
249 
254  virtual void setRoadStartPoint(const DtVector& point);
255  virtual DtVector roadStartPoint() const;
256 
257  virtual void setRoadEndPoint(const DtVector& point);
258  virtual DtVector roadEndPoint() const;
260 
263  virtual void unspecifyRoadPoints();
266  virtual bool roadPointsSpecified() const;
267 
270  virtual void setRouteIsDiscovered(bool value);
271  virtual bool routeIsDiscovered() const;
273 
276  virtual void setUseTaskSpeed(bool value);
277  virtual bool useTaskSpeed() const;
278 
279  virtual void setTaskSpeed(double value);
280  virtual double taskSpeed() const;
282 
285  virtual int currentVertex() const;
286 
288  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
289  const DtFilename& path = DtReaderWriter::appPath());
290 
291 public:
292 
294  static DtVrfProcessStateRepository* creator (const DtString& rwName,
295  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
296 
297 protected:
298 
308 
315 
322 
336 
341 
350 
353 
362 
365 
368 
370 
374 
380 
382 
389 
395 
397 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwBoolean myReverseFlag
From DtGroundPatrolRouteController (gndPtrlRtCtl.h)
Definition: automotivePSR.h:340
Definition: automotivePSR.h:28
DtRwInt myCurrentRouteIndex
From DtGroundAutoController (gndAutoCntlr.h) (enum DtAutoTransmissionGear)
Definition: automotivePSR.h:303
DtRwSimObjectReference myEntityToFollow
From DtGroundFollowEntityController (gndFollwCtl.h)
Definition: automotivePSR.h:320
DtLocalVertexList myVertices
my copy of the current route
Definition: automotivePSR.h:333
DtRwInt myCurrentVertex
Read/write variables to capture route state.
Definition: automotivePSR.h:335
DtRwSimObjectReference myEntityToInterceptAndDestroy
Definition: automotivePSR.h:352
File: lclVecIter.h.
Definition: localVectorIterator.h:25
DtRwBoolean myIsColliding
From DtGroundCollisionAvoidanceController (gndColAvoid.h)
Definition: automotivePSR.h:359
DtRwBoolean myCheckForTerrainCollisions
Definition: automotivePSR.h:369
DtRwBoolean myIsClearing
Definition: automotivePSR.h:360
DtRwVector myWorldDestination
World point for move to location tasks.
Definition: automotivePSR.h:364
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
DtRwReal myKTurnReverseGoalHeading
Definition: automotivePSR.h:306
DtRwVector myIntermediateWorldDestination
Intermediate world point for move to location tasks.
Definition: automotivePSR.h:367
DtRwBoolean myUseHighFidelityGroundClamping
Used by the automotive actuator when determining the orientation of the entity.
Definition: automotivePSR.h:373
Definition: readerWriterRegistry.h:39
DtAutoTransmissionGearEnum DtAutoTransmissionGear
Definition: automotivePSR.h:33
DtRwBoolean myRouteIsDiscovered
Determines whether we will keep moving after this task is done and hence shouldn&#39;t slow down...
Definition: automotivePSR.h:387
DtRwBoolean myContinueFlag
Definition: automotivePSR.h:381
DtRwSimObjectReference myControlObject
From DtGroundMoveToControllerComponent (gndMvToCntlr.h)
Definition: automotivePSR.h:314
DtRwReal myTaskSpeed
Are we using speed from task message, or default ordered speed?
Definition: automotivePSR.h:392
Definition: rwVector.h:23
DtRwBoolean myAvoidingLeft
Definition: automotivePSR.h:361
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
Instances of DtAutomotivePSR are used to hold the shared/checkpointable data for an automotive system...
Definition: automotivePSR.h:37
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
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
DtRwVector myRoadEndPoint
Road currently being used by DtGroundMoveToDestinationControllerComponent.
Definition: automotivePSR.h:378
DtRwSimObjectReference myRoute
From DtGroundMoveAlongController (gndMvAlgCtl.h)
Definition: automotivePSR.h:328
DtRwVector myOffsetVector
Definition: automotivePSR.h:321
DtRwInt myTurnToMode
Definition: automotivePSR.h:396
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:346
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
Definition: automotivePSR.h:27
DtRwReal myHeadingToTurnTo
Definition: automotivePSR.h:305
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
DtRwReal myStandOffInterceptDistance
Reuse above myReverseFlag from DtGroundPatrolRouteController bool myReverseFlag;. ...
Definition: automotivePSR.h:351
DtRwSimObjectReference mySecondWaypoint
Definition: automotivePSR.h:347
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.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:331
class DtLocalVertexList:
Definition: localVertexList.h:20
DtRwBoolean myKTurnReverseComplete
Definition: automotivePSR.h:307
DtRwVector myRoadStartPoint
Road currently being used by DtGroundMoveToDestinationControllerComponent.
Definition: automotivePSR.h:377
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:304
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
DtRwBoolean myUseTaskSpeed
Are we using speed from task message, or default ordered speed?
Definition: automotivePSR.h:393

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)