Archon::Math::CoordSystem3x3 Struct Reference

Description of a 3-D rectilinear coordinate system in some other reference coordinate system. More...

#include <archon/math/coord_system.H>

Collaboration diagram for Archon::Math::CoordSystem3x3:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CoordSystem3x3 ()
 CoordSystem3x3 (Vector3 origin, Matrix3x3 basis)
 CoordSystem3x3 (const double openGLMatrix4x4[])
 Construct a coordinate system from an OpenGL 4x4 matrix.
void setOpenGLMatrix (double openGLMatrix4x4[])
CoordSystem3x3operator *= (const CoordSystem3x3 &s)
 Combine with the given coordinate system such that (*this * s) * v = *this * (s * v).
CoordSystem3x3operator/= (const CoordSystem3x3 &s)
CoordSystem3x3 operator * (const CoordSystem3x3 &s) const
CoordSystem3x3 operator/ (const CoordSystem3x3 &s) const
void map (Vector3 &v) const
Vector3 operator() (const Vector3 &v) const
 Let v be a vector described in the coordinates of this coordinate system.
Vector3 operator * (const Vector3 &v) const
void translate (const Vector3 &p)
 Let p be a vector described in the coordinates of this coordinate system.
void setInverseOf (const CoordSystem3x3 &s)
 Make this coordinate system the inverse of the argument.
void minimalTurn (const Vector3 &point)
 Rotate the righthanded orthonormal coordinate system around one axis to make its negative z-axis run through the specified point.

Static Public Member Functions

static const CoordSystem3x3identity ()

Public Attributes

Vector3 origin
Matrix3x3 basis

Detailed Description

Description of a 3-D rectilinear coordinate system in some other reference coordinate system.

The basis of the new coordinate system is described by a 3x3 matrix whos columns define the unit axis vectors of the new system in the coordinates of the reference system. The origin of the new system is described by a vector in the reference system. Thus an instance of CoordSystem imediately describes the transformation or map from the new coordinate system into the reference system.

Note:
The phrase "reference coordinate system" is uses to refer to the coordinate system in which this new coordinate system is described. Frequently one must work with several nested coordinate systems and in this case, all but the inner-most one acts as a reference coordinate system for some other. The outer-most reference coordinate system (ie. the reference coordinate system of the outer-most coordinate system description) is a purely mental entity. Although it does not have a description we assume its existence (it is kind of like the universe...)

Definition at line 51 of file coord_system.H.


Constructor & Destructor Documentation

Archon::Math::CoordSystem3x3::CoordSystem3x3 Vector3  origin,
Matrix3x3  basis
[inline]
 

Parameters:
origin The origin of this new coordinate system described as a point in the reference coordinate system.

Definition at line 64 of file coord_system.H.


Member Function Documentation

void Archon::Math::CoordSystem3x3::minimalTurn const Vector3 point  ) 
 

Rotate the righthanded orthonormal coordinate system around one axis to make its negative z-axis run through the specified point.

The rotation axis will be perpendicular to the plane containing both the old z-axis and the vector from the origin to the specified point.

The point must be given in reference coordinates and must not coincide with the origin of this coordinate system. If it points in the exact opposite direction, the system is turned around its y-axis.

Definition at line 73 of file coord_system.C.

References Archon::Math::angle(), basis, Archon::Math::dot(), Archon::Math::BasicVector< T, N >::normalize(), origin, Archon::Math::Matrix3x3::rotateRightHandedOrthoNormal(), Archon::Math::Matrix3x3::y, and Archon::Math::Matrix3x3::z.

Vector3 Archon::Math::CoordSystem3x3::operator() const Vector3 v  )  const [inline]
 

Let v be a vector described in the coordinates of this coordinate system.

Then 'operator*' or 'operator()' maps v into the reference system.

Definition at line 87 of file coord_system.H.

References map().

Referenced by operator *().

void Archon::Math::CoordSystem3x3::translate const Vector3 p  )  [inline]
 

Let p be a vector described in the coordinates of this coordinate system.

Thus, not in the coordinates of its reference system. Then 'translate' relocates the origin of this coordinate system to the point described by p.

Definition at line 96 of file coord_system.H.

References basis, Archon::Math::Matrix3x3::map(), and origin.

Referenced by Archon::Raytracer::Cylinder::Cylinder(), Archon::Raytracer::SceneLoader::doTransform(), Archon::X3D::Viewer::renderFrame(), Archon::Raytracer::ViewState::trackballRoll(), Archon::Console3d::ViewState::trackballRoll(), Archon::Raytracer::ViewState::travel(), and Archon::Console3d::ViewState::travel().


The documentation for this struct was generated from the following files:
Generated on Sun Jul 30 22:56:55 2006 for Archon by  doxygen 1.4.4