Blender  V2.59
Public Member Functions | Protected Attributes
MT_Matrix4x4 Class Reference

#include <MT_Matrix4x4.h>

List of all members.

Public Member Functions

 MT_Matrix4x4 ()
 MT_Matrix4x4 (const float *m)
 MT_Matrix4x4 (const double *m)
 MT_Matrix4x4 (MT_Scalar xx, MT_Scalar xy, MT_Scalar xz, MT_Scalar xw, MT_Scalar yx, MT_Scalar yy, MT_Scalar yz, MT_Scalar yw, MT_Scalar zx, MT_Scalar zy, MT_Scalar zz, MT_Scalar zw, MT_Scalar wx, MT_Scalar wy, MT_Scalar wz, MT_Scalar ww)
 MT_Matrix4x4 (const MT_Transform &t)
MT_Vector4operator[] (int i)
const MT_Vector4operator[] (int i) const
void setValue (const float *m)
void setValue (const double *m)
void setValue (MT_Scalar xx, MT_Scalar xy, MT_Scalar xz, MT_Scalar xw, MT_Scalar yx, MT_Scalar yy, MT_Scalar yz, MT_Scalar yw, MT_Scalar zx, MT_Scalar zy, MT_Scalar zz, MT_Scalar zw, MT_Scalar wx, MT_Scalar wy, MT_Scalar wz, MT_Scalar ww)
void scale (MT_Scalar x, MT_Scalar y, MT_Scalar z, MT_Scalar w)
MT_Matrix4x4 scaled (MT_Scalar x, MT_Scalar y, MT_Scalar z, MT_Scalar w) const
void setIdentity ()
float getElement (int i, int j)
void getValue (float *m) const
void getValue (double *m) const
MT_Matrix4x4operator*= (const MT_Matrix4x4 &m)
MT_Scalar tdot (int c, const MT_Vector4 &v) const
MT_Matrix4x4 absolute () const
MT_Matrix4x4 transposed () const
void transpose ()
MT_Matrix4x4 inverse () const
void invert ()

Protected Attributes

MT_Vector4 m_el [4]

Detailed Description

Id:
MT_Matrix4x4.h 35158 2011-02-25 11:49:19Z jesterking

Copyright (C) 2001 NaN Technologies B.V. A 4x4 matrix compatible with other stuff.

Definition at line 51 of file MT_Matrix4x4.h.


Constructor & Destructor Documentation

MT_Matrix4x4::MT_Matrix4x4 ( ) [inline]

Empty contructor.

Definition at line 56 of file MT_Matrix4x4.h.

Referenced by absolute(), scaled(), and transposed().

MT_Matrix4x4::MT_Matrix4x4 ( const float *  m) [inline]

Initialize all fields with the values pointed at by m. A contigous block of 16 values is read.

Definition at line 60 of file MT_Matrix4x4.h.

References setValue().

MT_Matrix4x4::MT_Matrix4x4 ( const double *  m) [inline]

Initialize all fields with the values pointed at by m. A contigous block of 16 values is read.

Definition at line 64 of file MT_Matrix4x4.h.

References setValue().

MT_Matrix4x4::MT_Matrix4x4 ( MT_Scalar  xx,
MT_Scalar  xy,
MT_Scalar  xz,
MT_Scalar  xw,
MT_Scalar  yx,
MT_Scalar  yy,
MT_Scalar  yz,
MT_Scalar  yw,
MT_Scalar  zx,
MT_Scalar  zy,
MT_Scalar  zz,
MT_Scalar  zw,
MT_Scalar  wx,
MT_Scalar  wy,
MT_Scalar  wz,
MT_Scalar  ww 
) [inline]

Initialise with these 16 explicit values.

Definition at line 69 of file MT_Matrix4x4.h.

References setValue().

MT_Matrix4x4::MT_Matrix4x4 ( const MT_Transform t) [inline]

Initialize from an MT_Transform.

Definition at line 82 of file MT_Matrix4x4.h.

References MT_Transform::getBasis(), MT_Transform::getOrigin(), and setValue().


Member Function Documentation

GEN_INLINE MT_Matrix4x4 MT_Matrix4x4::absolute ( ) const

Definition at line 102 of file MT_Matrix4x4.inl.

References m_el, MT_abs(), and MT_Matrix4x4().

float MT_Matrix4x4::getElement ( int  i,
int  j 
) [inline]

Read the element from row i, column j.

Definition at line 171 of file MT_Matrix4x4.h.

References i, and m_el.

void MT_Matrix4x4::getValue ( float *  m) const [inline]

Copy the contents to a contiguous block of 16 floats.

Definition at line 178 of file MT_Matrix4x4.h.

References m_el.

Referenced by RAS_OpenGLRasterizer::SetProjectionMatrix(), BL_Shader::SetUniform(), RAS_OpenGLRasterizer::SetViewMatrix(), and LOD_QuadricEditor::Update().

void MT_Matrix4x4::getValue ( double *  m) const [inline]

Copy the contents to a contiguous block of 16 doubles.

Definition at line 188 of file MT_Matrix4x4.h.

References m_el.

GEN_INLINE MT_Matrix4x4 MT_Matrix4x4::inverse ( ) const

Definition at line 55 of file MT_Matrix4x4.inl.

References invert().

Referenced by RAS_MeshSlot::Split().

GEN_INLINE void MT_Matrix4x4::invert ( )
GEN_INLINE MT_Matrix4x4 & MT_Matrix4x4::operator*= ( const MT_Matrix4x4 m)

Left-multiply this matrix with the argument.

Definition at line 64 of file MT_Matrix4x4.inl.

References m_el, setValue(), and tdot().

MT_Vector4& MT_Matrix4x4::operator[] ( int  i) [inline]

Get the i-th row.

Definition at line 98 of file MT_Matrix4x4.h.

References i, and m_el.

const MT_Vector4& MT_Matrix4x4::operator[] ( int  i) const [inline]

Get the i-th row.

Definition at line 102 of file MT_Matrix4x4.h.

References i, and m_el.

void MT_Matrix4x4::scale ( MT_Scalar  x,
MT_Scalar  y,
MT_Scalar  z,
MT_Scalar  w 
) [inline]

Scale the columns of this matrix with x, y, z, w respectively.

Definition at line 141 of file MT_Matrix4x4.h.

References m_el, and simple_enum_gen::w.

MT_Matrix4x4 MT_Matrix4x4::scaled ( MT_Scalar  x,
MT_Scalar  y,
MT_Scalar  z,
MT_Scalar  w 
) const [inline]

Return a column-scaled version of this matrix.

Definition at line 151 of file MT_Matrix4x4.h.

References m_el, and MT_Matrix4x4().

void MT_Matrix4x4::setIdentity ( ) [inline]

Set this matrix to I.

Definition at line 161 of file MT_Matrix4x4.h.

References setValue().

Referenced by KX_Camera::KX_Camera(), and RAS_OpenGLRasterizer::RAS_OpenGLRasterizer().

void MT_Matrix4x4::setValue ( const float *  m) [inline]

Set the matrix to the values pointer at by m. A contiguous block of 16 values is copied.

Definition at line 107 of file MT_Matrix4x4.h.

References m_el.

Referenced by BL_ArmatureObject::GetBoneMatrix(), RAS_OpenGLRasterizer::GetFrustumMatrix(), RAS_OpenGLRasterizer::GetOrthoMatrix(), MT_Matrix4x4(), operator*=(), setIdentity(), and LOD_QuadricEditor::Update().

void MT_Matrix4x4::setValue ( const double *  m) [inline]

Set the matrix to the values pointer at by m. A contiguous block of 16 values is copied.

Definition at line 118 of file MT_Matrix4x4.h.

References m_el.

void MT_Matrix4x4::setValue ( MT_Scalar  xx,
MT_Scalar  xy,
MT_Scalar  xz,
MT_Scalar  xw,
MT_Scalar  yx,
MT_Scalar  yy,
MT_Scalar  yz,
MT_Scalar  yw,
MT_Scalar  zx,
MT_Scalar  zy,
MT_Scalar  zz,
MT_Scalar  zw,
MT_Scalar  wx,
MT_Scalar  wy,
MT_Scalar  wz,
MT_Scalar  ww 
) [inline]

Set the matrix to these 16 explicit values.

Definition at line 128 of file MT_Matrix4x4.h.

References m_el.

MT_Scalar MT_Matrix4x4::tdot ( int  c,
const MT_Vector4 v 
) const [inline]

Left-multiply column c with row vector c.

Definition at line 203 of file MT_Matrix4x4.h.

References m_el.

Referenced by operator*(), and operator*=().

GEN_INLINE void MT_Matrix4x4::transpose ( )

Definition at line 98 of file MT_Matrix4x4.inl.

References transposed().

GEN_INLINE MT_Matrix4x4 MT_Matrix4x4::transposed ( ) const

Definition at line 91 of file MT_Matrix4x4.inl.

References m_el, and MT_Matrix4x4().

Referenced by RAS_MeshSlot::Join(), RAS_MeshSlot::Split(), and transpose().


Member Data Documentation

Access with [row index][column index]

Definition at line 227 of file MT_Matrix4x4.h.

Referenced by absolute(), getElement(), getValue(), invert(), operator*=(), operator[](), scale(), scaled(), setValue(), tdot(), and transposed().


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