クラス rcsc::Matrix2D

2D translation matrix class [詳細]

#include <matrix_2d.h>

すべてのメンバ一覧

Public メソッド

 Matrix2D ()
 create an identity matrix
 Matrix2D (const double &m11, const double &m12, const double &m21, const double &m22, const double &dx, const double &dy)
 create a matrix with all elements.
const Matrix2Dreset ()
 reset to the identity matrix
const Matrix2Dassign (const double &m11, const double &m12, const double &m21, const double &m22, const double &dx, const double &dy)
 set a matrix element with the specified values.
const double & m11 () const
 get the horizontal scaling factor.
const double & m12 () const
 get the vertical shearing factor.
const double & m21 () const
 get the horizontal shearing factor.
const double & m22 () const
 get the vertical scaling factor.
const double & dx () const
 get the horizontal translation factor.
const double & dy () const
 get the vertical translation factor.
double det () const
 get the matrix's determinant.
bool invertible () const
 check if this matrix is invertible (is not isingular).
Matrix2D inverted () const
 get the inverted matrix.
const Matrix2Dtranslate (const double &dx, const double &dy)
 moves the coordinate system.
const Matrix2Dscale (const double &sx, const double &sy)
 scales the coordinate system.
const Matrix2Drotate (const AngleDeg &angle)
 rotates the coordinate system
const Matrix2Doperator *= (const Matrix2D &m)
 multiplied by other matrix
Vector2D transform (const Vector2D &v) const
 create transformed vector from input vector with this matrix
Vector2D transform (const double &x, const double &y) const
 create transformed vector from input coordinates with this matrix
void transform (Vector2D *v) const
 transform input vector with this matrix
std::ostream & print (std::ostream &os) const
 put all elemtns to the output stream

Static Public メソッド

static Matrix2D make_translation (const double &dx, const double &dy)
 create the translation matrix.
static Matrix2D make_scaling (const double &sx, const double &sy)
 create the scaling matrix.
static Matrix2D make_rotation (const AngleDeg &angle)
 create the rotation matrix.


説明

2D translation matrix class

( m11, m12, dx ) ( m21, m22, dy ) ( 0, 0, 1 )


コンストラクタとデストラクタ

rcsc::Matrix2D::Matrix2D ( const double &  m11,
const double &  m12,
const double &  m21,
const double &  m22,
const double &  dx,
const double &  dy 
) [inline]

create a matrix with all elements.

引数:
m11 the horizontal scaling factor.
m12 the vertical shearing factor.
m21 the horizontal shearing factor.
m22 the vertical scaling factor.
dx the horizontal translation factor.
dy the vertical translation factor.


関数

const Matrix2D& rcsc::Matrix2D::reset (  )  [inline]

reset to the identity matrix

戻り値:
const reference to itself

const Matrix2D& rcsc::Matrix2D::assign ( const double &  m11,
const double &  m12,
const double &  m21,
const double &  m22,
const double &  dx,
const double &  dy 
) [inline]

set a matrix element with the specified values.

引数:
m11 the horizontal scaling factor.
m12 the vertical shearing factor.
m21 the horizontal shearing factor.
m22 the vertical scaling factor.
dx the horizontal translation factor.
dy the vertical translation factor.
戻り値:
const reference to itself

static Matrix2D rcsc::Matrix2D::make_translation ( const double &  dx,
const double &  dy 
) [inline, static]

create the translation matrix.

引数:
dx the horizontal translation factor.
dy the vertical translation factor.
戻り値:
new matrix object

static Matrix2D rcsc::Matrix2D::make_scaling ( const double &  sx,
const double &  sy 
) [inline, static]

create the scaling matrix.

引数:
sx the horizontal scaling factor.
sy the vertical scaling factor.
戻り値:
new matrix object

static Matrix2D rcsc::Matrix2D::make_rotation ( const AngleDeg angle  )  [inline, static]

create the rotation matrix.

引数:
angle the rotation angle
戻り値:
new matrix object

const double& rcsc::Matrix2D::m11 (  )  const [inline]

get the horizontal scaling factor.

戻り値:
the horizontal scaling factor value.

const double& rcsc::Matrix2D::m12 (  )  const [inline]

get the vertical shearing factor.

戻り値:
the vertical shearing factor value.

const double& rcsc::Matrix2D::m21 (  )  const [inline]

get the horizontal shearing factor.

戻り値:
the horizontal shearing factor value.

const double& rcsc::Matrix2D::m22 (  )  const [inline]

get the vertical scaling factor.

戻り値:
the vertical scaling factor value.

const double& rcsc::Matrix2D::dx (  )  const [inline]

get the horizontal translation factor.

戻り値:
the horizontal translation factor value.

const double& rcsc::Matrix2D::dy (  )  const [inline]

get the vertical translation factor.

戻り値:
the vertical translation factor value.

double rcsc::Matrix2D::det (  )  const [inline]

get the matrix's determinant.

戻り値:
the determinant value.

bool rcsc::Matrix2D::invertible (  )  const [inline]

check if this matrix is invertible (is not isingular).

戻り値:
true if this matirix is invertibale.

Matrix2D rcsc::Matrix2D::inverted (  )  const

get the inverted matrix.

戻り値:
the invverted matrix object.

const Matrix2D& rcsc::Matrix2D::translate ( const double &  dx,
const double &  dy 
) [inline]

moves the coordinate system.

引数:
dx move factor for the x axis.
dy move factor for the y axis.
戻り値:
const reference to itself.
same as: this = make_translation(dx,dy) * this

const Matrix2D& rcsc::Matrix2D::scale ( const double &  sx,
const double &  sy 
) [inline]

scales the coordinate system.

引数:
sx scaling factor for the x axis.
sy scaling factor for the y axis.
戻り値:
const reference to itself.
same as: this = make_scaling(sx,sy) * this

const Matrix2D & rcsc::Matrix2D::rotate ( const AngleDeg angle  ) 

rotates the coordinate system

引数:
angle rotation angle
戻り値:
const reference to itself
same as: this = make_rotation(angle) * this

const Matrix2D& rcsc::Matrix2D::operator *= ( const Matrix2D m  )  [inline]

multiplied by other matrix

引数:
m left hand side matrix
戻り値:
const reference to itself

Vector2D rcsc::Matrix2D::transform ( const Vector2D v  )  const [inline]

create transformed vector from input vector with this matrix

引数:
v input vector
戻り値:
mapped vector object

Vector2D rcsc::Matrix2D::transform ( const double &  x,
const double &  y 
) const [inline]

create transformed vector from input coordinates with this matrix

引数:
x input x-coordinates value
y input y-coordinates value
戻り値:
mapped vector object

void rcsc::Matrix2D::transform ( Vector2D v  )  const [inline]

transform input vector with this matrix

引数:
v pointer to the input vector.

std::ostream& rcsc::Matrix2D::print ( std::ostream &  os  )  const [inline]

put all elemtns to the output stream

引数:
os reference to the output stream
戻り値:
reference to the output stream


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0