Altus Mapping Engine JavaScript API Reference - v2.0.ut.2153.g60764257e - Tuesday May 16, 2022 SDK Documentation | Builds | BA3 Home
AltusUnified::AnimationManager Class Reference

Manages animations. More...

Public Member Functions

void animateTransformAroundEarth (Transform transform, Transform newTransform, double animationDuration)
 Animate the camera in an orbital path between two transforms (locations, orientations, and size). This can be used to animate an object along the great circle between to locations. More...
 
void orbitAroundPoint (Transform transform, GeographicPosition point, double rateRadiansPerSecond, double accelRadiansPerSecondPerSecond, double animationDuration)
 Rotate an object around a point while keeping the object pointed at the point. The axis of rotation is the line pointing "up" from the Earth, passing through the point. This can be used to rotate the camera round a point while keeping the point at the same screen position. More...
 
void orbitAroundTransform (Transform transform, Transform center, double rateRadiansPerSecond, double accelRadiansPerSecondPerSecond, double animationDuration)
 Rotate an object around a point while keeping the object pointed at the point. The axis of rotation is determined by the center's up vector. This can be used to rotate the camera round a point while keeping the point at the same screen position. More...
 
void orbitAroundAxis (Transform transform, vec3d center, vec3d axis, double rateRadiansPerSecond, double momentum, double rateLimit)
 Rotate an object around a point while keeping the object pointed at the point. Use this when you want to rotate an object as if it has friction. Rotational velocity is non-linear: when momentum is not 1, exponential decay is performed with a base of (1.0 - momentum). More...
 
void continuallyLookAt (Transform transform, Transform target)
 A perpetual animation that forces an object to always face another object. More...
 
void stopAnimations (Transform transform)
 Remove all animations for an object. More...
 

Detailed Description

Manages animations.

Member Function Documentation

void AltusUnified::AnimationManager::animateTransformAroundEarth ( Transform  transform,
Transform  newTransform,
double  animationDuration 
)

Animate the camera in an orbital path between two transforms (locations, orientations, and size). This can be used to animate an object along the great circle between to locations.

Parameters
transformThe starting transform.
newTransformThe new transform.
animationDurationLength of time in seconds to perform the animation.
void AltusUnified::AnimationManager::continuallyLookAt ( Transform  transform,
Transform  target 
)

A perpetual animation that forces an object to always face another object.

Parameters
transformThe transform to rotate (typically for an object like the camera).
targetThe object that transform should always face.
void AltusUnified::AnimationManager::orbitAroundAxis ( Transform  transform,
vec3d  center,
vec3d  axis,
double  rateRadiansPerSecond,
double  momentum,
double  rateLimit 
)

Rotate an object around a point while keeping the object pointed at the point. Use this when you want to rotate an object as if it has friction. Rotational velocity is non-linear: when momentum is not 1, exponential decay is performed with a base of (1.0 - momentum).

Parameters
transformThe transform to move (typically for an object like the camera).
centerThe point around which to orbit.
axisThe axis of rotation (which direction to orbit around the point).
rateRadiansPerSecondHow fast to orbit in radians/second.
momentumThe percentage of rotational velocity to maintain every second. A value of 1 means indefinite rotation, and 0 means no rotation after 1 second.
rateLimitThe rotational velocity, in radians/second, at which to stop the animation. A small, positive value is typically used here.
void AltusUnified::AnimationManager::orbitAroundPoint ( Transform  transform,
GeographicPosition  point,
double  rateRadiansPerSecond,
double  accelRadiansPerSecondPerSecond,
double  animationDuration 
)

Rotate an object around a point while keeping the object pointed at the point. The axis of rotation is the line pointing "up" from the Earth, passing through the point. This can be used to rotate the camera round a point while keeping the point at the same screen position.

Parameters
transformThe transform to move (typically for an object like the camera).
pointThe point around which to orbit.
rateRadiansPerSecondHow fast to orbit in radians/second.
accelRadiansPerSecondPerSecondAcceleration rate.
animationDurationLength of time in seconds which to perform the orbit.
void AltusUnified::AnimationManager::orbitAroundTransform ( Transform  transform,
Transform  center,
double  rateRadiansPerSecond,
double  accelRadiansPerSecondPerSecond,
double  animationDuration 
)

Rotate an object around a point while keeping the object pointed at the point. The axis of rotation is determined by the center's up vector. This can be used to rotate the camera round a point while keeping the point at the same screen position.

Parameters
transformThe transform to move (typically for an object like the camera).
centerThe point around which to orbit.
rateRadiansPerSecondHow fast to orbit in radians/second.
accelRadiansPerSecondPerSecondAcceleration rate.
animationDurationLength of time in seconds which to perform the orbit.
void AltusUnified::AnimationManager::stopAnimations ( Transform  transform)

Remove all animations for an object.

Parameters
transformThe object you wish to stop moving.