SCM Library
Spherical Cube Map rendering library
|
An scm_step defines a view configuration. More...
#include <scm-step.hpp>
Public Member Functions | |
Constructors | |
scm_step () | |
Initialize a new SCM viewer state using default values. | |
scm_step (const scm_step *a) | |
Initialize a new SCM viewer step as a copy of the given step. | |
scm_step (const scm_step *a, const scm_step *b, double t) | |
Initialize a new SCM viewer step using linear interpolation of given steps. | |
scm_step (const scm_step *a, const scm_step *b, const scm_step *c, const scm_step *d, double t) | |
Initialize a new SCM viewer step using cubic interpolation of given steps. | |
scm_step (const double *t, const double *r, const double *l) | |
Initialize a new SCM viewer step using the given camera configuration. position, camera orientation, and lightsource orientation. More... | |
Basic mutators | |
void | set_name (const std::string &s) |
Set the name of the step. | |
void | set_foreground (const std::string &s) |
Set the name of the foreground scene. More... | |
void | set_background (const std::string &s) |
Set the name of the background scene. More... | |
void | set_orientation (const double *) |
Set the orientation quaternion. | |
void | set_position (const double *) |
Set the position vector. | |
void | set_light (const double *) |
Set the light direction vector. | |
void | set_speed (double s) |
Set the speed of the Hermitian interpolation. | |
void | set_distance (double r) |
Set the distance of the camera from the center of the sphere. | |
void | set_tension (double t) |
Set the tension of the Hermitian interpolation. | |
void | set_bias (double b) |
Set the bias of the Hermitian interpolation. | |
void | set_zoom (double z) |
Set the camera zoom. | |
Basic accessors | |
const std::string & | get_name () const |
const std::string & | get_foreground () const |
const std::string & | get_background () const |
void | get_orientation (double *) const |
Return the orientation quaternion. | |
void | get_position (double *) const |
Return the position vector. | |
void | get_light (double *) const |
Return the light direction vector. | |
double | get_speed () const |
double | get_distance () const |
double | get_tension () const |
double | get_bias () const |
double | get_zoom () const |
Derived methods | |
void | get_matrix (double *) const |
Return the view transformation matrix. | |
void | get_up (double *) const |
Return the Y axis of the matrix form of the orientation quaternion, thus giving the view up vector. | |
void | get_right (double *) const |
Return the X axis of the matrix form of the orientation quaternion, thus giving the view right vector. | |
void | get_forward (double *) const |
Return the negated Z axis of the matrix form of the orientation quaternion, thus giving the view forward vector. | |
void | set_pitch (double) |
Reorient the view to the given pitch in radians. | |
void | set_matrix (const double *) |
Set the camera position and orientation using the given view matrix. | |
void | transform_orientation (const double *) |
Transform the current camera orientation. More... | |
void | transform_position (const double *) |
Transform the current camera position. More... | |
void | transform_light (const double *) |
Transform the current light direction. More... | |
Friends | |
double | operator- (const scm_step &, const scm_step &) |
Return the linear distance between two steps. | |
An scm_step defines a view configuration.
A view configuration consists of the name of an scm_scene to be applied to the foreground sphere, the name of an scm_scene to be applied to the back- ground sphere, and the position and orientation of the viewer.
This mechanism is intended to permit the creation of scripted paths among points of interest through a series of visualizations. As such, the scm_step object includes parameters that ture a Hermitian interpolation of view configurations, which is where the name "step" comes from.
scm_step::scm_step | ( | const double * | t, |
const double * | r, | ||
const double * | l | ||
) |
Initialize a new SCM viewer step using the given camera configuration. position, camera orientation, and lightsource orientation.
t | Camera position (3D vector) |
r | Camera orientation (Euler angles) |
l | Light direction (3D vector) |
void scm_step::set_foreground | ( | const std::string & | s | ) |
Set the name of the foreground scene.
void scm_step::set_background | ( | const std::string & | s | ) |
Set the name of the background scene.
void scm_step::transform_orientation | ( | const double * | M | ) |
Transform the current camera orientation.
M | Transformation matrix in OpenGL column-major order. |
void scm_step::transform_position | ( | const double * | M | ) |
Transform the current camera position.
M | Transformation matrix in OpenGL column-major order. |
void scm_step::transform_light | ( | const double * | M | ) |
Transform the current light direction.
M | Transformation matrix in OpenGL column-major order. |