20 #include <boost/signals2.hpp>
60 virtual void addAnimationChange(
int row,
int change,
const DtVector& vector,
const DtTaitBryan& orientation,
double timeDelta);
84 virtual void setTimeScale(
double d );
85 virtual double timeScale()
const;
91 virtual void setReferencePoint(
const DtVector&);
92 virtual DtVector referencePoint()
const;
98 virtual void setReferenceOrientation(
const DtTaitBryan&);
99 virtual DtTaitBryan referenceOrientation()
const;
107 virtual void setTarget(
const DtUUID&);
115 virtual void setForceAutomaticOrientation(
bool forceAuto);
116 virtual const bool forceAutomaticOrientation()
const;
122 virtual void setMoveOutHeading(
double);
123 virtual double moveOutHeading()
const;
128 virtual void setScriptedMovementFile(
const DtString&);
129 virtual const DtString& scriptedMovementFile()
const;
141 virtual void setClampType(
int);
142 virtual int clampType()
const;
152 virtual void setCompletionRule(
int);
153 virtual int completionRule()
const;
161 virtual void setSpeedNegated(
bool enable );
162 virtual bool isSpeedNegated()
const;
168 virtual void setFileConfiguration(
const DtString& );
169 virtual const DtString& fileConfiguration()
const;
174 virtual double calculateOrientation(
int frame,
double dt, DtTaitBryan&,
DtVector& rotationalVelocity)
const;
177 virtual DtVector calculateLocation(
int frameA,
int frameB = -1,
double timePastFrameA = 0)
const;
181 virtual void calculateSpeed(
int frame,
DtVector& velocity)
const;
184 virtual DtVector targetPosition()
const;
187 virtual DtVector localReferencePosition()
const;
190 virtual DtTaitBryan targetOrientation()
const;
196 virtual DtVector bodyOffsetVector(
int frame)
const;
199 virtual DtTaitBryan orientationOffset(
int frame)
const;
204 virtual bool groundClampHighFidelity(
const DtVector& location,
double heading, DtTaitBryan& newLocalOrienationTb,
DtVector& newLocalLocation)
const;
207 virtual DtVector velocityForFrame(
int frame)
const;
210 virtual DtVector calculateRotationalVelocity(
int frame,
double dt)
const;
213 virtual DtVector calculateRotationalVelocity(
const DtTaitBryan& currentFrame,
int frame)
const;
219 virtual DtTaitBryan orientationForFrame(
int frame,
double& heading)
const;
222 virtual bool canBeAnimated()
const;
226 virtual int animationRow(
double,
int frameHint = 0)
const;
229 virtual int animationRows()
const;
232 virtual double deltaTimeForFrame(
int frame)
const;
235 virtual void resetAnimationVariables();
238 virtual void reset();
241 virtual bool setupForAnimation();
244 virtual double simulationTime(
int)
const;
247 virtual void setFrameTime(
double);
251 virtual double frameTime()
const;
254 virtual void setAnimationFrame(
int);
255 virtual int animationFrame()
const;
258 virtual void setNeedsSetup(
bool);
259 virtual bool needsSetup()
const;
263 virtual bool simulate(
double simulateFor,
DtVector& newLocation, DtTaitBryan& newOrientation,
264 DtVector& newVelocity,
DtVector& newRotationalVelocity,
bool debug =
false);
267 virtual void setElapsedAnimationTime(
double);
268 virtual double elapsedAnimationTime()
const;
272 virtual void setTransitionSpeed(
double);
273 virtual double transitionSpeed()
const;
280 virtual int setObjectOffsetLocation(
int row,
const DtVector&);
284 virtual int setObjectOffsetOrientation(
int row,
const DtTaitBryan&);
287 virtual void setTimeDeltaFromPreviousRow(
int forRow,
double timeDelta);
293 virtual int addAnimationRow(
double deltaTime,
double lateral,
double range,
double altitude,
294 double headingOffset = 0,
double pitchOffset = 0,
double rollOffset = 0);
297 virtual void removeRow(
int);
306 virtual int frameToTravelSpeed(
int base,
double speed)
const;
309 virtual double lastSimulationTime()
const;
312 virtual bool isFinished()
const;
318 void createDeadReckoner();
320 virtual void processObjectAboutToBeRemoved(
const DtSimObject*);
323 virtual void putSelf(std::string& fp,
int indentLevel,
bool writeUnspecified,
324 const DtFilename& path);
331 virtual void initializeReferenceObject();
334 virtual int nextFrameToMaintainSpeed(
int frame,
double speed)
const;
337 virtual void deadReckon(
double overTime,
DtVector& newWorldLocation,
338 DtTaitBryan& newLocalOrientation,
DtVector& newVelocity,
339 DtVector& newRotationalVelocity)
const;
347 vector(orig.vector), orientation(orig.orientation), timeDelta(orig.timeDelta) {};
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwTaitBryan myOrientation
Definition: animationModel.h:48
DtRwInt myCompletionRule
Definition: animationModel.h:378
DtLocalObject * myEntity
Definition: animationModel.h:369
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
std::map< int, LocalAnimationChange > AnimationChanges
Map, by row, of changes to the animation file. When read back in will be applied to the movement file...
Definition: animationModel.h:391
AnimationChanges myAnimationChanges
Definition: animationModel.h:392
DtRwVector myVector
Definition: animationModel.h:47
DtRwInt myClampType
Definition: animationModel.h:377
DtRwString myScriptedMovementFile
Definition: animationModel.h:376
DtVector myLastRelativeVelocity
Definition: animationModel.h:397
DtVector myLastVelocity
Definition: animationModel.h:398
A Readable, Writable version of DtList. This class cannot be used directly, but must be inherited to ...
Definition: rwList.h:26
DtRwInt myRow
Definition: animationModel.h:45
DtDeadReckoner * myDeadReckoner
Definition: animationModel.h:406
DtRwBoolean myForceAutomaticOrientation
Definition: animationModel.h:387
DtRwReal myTimeScale
Definition: animationModel.h:371
DtVector myLastRotationalVelocity
Definition: animationModel.h:396
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
LocalAnimationChange()
Definition: animationModel.h:345
Description: Readable, Writable DtTaitBryan.
Definition: rwTaitBryan.h:20
Definition: readerWriterRegistry.h:39
DtRwBoolean mySpeedNegatedFlag
Definition: animationModel.h:379
DtRwReal myTimeDelta
Definition: animationModel.h:49
Definition: animationModel.h:53
DtTaitBryan myOriginalOrientation
Definition: animationModel.h:401
double timeDelta
Definition: animationModel.h:362
DtRwTaitBryan myReferenceOrientation
Definition: animationModel.h:373
DtMovementLocalObjectFacade * myMovementLocalObjectFacade
Definition: animationModel.h:410
This class will load in and return data from a movement file.
Definition: movementFile.h:273
Contains the DtRwTaitBryan class declaration.
Definition: rwVector.h:23
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
Definition: animationModel.h:343
DtRwSimObjectReference myTarget
Definition: animationModel.h:374
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
DtRwVector myReferencePoint
Definition: animationModel.h:372
DtVector myLastLocation
Definition: animationModel.h:395
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual ~LocalAnimationChange()
Definition: animationModel.h:348
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
bool myIsEmbarked
Definition: animationModel.h:408
Definition: animationModel.h:35
DtTaitBryan myLastOrientation
Definition: animationModel.h:394
DtRwInt myChange
Definition: animationModel.h:46
DtRwBoolean myLastFrameWasAnimated
Definition: animationModel.h:383
DtRwReal myElapsedAnimationTime
Definition: animationModel.h:385
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
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...
The DtAnimationModel class will contain the interface allow for animated movement via an external fil...
Definition: animationModel.h:31
boost::signals2::scoped_connection myDeleteObjectConnection
Definition: animationModel.h:409
DtRwBoolean myNeedsSetup
Definition: animationModel.h:404
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwString myFileConfiguration
Definition: animationModel.h:380
DtMovementFile myMovementFile
Definition: animationModel.h:367
DtRwReal myFrameTime
Definition: animationModel.h:381
DtRwInt myAnimationFrame
Definition: animationModel.h:382
double myLastSimulationTime
Definition: animationModel.h:403
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
DtRwReal myMoveOutHeading
Definition: animationModel.h:375
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtVector myOriginalLocation
Definition: animationModel.h:400
LocalAnimationChange(const LocalAnimationChange &orig)
Definition: animationModel.h:346
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
DtVector vector
Vector in body coordinates.
Definition: animationModel.h:357
DtTaitBryan orientation
Orientation in topographic change from reference orientation.
Definition: animationModel.h:360
DtRwReal myLastAnimationFrameTime
Definition: animationModel.h:386
DtRwReal myTransitionSpeed
Definition: animationModel.h:384
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