Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

esve::engine::dim4::Transform Class Reference

Four-dimensional transforms with rotation, translation, inversion, and scaling components. More...

#include <esve/engine/dim4/Transform.hxx>

Inheritance diagram for esve::engine::dim4::Transform:

esve::engine::dim4::impl::Transform List of all members.

Public Member Functions

Matrix elements
 f(z) = (a*z + b)*inv(c*z + d) 
See the description of Transform.

virtual const types::quata () const =0
 Upper-left.

virtual void a (const types::quat &a)=0
 Upper-left.

virtual const types::quatb () const =0
 Upper-right.

virtual void b (const types::quat &b)=0
 Upper-right.

virtual const types::quatc () const =0
 Lower-left.

virtual void c (const types::quat &c)=0
 Lower-left.

virtual const types::quatd () const =0
 Lower-right.

virtual void d (const types::quat &d)=0
 Lower-right.

Actions
Relative actions on the current state. The basis argument is similarity-conjugated:
            *this := basis*action*(basis)^(-1)*(*this)

basis == IDENTITY means left action.
basis == *this means right action.

virtual void left_act (const Transform &left)=0
 *this := left * (*this)

virtual void right_act (const Transform &right)=0
 *this := (*this) * right

virtual void act (const Transform &action, const Transform &basis=IDENTITY)=0
 General differential action.

virtual void rotate (types::real alpha, types::real beta, const types::quat &r, const types::quat &s, const Transform &basis=IDENTITY)=0
 Rotate by angle alpha in the (r, s) plane; rotate by angle beta in the (r, s)-complement plane.

virtual void rotate (types::real alpha, types::real beta, const types::pure &u, const Transform &basis=IDENTITY)=0
 Rotate by angle alpha in the (1, u) plane; rotate by angle beta in the (1, u)-complement plane.

virtual void translate (const types::quat &r, const Transform &basis=IDENTITY)=0
 Move the local origin from g to g' = g + r.

virtual void invertate (const types::quat &r, const Transform &basis=IDENTITY)=0
 Move the local infinity from h to h' per the relation (h')^(-1) = h^(-1) + r.

virtual void scalate (types::real gamma, const Transform &basis=IDENTITY)=0
 Scale from the current state by a factor of gamma.

Other operations
virtual void identity ()=0
 *this := 1

virtual void invert ()=0
 *this := (*this)^(-1)

virtual void assign (const Transform &t)=0
 *this := t

virtual void normalize ()=0
 Snap to upper-triangular with unitary diagonal elements.

virtual bool operator== (const Transform &) const =0
 Equal by value.

virtual bool operator!= (const Transform &) const =0
 Unequal by value.


Static Public Attributes

const TransformIDENTITY
 The group identity element.


Detailed Description

Four-dimensional transforms with rotation, translation, inversion, and scaling components.

These are Moebius transformations, which have the form

 f(z) = (a*z + b)*inv(c*z + d)

and are isomorphic to projective 2x2 quaternion matrix transformations

      T [ z1 ] = [ a  b ] [ z1 ]
        [ z2 ]   [ c  d ] [ z2 ]

Just as real 4x4 projective matrices represent 3D transformations which carry a local rotation, origin, and a scaling factor, these quaternionic 2x2 projective matrices represent 4D transformations which carry a local rotation, origin, and a scaling factor --- as well as a local infinity.

Moebius transformations blur the distinction between spheres and planes, continuously transforming one into the other. A plane is merely a sphere with infinite radius, and a line is merely a circle with infinite radius.


Member Function Documentation

virtual void esve::engine::dim4::Transform::rotate types::real  alpha,
types::real  beta,
const types::quat r,
const types::quat s,
const Transform basis = IDENTITY
[pure virtual]
 

Rotate by angle alpha in the (r, s) plane; rotate by angle beta in the (r, s)-complement plane.

Orientation is positive with r rotating toward s.

Precondition:
r, s must be orthonormal.

virtual void esve::engine::dim4::Transform::rotate types::real  alpha,
types::real  beta,
const types::pure u,
const Transform basis = IDENTITY
[pure virtual]
 

Rotate by angle alpha in the (1, u) plane; rotate by angle beta in the (1, u)-complement plane.

Orientation is positive with 1 rotating toward u.

Precondition:
u is unit length.

virtual void esve::engine::dim4::Transform::normalize  )  [pure virtual]
 

Snap to upper-triangular with unitary diagonal elements.

In other words, remove inversion and scaling, leaving only the rotation group with translations.

After normalize(), the transformation will be of the form

 f(z) = a*z*conj(d) + b*conj(d)
where a and d are unitary.

Implemented in esve::engine::dim4::impl::Transform.


Generated on Tue May 30 11:40:56 2006 for esve by doxygen 1.3.4