SCM Library
Spherical Cube Map rendering library
 All Classes Files Functions Variables Friends Pages
Friends | List of all members
scm_step Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
tCamera position (3D vector)
rCamera orientation (Euler angles)
lLight direction (3D vector)

Member Function Documentation

void scm_step::set_foreground ( const std::string &  s)

Set the name of the foreground scene.

See Also
scm_scene::set_name
void scm_step::set_background ( const std::string &  s)

Set the name of the background scene.

See Also
scm_scene::set_name
void scm_step::transform_orientation ( const double *  M)

Transform the current camera orientation.

Parameters
MTransformation matrix in OpenGL column-major order.
void scm_step::transform_position ( const double *  M)

Transform the current camera position.

Parameters
MTransformation matrix in OpenGL column-major order.
void scm_step::transform_light ( const double *  M)

Transform the current light direction.

Parameters
MTransformation matrix in OpenGL column-major order.

The documentation for this class was generated from the following files: