![]() |
VR-Forces 4.6.1 Class Documentation
|
Encapsulates the process of animating an observer to a given location. More...
Classes | |
| struct | EntityInfo |
| Data structure used to store information about an entity that the observer is moving towards and will attach to. More... | |
Public Member Functions | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, DtVector geocEndPos, DtTaitBryan geocEndOri, double endZoom, float smoothTime=3.0f) | |
| Constructor for movement to absolute position and rotation in that are passed in as geocentric coordinates. | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, DtVector cigEndPos, DtQuat cigEndOri, double endZoom, float smoothTime=3.0f) | |
| Constructor for movement to absolute position rotation in IG space. | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, DtVector relativeEndPos, DtQuat relativeEndOri, double endZoom, DtUniqueID attachedTo, DtUniqueID secondaryAttachedTo, DtObserverObject::AttachType attachedType, float smoothTime=3.0f) | |
| Constructor for movement to relative position and rotation while attached to an entity. | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, makArchives::DtObserverStateRecord &rec, float smoothTime=3.0f) | |
| Constructor for animating to a saved view. | |
| virtual | ~DtObserverAnimator () |
| DTOR. | |
| virtual void | tick () |
| Called every frame by the DtInputDriver to update the observer. | |
| virtual bool | isDone () const |
| Is true when this animation is complete. | |
| virtual DtObserver * | observer () const |
| Get the observer this animation is controlling. | |
Protected Member Functions | |
| virtual EntityInfo | entityInfo (makVrv::DtDe &de, const std::string &displayName) |
| lookup functions to find entity info based on a display name or DtUniqueID | |
| virtual EntityInfo | entityInfo (makVrv::DtDe &de, DtUniqueID elementId) |
| virtual void | updateTargets () |
| updates the target orientation and position. | |
| void | onInit () |
| virtual void | updateObserver () |
| sets the observer's position, orientation, and zoom level based on how far through the animation it is | |
| virtual DtVector | calcTargetPosition () |
| calculates the target position that we are trying to animate to. | |
| virtual DtQuat | calcTargetOrientation () |
| calculates the target orientation that we are trying to animate to. | |
| virtual void | calculateUpVector () |
| Calculates the up vector based on where in the world the observer is. | |
| virtual void | interpolatePosition (double t) |
| Determines a new position using linear interpolation between start and end positions. | |
| virtual void | interpolateOrientation (double t) |
| Determines the new orientation using spherical linear interpolation between start and end orientations. | |
| virtual void | interpolateZoom (double t) |
| Determines the new zoom level based on linear interpolation between the start and stop zoom levels. | |
| virtual void | finish () |
| this marks the observer as ready to be cleaned up and sets the observer in an attachment mode if one is required. | |
| virtual double | altitude (const DtVector &geoPos) |
| given a geocentric position find the altitude (estimate) above sea level | |
| virtual DtVector | surfaceAt (const DtVector &geoPos) |
| determine the sea level position for a given position | |
| virtual DtVector | clampAltitude (const DtVector &geoPos) |
| clamps the position to a max altitude | |
| virtual DtVector | bounce (double dt, DtVector start, DtVector end) |
| Determine the amount of bounce give a start position, end position and the percentage between the two positions. | |
| virtual double | altitudeContrib () |
| Determine percentage contribution for looking down that should be added. | |
| virtual double | phase1Contrib (double t) |
| Determine if the input time is within the first 10% of the animation. | |
| virtual double | phase3Contrib (double t) |
| Determine if the input time is within the last 10% of the animation. | |
| virtual double | calculatePercentage (double s, double e, double t) |
| Given a start,end and current time, determine the percentage through the animation. | |
| virtual double | calculateEasedPercent (double t) |
| Take the raw percentage and get an eased percentage. | |
Encapsulates the process of animating an observer to a given location.
The animator will smoothly move the observer from it's current location to the new location over a user definable period. If the target location is a point attached to a simulated entity, then the observer will be moved to the entity and then attached to it.
| makVrv::DtObserverAnimator::DtObserverAnimator | ( | DtDe & | de, |
| DtObserver & | obs, | ||
| DtVector | geocEndPos, | ||
| DtTaitBryan | geocEndOri, | ||
| double | endZoom, | ||
| float | smoothTime = 3.0f |
||
| ) |
Constructor for movement to absolute position and rotation in that are passed in as geocentric coordinates.
| makVrv::DtObserverAnimator::DtObserverAnimator | ( | DtDe & | de, |
| DtObserver & | obs, | ||
| DtVector | cigEndPos, | ||
| DtQuat | cigEndOri, | ||
| double | endZoom, | ||
| float | smoothTime = 3.0f |
||
| ) |
Constructor for movement to absolute position rotation in IG space.
| makVrv::DtObserverAnimator::DtObserverAnimator | ( | DtDe & | de, |
| DtObserver & | obs, | ||
| DtVector | relativeEndPos, | ||
| DtQuat | relativeEndOri, | ||
| double | endZoom, | ||
| DtUniqueID | attachedTo, | ||
| DtUniqueID | secondaryAttachedTo, | ||
| DtObserverObject::AttachType | attachedType, | ||
| float | smoothTime = 3.0f |
||
| ) |
Constructor for movement to relative position and rotation while attached to an entity.
| makVrv::DtObserverAnimator::DtObserverAnimator | ( | DtDe & | de, |
| DtObserver & | obs, | ||
| makArchives::DtObserverStateRecord & | rec, | ||
| float | smoothTime = 3.0f |
||
| ) |
Constructor for animating to a saved view.
|
virtual |
DTOR.
|
virtual |
Called every frame by the DtInputDriver to update the observer.
|
virtual |
Is true when this animation is complete.
This is called by the DtInputDriver so that it can remove completed animations
|
virtual |
Get the observer this animation is controlling.
|
protectedvirtual |
lookup functions to find entity info based on a display name or DtUniqueID
|
protectedvirtual |
|
protectedvirtual |
updates the target orientation and position.
This needs to be called every frame in case the observer is moving to an attached mode on a moving entity
|
protected |
|
protectedvirtual |
sets the observer's position, orientation, and zoom level based on how far through the animation it is
|
protectedvirtual |
calculates the target position that we are trying to animate to.
Called by updateObserver()
|
protectedvirtual |
calculates the target orientation that we are trying to animate to.
Called by updateObserver()
|
protectedvirtual |
Calculates the up vector based on where in the world the observer is.
This is an estimation of up.
|
protectedvirtual |
Determines a new position using linear interpolation between start and end positions.
All calculations are done in geocentric space. If there is a large distance to travel, this will also introduce an altitude adjustment called bounce. Input time T is modified by an easing function so that starts and stops, especially over large distances (which will result in large velocities) are not jarring.
|
protectedvirtual |
Determines the new orientation using spherical linear interpolation between start and end orientations.
All calculations are done using CIG quaternions. If there is a large distance to travel, this will orient to the direction of movement and if there is a large enough bounce to take the observer into orbit, this will orient the observer to the earth keeping good pixels on the screen at all times. Input time T is modified by an easing function so that starts and stops, especially over large distances (which will result in large velocities) are not jarring
|
protectedvirtual |
Determines the new zoom level based on linear interpolation between the start and stop zoom levels.
Input time T is modified by an easing function so that starts and stops, especially over large distances (which will result in large velocities) are not jarring
|
protectedvirtual |
this marks the observer as ready to be cleaned up and sets the observer in an attachment mode if one is required.
given a geocentric position find the altitude (estimate) above sea level
determine the sea level position for a given position
|
protectedvirtual |
clamps the position to a max altitude
|
protectedvirtual |
Determine the amount of bounce give a start position, end position and the percentage between the two positions.
|
protectedvirtual |
Determine percentage contribution for looking down that should be added.
For extremely high observer positions this will return 1 causing the observer to face the earth
Determine if the input time is within the first 10% of the animation.
This will cause the observer to orient to the velocity vector instead of the end orientation
Determine if the input time is within the last 10% of the animation.
This will cause the observer to start to rotate to the desired position
|
protectedvirtual |
Given a start,end and current time, determine the percentage through the animation.
Take the raw percentage and get an eased percentage.
This will reduce jarring at the beginning and ending of the animation
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |