RotMatrix.h

Classes

RotMatrix -- A 3x3 rotation matrix (full description)

class RotMatrix

Interface

Public Members
friend ostream &operator<< (ostream &os, const RotMatrix &rot)
RotMatrix()
RotMatrix(const RotMatrix &other)
RotMatrix(const Euler &other)
RotMatrix(const Euler &other, Int ax0, Int ax1, Int ax2)
RotMatrix &operator=(const RotMatrix &other)
~RotMatrix()
RotMatrix &operator*=(const RotMatrix &other)
RotMatrix operator*(const RotMatrix &other) const
Double &operator()(uInt row, uInt column)
const Double &operator()(uInt row, uInt column) const
Matrix<Double> get() const
void transpose()
void set(const Matrix<Double> &in)
void set(const Vector<Double> &in0, const Vector<Double> &in1, const Vector<Double> &in2)
Private Members
void applySingle(Double angle, Int which)

Description

Review Status

Reviewed By:
tcornwel
Date Reviewed:
1996/02/15
Programs:
Tests:

Prerequisite

Etymology

From Rotation and Matrix

Synopsis

A rotation matrix is a 3x3 matrix, which can be used to rotate a coordinate system, notably the direction cosines in MVDirection.
A RotMatrix can be constructed by the default constructor (which will set the diagonal to 1), a copy constructor, and from a set of Euler angles with RotMatrix(Euler).
Multiplication can be done (by *= and *) of two rotation matrices.
The (uInt, uInt) operator returns the indicated element.

Example

See Euler

Motivation

To use in nutation and other coordinate calculations

To Do

Member Description

friend ostream &operator<< (ostream &os, const RotMatrix &rot)

Output a rotation matrix as a matrix

RotMatrix()

Default constructor generates a unit 3x3 matrix.

RotMatrix(const RotMatrix &other)

The copy constructor copies

RotMatrix(const Euler &other)

Make from an Euler

RotMatrix(const Euler &other, Int ax0, Int ax1, Int ax2)

Make from an Euler around specified axes

RotMatrix &operator=(const RotMatrix &other)

Copy assignment

~RotMatrix()

Destructor

RotMatrix &operator*=(const RotMatrix &other)
RotMatrix operator*(const RotMatrix &other) const

The multiplication operations generate matrix products

Double &operator()(uInt row, uInt column)
const Double &operator()(uInt row, uInt column) const

Return the indicated element

Matrix<Double> get() const

Get as Matrix

void transpose()

Transpose the rotation matrix

void set(const Matrix<Double> &in)

Fill Rotation matrix from Matrix

void set(const Vector<Double> &in0, const Vector<Double> &in1, const Vector<Double> &in2)

Fill Rotation matrix from 3 (row) vectors

void applySingle(Double angle, Int which)

Apply to a rotation matrix a further rotation of angle around the specified axis which (0 or 1 or 2).