Support class for supplying camera positions that can be used to animate the camera from one setup to another. More...
Public Member Functions | |
CameraAnimation (Camera *camera, const Vec3d &newPos, const Vec3d &newDir, const Vec3d &newUp) | |
Creates a camera animation object. More... | |
void | setDuration (double seconds) |
Sets the duration (in seconds) of the animation. More... | |
void | setTargetFieldOfViewYDegrees (double targetFOV) |
Sets the target field of view (for perspective projections) if you want to animate the change in field of view as well as the camera position. More... | |
void | setTargetOrthoHeight (double height) |
Sets the target field frustum height (for orthographic projections) if you want to animate the change in frustum size as well as the camera position. More... | |
bool | updateCamera () |
Updates the camera based on the current time of the animation. More... | |
Support class for supplying camera positions that can be used to animate the camera from one setup to another.
Example: Animate the change from the current camera setup to looking down the Y axis:
For C#, example will look like:
cee::vis::CameraAnimation::CameraAnimation | ( | Camera * | camera, |
const Vec3d & | newPos, | ||
const Vec3d & | newDir, | ||
const Vec3d & | newUp | ||
) |
Creates a camera animation object.
Send in the camera to modify and the destination camera setup.
void cee::vis::CameraAnimation::setDuration | ( | double | seconds | ) |
Sets the duration (in seconds) of the animation.
void cee::vis::CameraAnimation::setTargetFieldOfViewYDegrees | ( | double | targetFOV | ) |
Sets the target field of view (for perspective projections) if you want to animate the change in field of view as well as the camera position.
Useful for zoom navigation mode.
void cee::vis::CameraAnimation::setTargetOrthoHeight | ( | double | height | ) |
Sets the target field frustum height (for orthographic projections) if you want to animate the change in frustum size as well as the camera position.
Useful for zoom navigation mode.
bool cee::vis::CameraAnimation::updateCamera | ( | ) |
Updates the camera based on the current time of the animation.
This should be called repeatedly together with a redraw of the screen until the method returns false (animation finished).