GLFX::Matrix4 Struct Reference

#include <glfxvec.h>

List of all members.

Public Member Functions

 Matrix4 (const float *m)
 Matrix4 (const Matrix4 &m)
 Matrix4 (float _11, float _12, float _13, float _14, float _21, float _22, float _23, float _24, float _31, float _32, float _33, float _34, float _41, float _42, float _43, float _44)
 Matrix4 (float f)
 operator float * ()
 operator const float * () const
 operator Matrix3 () const
Vec4operator[] (int n)
float & operator() (int n, int m)
Matrix4operator= (const Matrix4 &m)
Matrix4operator *= (const Matrix4 &a)
float Det () const
Matrix4Inverse ()
Matrix4Transpose ()
Vec3 TransformPoint (const Vec3 &point) const
Vec3 TransformVector (const Vec3 &vector) const

Public Attributes

float _11
float _12
float _13
float _14
float _21
float _22
float _23
float _24
float _31
float _32
float _33
float _34
float _41
float _42
float _43
float _44

Friends

Matrix4 operator * (const Matrix4 &a, const Matrix4 &b)
Matrix4 MatrixTranslation (float x, float y, float z)
Matrix4 MatrixTranslation (const Vec3 &v)
Matrix4 MatrixRotationX (float angle)
Matrix4 MatrixRotationY (float angle)
Matrix4 MatrixRotationZ (float angle)
Matrix4 MatrixRotationQuaternion (const Quat &quat)
Matrix4 MatrixRotationYawPitchRoll (float yaw, float pitch, float roll)
Matrix4 MatrixRotationYawPitchRoll (const Vec3 &angles)
Matrix4 MatrixScaling (float x, float y, float z)
Matrix4 MatrixScaling (const Vec3 &v)
Matrix4 MatrixPerspectiveFovXRH (float fovx, float aspect, float znear, float zfar)
Matrix4 MatrixPerspectiveFovYRH (float fovy, float aspect, float znear, float zfar)
Matrix4 MatrixOrthoRH (float w, float h, float zn, float zf)
Matrix4 MatrixOrthoLH (float w, float h, float zn, float zf)
Matrix4 MatrixLookAtRH (const Vec3 &eye, const Vec3 &at, const Vec3 &up)
float Det (const Matrix4 &m)
Matrix4 Inverse (const Matrix4 &m)
Matrix4 Transpose (const Matrix4 &m)


Constructor & Destructor Documentation

GLFX::Matrix4::Matrix4 ( const float *  m  )  [inline]

Construct matrix from 16-element array of floats.

GLFX::Matrix4::Matrix4 ( const Matrix4 m  )  [inline]

Construct matrix from another one.

GLFX::Matrix4::Matrix4 ( float  _11,
float  _12,
float  _13,
float  _14,
float  _21,
float  _22,
float  _23,
float  _24,
float  _31,
float  _32,
float  _33,
float  _34,
float  _41,
float  _42,
float  _43,
float  _44 
) [inline]

Construct matrix from 16 floats.

GLFX::Matrix4::Matrix4 ( float  f  )  [inline]

Construct matrix from scalar.


Member Function Documentation

GLFX::Matrix4::operator float * (  )  [inline]

Get matrix as array of floats.

GLFX::Matrix4::operator const float * (  )  const [inline]

Get matrix as array of floats.

GLFX::Matrix4::operator Matrix3 (  )  const [inline]

Get upper-left 3x3 sub-matrix.

Vec4 & GLFX::Matrix4::operator[] ( int  n  )  [inline]

Get matrix row.

float & GLFX::Matrix4::operator() ( int  n,
int  m 
) [inline]

Get matrix element.

Matrix4 & GLFX::Matrix4::operator= ( const Matrix4 m  )  [inline]

Assign matrix.

Matrix4 & GLFX::Matrix4::operator *= ( const Matrix4 a  )  [inline]

Multiply by matrix.

float GLFX::Matrix4::Det (  )  const [inline]

Compute matrix determinant.

Matrix4 & GLFX::Matrix4::Inverse (  )  [inline]

Inverse matrix.

Matrix4 & GLFX::Matrix4::Transpose (  )  [inline]

Transpose matrix.

Vec3 GLFX::Matrix4::TransformPoint ( const Vec3 point  )  const [inline]

Transform 3d point by matrix.

Vec3 GLFX::Matrix4::TransformVector ( const Vec3 vector  )  const [inline]

Transform 3d vector by matrix.


Friends And Related Function Documentation

Matrix4 operator * ( const Matrix4 a,
const Matrix4 b 
) [friend]

Matrix multiplication.

Matrix4 MatrixTranslation ( float  x,
float  y,
float  z 
) [friend]

Construct translation matrix.

Matrix4 MatrixTranslation ( const Vec3 v  )  [friend]

Construct translation matrix.

Matrix4 MatrixRotationX ( float  angle  )  [friend]

Construct rotation matrix from angle (around X-axis).

Matrix4 MatrixRotationY ( float  angle  )  [friend]

Construct rotation matrix from angle (around Y-axis).

Matrix4 MatrixRotationZ ( float  angle  )  [friend]

Construct rotation matrix from angle (around Z-axis).

Matrix4 MatrixRotationQuaternion ( const Quat quat  )  [friend]

Construct rotation matrix from quaternion.

Matrix4 MatrixRotationYawPitchRoll ( float  yaw,
float  pitch,
float  roll 
) [friend]

Construct rotation matrix (yaw-pitch-roll).

The order of multiplication is: roll (y), pitch (x), yaw (z).

Matrix4 MatrixRotationYawPitchRoll ( const Vec3 angles  )  [friend]

Construct rotation matrix (yaw-pitch-roll).

The order of multiplication is: roll (y), pitch (x), yaw (z).

Matrix4 MatrixScaling ( float  x,
float  y,
float  z 
) [friend]

Construct scaling matrix.

Matrix4 MatrixScaling ( const Vec3 v  )  [friend]

Construct scaling matrix.

Matrix4 MatrixPerspectiveFovXRH ( float  fovx,
float  aspect,
float  znear,
float  zfar 
) [friend]

Construct perspective matrix (right-handed).

Matrix4 MatrixPerspectiveFovYRH ( float  fovy,
float  aspect,
float  znear,
float  zfar 
) [friend]

Construct perspective matrix (right-handed).

Matrix4 MatrixOrthoRH ( float  w,
float  h,
float  zn,
float  zf 
) [friend]

Construct orthogonal matrix (right-handed).

Matrix4 MatrixOrthoLH ( float  w,
float  h,
float  zn,
float  zf 
) [friend]

Construct orthogonal matrix (left-handed).

Matrix4 MatrixLookAtRH ( const Vec3 eye,
const Vec3 at,
const Vec3 up 
) [friend]

Construct look-at matrix.

float Det ( const Matrix4 m  )  [friend]

Compute matrix determinant.

Matrix4 Inverse ( const Matrix4 m  )  [friend]

Inverse matrix.

Matrix4 Transpose ( const Matrix4 m  )  [friend]

Transpose matrix.


Member Data Documentation

float GLFX::Matrix4::_11

Matrix element [1, 1].

float GLFX::Matrix4::_12

Matrix element [1, 2].

float GLFX::Matrix4::_13

Matrix element [1, 3].

float GLFX::Matrix4::_14

Matrix element [1, 4].

float GLFX::Matrix4::_21

Matrix element [2, 1].

float GLFX::Matrix4::_22

Matrix element [2, 2].

float GLFX::Matrix4::_23

Matrix element [2, 3].

float GLFX::Matrix4::_24

Matrix element [2, 4].

float GLFX::Matrix4::_31

Matrix element [3, 1].

float GLFX::Matrix4::_32

Matrix element [3, 2].

float GLFX::Matrix4::_33

Matrix element [3, 3].

float GLFX::Matrix4::_34

Matrix element [3, 4].

float GLFX::Matrix4::_41

Matrix element [4, 1].

float GLFX::Matrix4::_42

Matrix element [4, 2].

float GLFX::Matrix4::_43

Matrix element [4, 3].

float GLFX::Matrix4::_44

Matrix element [4, 4].


The documentation for this struct was generated from the following file:
SourceForge.net Logo