VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
moveAlongWithActionsPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 #pragma once
9 
11 #include "vrfobjcore/simObject.h"
12 #include <readerWriter/rwString.h>
13 #include <readerWriter/rwInt.h>
14 #include <readerWriter/rwString.h>
15 
17 //#include <vrftasks/routeAction.h>
18 
20 
25 
27 
28 class DtRouteAction;
29 class DtLocalVertexList;
30 class DtUUID;
31 
33 
35 {
36 public:
39  const DtString& rwName = DtString::nullString(),
40  DtReaderWriterRegistry* parentRegistry = 0);
41 
44  const DtString& rwName = DtString::nullString(),
45  DtReaderWriterRegistry* parentRegistry = 0);
46 
48  virtual ~DtMoveAlongWithActionsPSR();
49 
52 
55  const DtString& rwName = DtString::nullString(),
56  DtReaderWriterRegistry* parentRegistry = 0) const;
57 
60  virtual DtString type() const;
61 
63  virtual void setRoute(const DtUUID& routeId);
64 
66  virtual void setClosestLeg(const DtLocalVertexList& localVertices);
67 
70  virtual void setHoldPointPosition(double p);
71  virtual double holdPointPosition() const;
72 
74  virtual void setHoldPointLocation(const DtVector& localPos);
75  virtual DtVector holdPointLocation() const;
76 
79  virtual void setTargetPointPosition(double p);
80  virtual double targetPointPosition() const;
81 
83  virtual void setTargetPointLocation(const DtVector& localPos);
84  virtual DtVector targetPointLocation() const;
85 
87  virtual void setTimeOnTarget(double t);
88  virtual double timeOnTarget() const;
89 
91  virtual void postGetSelf();
92 
94  virtual DtSimObjectReference route() const;
95 
98  virtual void setRouteLegActions(const DtRwRouteActionList& actionsList);
99 
100  virtual const DtRouteLegActionsEntryList& routeLegActionsEntryList() const;
101 
103  virtual void clearLegsActionsList();
104 
106  virtual void reorganizeLegsActionsList();
107 
109  virtual void setReverseFlag(bool reverse);
110  virtual bool reverseFlag() const;
111 
113  virtual void setStartAtClosestVertex(bool flag);
114  virtual bool startAtClosestVertex() const;
115 
117  virtual void setAbandonTaskIfTimeOnTargetNotAchievable(bool b);
118  virtual bool abandonTaskIfTimeOnTargetNotAchievable() const;
119 
121  virtual void setMoveAlongSubtaskId(int subtaskId);
122  virtual int moveAlongSubtaskId() const;
123 
125  virtual void setSuspendedMoveAlongId(int suspendId);
126  virtual int suspendedMoveAlongId() const;
127 
129  virtual void setInitialOrderedSpeed(double s);
130  virtual double initialOrderedSpeed() const;
131 
134  virtual void setOrderedSpeedIsRequired(bool c);
135  virtual bool isOrderedSpeedRequired() const;
136 
138  virtual void setRouteTraversalComplete(bool c);
139  virtual bool routeTraversalComplete() const;
140 
142  static DtVrfProcessStateRepository* creator (const DtString& rwName,
143  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
144 
147  virtual DtRouteLegActionsEntryIterator* legIterator() const;
148 
149  virtual void proceedToNextLegIndex();
150  virtual bool compareLocalVertices(const DtVector& firstLocalPos, const DtVector& secondLocalPos);
151 
152 
154  virtual const DtRwRouteActionList& validRouteActions() const;
155 
158  virtual void updateValidRouteActions();
159 
160 protected:
161 
162  virtual void resetLegIterator();
163 
180 
182 
187 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
DtRwRouteActionList myValidRouteActions
a list that manages valid actions. a non valid action is an action that was skipped. the list is not saved as part of the scenario and is updated on several cases when myRouteLegActionsEntryList is updated (a leg is deleted, an action is skipped, etc.)
Definition: moveAlongWithActionsPSR.h:186
DtRwBoolean myRouteTraversalComplete
Definition: moveAlongWithActionsPSR.h:168
DtRouteLegActionsEntryList myRouteLegActionsEntryList
Definition: moveAlongWithActionsPSR.h:177
DtRwBoolean myOrderedSpeedIsRequired
Definition: moveAlongWithActionsPSR.h:171
DtRwInt mySuspendedMoveAlongId
Definition: moveAlongWithActionsPSR.h:179
DtRwVector myHoldPointLocation
Definition: moveAlongWithActionsPSR.h:175
DtRouteLegActionsEntryIterator * myCurrentLegIterator
Definition: moveAlongWithActionsPSR.h:181
virtual void postGetSelf()
Called after either version of getSelf (mtl or environment). Default is no-op.
Definition: rwRouteActionList.h:19
DtRwInt myCurrentLegIndex
Definition: moveAlongWithActionsPSR.h:165
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Definition: moveAlongWithActionsPSR.h:34
Definition: readerWriterRegistry.h:39
DtRwReal myHoldPointRoutePosition
Definition: moveAlongWithActionsPSR.h:173
DtRwVector myTargetPointLocation
Definition: moveAlongWithActionsPSR.h:176
DtRwReal myTimeOnTarget
Definition: moveAlongWithActionsPSR.h:172
Definition: rwVector.h:23
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: simObjectReference.h:74
Description: DtIteratorBase is the base class for iterators used to iterate over a DtList...
Definition: iteratorBase.h:32
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwBoolean myReverseFlag
Definition: moveAlongWithActionsPSR.h:166
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const =0
DtIteratorBase< DtRouteLegActionsEntry > DtRouteLegActionsEntryIterator
Definition: moveAlongWithActionsPSR.h:30
DtRwBoolean myAbandonTaskIfTimeOnTargetNotAchievable
Definition: moveAlongWithActionsPSR.h:169
DtRwReal myInitialOrderedSpeed
Definition: moveAlongWithActionsPSR.h:170
DtRwInt myMoveAlongSubtaskId
Definition: moveAlongWithActionsPSR.h:178
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
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
Definition: routeAction.h:35
DtRwReal myTargetPointRoutePosition
Definition: moveAlongWithActionsPSR.h:174
virtual DtString type() const =0
Returns the string type of the repository, as defined in procSRTypes.h.
class DtLocalVertexList:
Definition: localVertexList.h:20
DtRwSimObjectReference myRoute
Definition: moveAlongWithActionsPSR.h:164
const DtVrfProcessStateRepository & operator=(const DtVrfProcessStateRepository &orig)
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 myStartAtClosestVertex
Definition: moveAlongWithActionsPSR.h:167

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)