Public Member Functions | Protected Member Functions | Protected Attributes
vcsl_rotation Class Reference

Rotation transformation (either 2D or 3D). More...

#include <vcsl_rotation.h>

Inheritance diagram for vcsl_rotation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vcsl_rotation ()
 Default constructor. Sets 3D rotation mode.
virtual ~vcsl_rotation ()
virtual bool is_invertible (double) const
 Is `this' invertible at time `time'?.
virtual bool is_valid () const
 Is `this' correctly set ?.
bool are_unit_axes (list_of_vectors const &new_axis) const
 Are `new_vector' a list of unit vectors ?.
bool is_2d () const
 Is `this' a 2D rotation ?.
bool is_3d () const
 Is `this' a 3D rotation ?.
void set_2d ()
 Set `this' as a 2D rotation.
void set_3d ()
 Set `this' as a 3D rotation.
void set_static_2d (double new_angle)
 Set the parameters of a static 2D rotation.
void set_static (double new_angle, vnl_vector< double > const &new_axis)
 Set the parameters of a static rotation.
void set_angle (list_of_scalars const &new_angle)
 Set the angle variation along the time in radians.
list_of_scalars angle () const
 Return the angle variation along the time in radians.
void set_axis (list_of_vectors const &new_axis)
 Set the direction vector variation along the time.
list_of_vectors axis () const
 Return the direction variation along the time.
virtual vnl_vector< double > execute (const vnl_vector< double > &v, double time) const
 Image of `v' by `this'.
virtual vnl_vector< double > inverse (const vnl_vector< double > &v, double time) const
 Image of `v' by the inverse of `this'.
vcl_vector< double > beat () const
 Return the list of time clocks.
unsigned int duration () const
 Return the time duration.
vcl_vector< vcsl_interpolatorinterpolators () const
 Return the list of interpolators.
bool valid_time (double time) const
 Is `time' between the two time bounds ?.
int matching_interval (double time) const
 Return the index of the beat inferior or equal to `time'.
void set_beat (vcl_vector< double > const &new_beat)
 Set the list of time clocks.
void set_interpolators (vcl_vector< vcsl_interpolator > const &i)
 Set the list of interpolators.
void set_static ()
 Empty the time clock and interpolators, thereby making the transf static.
double lsi (double v0, double v1, int index, double time) const
 Linear interpolation on scalar values.
vnl_vector< double > lvi (const vnl_vector< double > &v0, const vnl_vector< double > &v1, int index, double time) const
 Linear interpolation on vnl_vectors.
vnl_matrix< double > lmi (const vnl_matrix< double > &m0, const vnl_matrix< double > &m1, int index, double time) const
 Linear interpolation on vnl_matrices.
vnl_quaternion< double > lqi (const vnl_quaternion< double > &v0, const vnl_quaternion< double > &v1, int index, double time) const
 Linear interpolation on quaternions.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Protected Member Functions

vnl_quaternion< double > quaternion (double time) const
 Compute the value of the quaternion at time `time'.

Protected Attributes

bool mode_2d_
 False if `this' is a 3D rotation, true if `this' is a 2D rotation.
list_of_scalars angle_
 Angle variation along the time in radians.
list_of_vectors axis_
 Direction vector variation along the time.
vcl_vector< double > beat_
 List of time clocks.
vcl_vector< vcsl_interpolatorinterpolator_

Detailed Description

Rotation transformation (either 2D or 3D).

A rotation rotates a point around an axis passing through the origin. For a more general rotation (affine rotation or displacement), see the derived class vcsl_displacement

Definition at line 26 of file vcsl_rotation.h.


Constructor & Destructor Documentation

vcsl_rotation::vcsl_rotation ( ) [inline]

Default constructor. Sets 3D rotation mode.

Definition at line 35 of file vcsl_rotation.h.

virtual vcsl_rotation::~vcsl_rotation ( ) [inline, virtual]

Definition at line 38 of file vcsl_rotation.h.


Member Function Documentation

list_of_scalars vcsl_rotation::angle ( ) const [inline]

Return the angle variation along the time in radians.

Definition at line 89 of file vcsl_rotation.h.

bool vcsl_rotation::are_unit_axes ( list_of_vectors const &  new_axis) const

Are `new_vector' a list of unit vectors ?.

Definition at line 8 of file vcsl_rotation.cxx.

list_of_vectors vcsl_rotation::axis ( ) const [inline]

Return the direction variation along the time.

Definition at line 96 of file vcsl_rotation.h.

vcl_vector<double> vcsl_spatial_transformation::beat ( ) const [inline, inherited]

Return the list of time clocks.

Definition at line 62 of file vcsl_spatial_transformation.h.

unsigned int vcsl_spatial_transformation::duration ( ) const [inline, inherited]

Return the time duration.

Definition at line 65 of file vcsl_spatial_transformation.h.

vnl_vector< double > vcsl_rotation::execute ( const vnl_vector< double > &  v,
double  time 
) const [virtual]

Image of `v' by `this'.

REQUIRE: is_valid() REQUIRE: (is_2d()&&v.size()==2)||(is_3d()&&v.size()==3) Pure virtual function of vcsl_spatial_transformation

Implements vcsl_spatial_transformation.

Reimplemented in vcsl_displacement.

Definition at line 60 of file vcsl_rotation.cxx.

vcl_vector<vcsl_interpolator> vcsl_spatial_transformation::interpolators ( ) const [inline, inherited]

Return the list of interpolators.

Definition at line 68 of file vcsl_spatial_transformation.h.

vnl_vector< double > vcsl_rotation::inverse ( const vnl_vector< double > &  v,
double  time 
) const [virtual]

Image of `v' by the inverse of `this'.

REQUIRE: is_valid() REQUIRE: is_invertible(time) REQUIRE (is_2d()&&v.size()==2)||(is_3d()&&v.size()==3) Pure virtual function of vcsl_spatial_transformation

Implements vcsl_spatial_transformation.

Reimplemented in vcsl_displacement.

Definition at line 90 of file vcsl_rotation.cxx.

bool vcsl_rotation::is_2d ( ) const [inline]

Is `this' a 2D rotation ?.

Definition at line 60 of file vcsl_rotation.h.

bool vcsl_rotation::is_3d ( ) const [inline]

Is `this' a 3D rotation ?.

Definition at line 63 of file vcsl_rotation.h.

virtual bool vcsl_rotation::is_invertible ( double  ) const [inline, virtual]

Is `this' invertible at time `time'?.

REQUIRE: valid_time(time) Pure virtual function of vcsl_spatial_transformation

Implements vcsl_spatial_transformation.

Definition at line 47 of file vcsl_rotation.h.

virtual bool vcsl_rotation::is_valid ( ) const [inline, virtual]

Is `this' correctly set ?.

Virtual function of vcsl_spatial_transformation

Reimplemented from vcsl_spatial_transformation.

Reimplemented in vcsl_displacement.

Definition at line 51 of file vcsl_rotation.h.

vnl_matrix< double > vcsl_spatial_transformation::lmi ( const vnl_matrix< double > &  m0,
const vnl_matrix< double > &  m1,
int  index,
double  time 
) const [inherited]

Linear interpolation on vnl_matrices.

Definition at line 91 of file vcsl_spatial_transformation.cxx.

vnl_quaternion< double > vcsl_spatial_transformation::lqi ( const vnl_quaternion< double > &  v0,
const vnl_quaternion< double > &  v1,
int  index,
double  time 
) const [inherited]

Linear interpolation on quaternions.

Definition at line 118 of file vcsl_spatial_transformation.cxx.

double vcsl_spatial_transformation::lsi ( double  v0,
double  v1,
int  index,
double  time 
) const [inherited]

Linear interpolation on scalar values.

Definition at line 50 of file vcsl_spatial_transformation.cxx.

vnl_vector< double > vcsl_spatial_transformation::lvi ( const vnl_vector< double > &  v0,
const vnl_vector< double > &  v1,
int  index,
double  time 
) const [inherited]

Linear interpolation on vnl_vectors.

Definition at line 66 of file vcsl_spatial_transformation.cxx.

int vcsl_spatial_transformation::matching_interval ( double  time) const [inherited]

Return the index of the beat inferior or equal to `time'.

REQUIRE: valid_time(time)

Definition at line 19 of file vcsl_spatial_transformation.cxx.

vnl_quaternion< double > vcsl_rotation::quaternion ( double  time) const [protected]

Compute the value of the quaternion at time `time'.

Definition at line 119 of file vcsl_rotation.cxx.

void vcsl_rotation::set_2d ( ) [inline]

Set `this' as a 2D rotation.

Definition at line 70 of file vcsl_rotation.h.

void vcsl_rotation::set_3d ( ) [inline]

Set `this' as a 3D rotation.

Definition at line 73 of file vcsl_rotation.h.

void vcsl_rotation::set_angle ( list_of_scalars const &  new_angle) [inline]

Set the angle variation along the time in radians.

Definition at line 86 of file vcsl_rotation.h.

void vcsl_rotation::set_axis ( list_of_vectors const &  new_axis)

Set the direction vector variation along the time.

REQUIRE: are_unit_vectors(new_vector)

Definition at line 47 of file vcsl_rotation.cxx.

void vcsl_spatial_transformation::set_beat ( vcl_vector< double > const &  new_beat) [inline, inherited]

Set the list of time clocks.

Definition at line 106 of file vcsl_spatial_transformation.h.

void vcsl_spatial_transformation::set_interpolators ( vcl_vector< vcsl_interpolator > const &  i) [inline, inherited]

Set the list of interpolators.

Definition at line 109 of file vcsl_spatial_transformation.h.

void vcsl_rotation::set_static ( double  new_angle,
vnl_vector< double > const &  new_axis 
)

Set the parameters of a static rotation.

Definition at line 34 of file vcsl_rotation.cxx.

void vcsl_spatial_transformation::set_static ( ) [inherited]

Empty the time clock and interpolators, thereby making the transf static.

Definition at line 41 of file vcsl_spatial_transformation.cxx.

void vcsl_rotation::set_static_2d ( double  new_angle)

Set the parameters of a static 2D rotation.

Definition at line 24 of file vcsl_rotation.cxx.

bool vcsl_spatial_transformation::valid_time ( double  time) const [inherited]

Is `time' between the two time bounds ?.

Definition at line 9 of file vcsl_spatial_transformation.cxx.


Member Data Documentation

Angle variation along the time in radians.

Definition at line 125 of file vcsl_rotation.h.

Direction vector variation along the time.

Definition at line 128 of file vcsl_rotation.h.

vcl_vector<double> vcsl_spatial_transformation::beat_ [protected, inherited]

List of time clocks.

Definition at line 144 of file vcsl_spatial_transformation.h.

Definition at line 145 of file vcsl_spatial_transformation.h.

bool vcsl_rotation::mode_2d_ [protected]

False if `this' is a 3D rotation, true if `this' is a 2D rotation.

Definition at line 122 of file vcsl_rotation.h.


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