53 virtual void addAnimationChange(
int row,
int change,
const DtVector& vector,
const DtTaitBryan& orientation,
double timeDelta);
62 const DtString& rwName = DtString::nullString(),
67 const DtString& rwName = DtString::nullString(),
78 virtual void setTimeScale(
double d);
79 virtual double timeScale()
const;
85 virtual void setReferencePoint(
const DtVector&);
86 virtual DtVector referencePoint()
const;
92 virtual void setReferenceOrientation(
const DtTaitBryan&);
93 virtual DtTaitBryan referenceOrientation()
const;
101 virtual void setTarget(
const DtUUID&);
109 virtual void setForceAutomaticOrientation(
bool forceAuto);
110 virtual const bool forceAutomaticOrientation()
const;
116 virtual void setMoveOutHeading(
double);
117 virtual double moveOutHeading()
const;
122 virtual void setScriptedMovementFile(
const DtString&);
123 virtual const DtString& scriptedMovementFile()
const;
135 virtual void setClampType(
int);
136 virtual int clampType()
const;
146 virtual void setCompletionRule(
int);
147 virtual int completionRule()
const;
153 virtual void setFileConfiguration(
const DtString&);
154 virtual const DtString& fileConfiguration()
const;
159 virtual double calculateOrientation(
int frame,
double dt, DtTaitBryan&,
DtVector& rotationalVelocity)
const;
162 virtual DtVector calculateLocation(
int frameA,
int frameB = -1,
double timePastFrameA = 0)
const;
166 virtual void calculateSpeed(
int frame,
DtVector& velocity)
const;
169 virtual DtVector targetPosition()
const;
172 virtual DtVector localReferencePosition()
const;
175 virtual DtTaitBryan targetOrientation()
const;
181 virtual DtVector bodyOffsetVector(
int frame)
const;
184 virtual DtTaitBryan orientationOffset(
int frame)
const;
189 virtual bool groundClampHighFidelity(
const DtVector& location,
double heading, DtTaitBryan& newLocalOrienationTb,
DtVector& newLocalLocation)
const;
192 virtual DtVector velocityForFrame(
int frame)
const;
195 virtual DtVector calculateRotationalVelocity(
int frame,
double dt)
const;
198 virtual DtVector calculateRotationalVelocity(
const DtTaitBryan& currentFrame,
int frame)
const;
204 virtual DtTaitBryan orientationForFrame(
int frame,
double& heading)
const;
207 virtual bool canBeAnimated()
const;
211 virtual int animationRow(
double,
int frameHint = 0)
const;
214 virtual int animationRows()
const;
217 virtual double deltaTimeForFrame(
int frame)
const;
220 virtual void resetAnimationVariables();
223 virtual void reset();
226 virtual void setupForAnimation();
229 virtual double simulationTime(
int)
const;
232 virtual void setFrameTime(
double);
236 virtual double frameTime()
const;
239 virtual void setAnimationFrame(
int);
240 virtual int animationFrame()
const;
243 virtual void setNeedsSetup(
bool);
244 virtual bool needsSetup()
const;
248 virtual bool simulate(
double simulateFor,
DtVector& newLocation, DtTaitBryan& newOrientation,
249 DtVector& newVelocity,
DtVector& newRotationalVelocity,
bool debug =
false);
252 virtual void setElapsedAnimationTime(
double);
253 virtual double elapsedAnimationTime()
const;
257 virtual void setTransitionSpeed(
double);
258 virtual double transitionSpeed()
const;
265 virtual int setObjectOffsetLocation(
int row,
const DtVector&);
269 virtual int setObjectOffsetOrientation(
int row,
const DtTaitBryan&);
272 virtual void setTimeDeltaFromPreviousRow(
int forRow,
double timeDelta);
278 virtual int addAnimationRow(
double deltaTime,
double lateral,
double range,
double altitude,
279 double headingOffset = 0,
double pitchOffset = 0,
double rollOffset = 0);
282 virtual void removeRow(
int);
290 virtual int frameToTravelSpeed(
int base,
double speed)
const;
293 virtual double lastSimulationTime()
const;
296 virtual bool isFinished()
const;
302 void createDeadReckoner();
305 static void objectAboutToBeRemovedCallback(
const DtVrfObject*
object,
void* usr);
306 virtual void processObjectAboutToBeRemoved(
const DtVrfObject*);
309 virtual void putSelf(std::string& fp,
int indentLevel,
bool writeUnspecified,
310 const DtFilename& path);
317 virtual void initializeReferenceObject();
320 virtual int nextFrameToMaintainSpeed(
int frame,
double speed)
const;
323 virtual void deadReckon(
double overTime,
DtVector& newWorldLocation,
324 DtTaitBryan& newLocalOrientation,
DtVector& newVelocity,
325 DtVector& newRotationalVelocity)
const;
354 vector(orig.vector), orientation(orig.orientation), timeDelta(orig.timeDelta) {};
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
DtRwTaitBryan myOrientation
Definition: animationModel.h:43
DtRwInt myCompletionRule
Definition: animationModel.h:339
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
AnimationChanges myAnimationChanges
Definition: animationModel.h:375
DtRwVector myVector
Definition: animationModel.h:42
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtRwInt myClampType
Definition: animationModel.h:338
DtRwString myScriptedMovementFile
Definition: animationModel.h:337
DtVector myLastRelativeVelocity
Definition: animationModel.h:380
DtVector myLastVelocity
Definition: animationModel.h:381
A Readable, Writable version of DtList.
Definition: rwList.h:26
DtRwInt myRow
Definition: animationModel.h:40
DtDeadReckoner * myDeadReckoner
Definition: animationModel.h:389
DtRwBoolean myForceAutomaticOrientation
Definition: animationModel.h:348
DtRwReal myTimeScale
Definition: animationModel.h:332
DtVector myLastRotationalVelocity
Definition: animationModel.h:379
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:352
File: rwTaitBryan.h.
Definition: rwTaitBryan.h:24
Definition: readerWriterRegistry.h:39
DtRwReal myTimeDelta
Definition: animationModel.h:44
Definition: animationModel.h:47
DtTaitBryan myOriginalOrientation
Definition: animationModel.h:384
DtRwBoolean myMaintainCurrentSpeed
Definition: animationModel.h:342
double timeDelta
Definition: animationModel.h:369
DtSharedVrfObjectReference class will allocate an empty DtVrfObjectReference if one is not assigned s...
Definition: vrfObjectReference.h:102
DtRwTaitBryan myReferenceOrientation
Definition: animationModel.h:334
This class will load in and return data from a movement file.
Definition: movementFile.h:273
Definition: rwVector.h:23
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
Definition: animationModel.h:350
#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:333
DtVector myLastLocation
Definition: animationModel.h:378
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual ~LocalAnimationChange()
Definition: animationModel.h:355
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
bool myIsEmbarked
Definition: animationModel.h:391
Definition: animationModel.h:32
DtTaitBryan myLastOrientation
Definition: animationModel.h:377
DtRwInt myChange
Definition: animationModel.h:41
DtRwBoolean myLastFrameWasAnimated
Definition: animationModel.h:344
DtRwReal myElapsedAnimationTime
Definition: animationModel.h:346
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream.
DtRwVrfObjectReference myTarget
Definition: animationModel.h:335
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.
The DtAnimationModel class will contain the interface allow for animated movement via an external fil...
Definition: animationModel.h:29
DtRwBoolean myNeedsSetup
Definition: animationModel.h:387
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwString myFileConfiguration
Definition: animationModel.h:340
DtMovementFile myMovementFile
Definition: animationModel.h:328
Class used as the reader/writer implementation of the DtVrfObjectReference.
Definition: vrfObjectReference.h:204
DtRwReal myFrameTime
Definition: animationModel.h:341
DtRwInt myAnimationFrame
Definition: animationModel.h:343
double myLastSimulationTime
Definition: animationModel.h:386
DtRwReal myMoveOutHeading
Definition: animationModel.h:336
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtVector myOriginalLocation
Definition: animationModel.h:383
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
LocalAnimationChange(const LocalAnimationChange &orig)
Definition: animationModel.h:353
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
DtVector vector
Vector in body coordinates.
Definition: animationModel.h:364
DtTaitBryan orientation
Orientation in topographic change from reference orientation.
Definition: animationModel.h:367
DtRwReal myLastAnimationFrameTime
Definition: animationModel.h:347
DtRwReal myTransitionSpeed
Definition: animationModel.h:345
const DtVrfObject * myEntity
Definition: animationModel.h:330
std::map< int, LocalAnimationChange > AnimationChanges
Map, by row, of changes to the animation file.
Definition: animationModel.h:374