![]() |
VR-Forces 5.0.2 Developer's Guide
|
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.
Classes | |
| struct | EntityInfo |
Public Member Functions | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, DtVector geocEndPos, DtTaitBryan geocEndOri, double endZoom, float smoothTime=3.0f) | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, DtVector cigEndPos, DtQuat cigEndOri, double endZoom, float smoothTime=3.0f) | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, DtVector relativeEndPos, DtQuat relativeEndOri, double endZoom, DtUniqueID attachedTo, DtUniqueID secondaryAttachedTo, DtObserverObject::AttachType attachedType, float smoothTime=3.0f) | |
| DtObserverAnimator (DtDe &de, DtObserver &obs, makArchives::DtObserverStateRecord &rec, float smoothTime=3.0f) | |
| virtual | ~DtObserverAnimator () |
| virtual void | tick () |
| virtual bool | isDone () const |
| virtual DtObserver * | observer () const |
| 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.
|
protectedvirtual |
slot for when the coordinate system changes
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 |
purposely not virtual. called from each of the 3 constructors
|
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 |
|
protected |
|
protected |
local clone of the system wide coordinate system. for thread safety.