casa  5.7.0-16
casacore::RotMatrix Class Reference

A 3x3 rotation matrix. More...

`#include <RotMatrix.h>`

## Public Member Functions

RotMatrix ()
Default constructor generates a unit 3x3 matrix. More...

RotMatrix (const RotMatrix &other)
The copy constructor copies. More...

RotMatrix (const Euler &other)
Make from an Euler. More...

RotMatrix (const Euler &other, Int ax0, Int ax1, Int ax2)
Make from an Euler around specified axes. More...

RotMatrixoperator= (const RotMatrix &other)
Copy assignment. More...

~RotMatrix ()
Destructor. More...

RotMatrixoperator*= (const RotMatrix &other)
The multiplication operations generate matrix products. More...

RotMatrix operator* (const RotMatrix &other) const

Doubleoperator() (uInt row, uInt column)
Return the indicated element. More...

const Doubleoperator() (uInt row, uInt column) const

Matrix< Doubleget () const
Get as Matrix. More...

void transpose ()
Transpose the rotation matrix. More...

void set (const Matrix< Double > &in)
Fill Rotation matrix from Matrix. More...

void set (const Vector< Double > &in0, const Vector< Double > &in1, const Vector< Double > &in2)
Fill Rotation matrix from 3 (row) vectors. More...

## Private Member Functions

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). More...

## Private Attributes

Double rotat [3][3]
The rotation matrix (3x3) More...

## Friends

ostream & operator<< (ostream &os, const RotMatrix &rot)
Output a rotation matrix as a matrix. More...

## Detailed Description

A 3x3 rotation matrix.

Internal

Reviewed By:
tcornwel
Date Reviewed:
1996/02/15
Test programs:
tMeasMath

### 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.

See Euler

### Motivation

To use in nutation and other coordinate calculations

Definition at line 85 of file RotMatrix.h.

## Constructor & Destructor Documentation

 casacore::RotMatrix::RotMatrix ( )

Default constructor generates a unit 3x3 matrix.

 casacore::RotMatrix::RotMatrix ( const RotMatrix & other )

The copy constructor copies.

 casacore::RotMatrix::RotMatrix ( const Euler & other )

Make from an Euler.

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

Make from an Euler around specified axes.

 casacore::RotMatrix::~RotMatrix ( )

Destructor.

## Member Function Documentation

 void casacore::RotMatrix::applySingle ( Double angle, Int which )
private

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

 Matrix casacore::RotMatrix::get ( ) const

Get as Matrix.

 Double& casacore::RotMatrix::operator() ( uInt row, uInt column )

Return the indicated element.

 const Double& casacore::RotMatrix::operator() ( uInt row, uInt column ) const
 RotMatrix casacore::RotMatrix::operator* ( const RotMatrix & other ) const
 RotMatrix& casacore::RotMatrix::operator*= ( const RotMatrix & other )

The multiplication operations generate matrix products.

 RotMatrix& casacore::RotMatrix::operator= ( const RotMatrix & other )

Copy assignment.

 void casacore::RotMatrix::set ( const Matrix< Double > & in )

Fill Rotation matrix from Matrix.

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

Fill Rotation matrix from 3 (row) vectors.

 void casacore::RotMatrix::transpose ( )

Transpose the rotation matrix.

## Friends And Related Function Documentation

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

Output a rotation matrix as a matrix.

## Member Data Documentation

 Double casacore::RotMatrix::rotat[3][3]
private

The rotation matrix (3x3)

Definition at line 136 of file RotMatrix.h.

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