Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
matrix4 Struct Reference

#include <geom.hpp>

Public Member Functions

 matrix4 ()
 
 matrix4 (const float *m)
 
 matrix4 (const vec &a, const vec &b, const vec &c=vec(0, 0, 1))
 
 matrix4 (const vec4 &a, const vec4 &b, const vec4 &c, const vec4 &d=vec4(0, 0, 0, 1))
 
 matrix4 (const matrix4x3 &m)
 
 matrix4 (const matrix3 &rot, const vec &trans)
 
void mul (const matrix4 &x, const matrix3 &y)
 
void mul (const matrix3 &y)
 
template<class T >
void mult (const matrix4 &x, const matrix4 &y)
 
void mul (const matrix4 &x, const matrix4 &y)
 
void mul (const matrix4 &y)
 
void muld (const matrix4 &x, const matrix4 &y)
 
void muld (const matrix4 &y)
 
void rotate_around_x (float ck, float sk)
 
void rotate_around_x (float angle)
 
void rotate_around_x (const vec2 &sc)
 
void rotate_around_y (float ck, float sk)
 
void rotate_around_y (float angle)
 
void rotate_around_y (const vec2 &sc)
 
void rotate_around_z (float ck, float sk)
 
void rotate_around_z (float angle)
 
void rotate_around_z (const vec2 &sc)
 
void rotate (float ck, float sk, const vec &axis)
 
void rotate (float angle, const vec &dir)
 
void rotate (const vec2 &sc, const vec &dir)
 
void identity ()
 
void settranslation (const vec &v)
 
void settranslation (float x, float y, float z)
 
void translate (const vec &p)
 
void translate (float x, float y, float z)
 
void translate (const vec &p, float scale)
 
void setscale (float x, float y, float z)
 
void setscale (const vec &v)
 
void setscale (float n)
 
void scale (float x, float y, float z)
 
void scale (const vec &v)
 
void scale (float n)
 
void scalexy (float x, float y)
 
void scalez (float k)
 
void reflectz (float z)
 
void projective (float zscale=0.5f, float zoffset=0.5f)
 
void jitter (float x, float y)
 
void transpose ()
 
void transpose (const matrix4 &m)
 
void frustum (float left, float right, float bottom, float top, float znear, float zfar)
 
void perspective (float fovy, float aspect, float znear, float zfar)
 
void ortho (float left, float right, float bottom, float top, float znear, float zfar)
 
void clip (const plane &p, const matrix4 &m)
 
void transform (const vec &in, vec &out) const
 
void transform (const vec4 &in, vec &out) const
 
void transform (const vec &in, vec4 &out) const
 
void transform (const vec4 &in, vec4 &out) const
 
template<class T , class U >
transform (const U &in) const
 
template<class T >
vec perspectivetransform (const T &in) const
 
void transformnormal (const vec &in, vec &out) const
 
void transformnormal (const vec &in, vec4 &out) const
 
template<class T , class U >
transformnormal (const U &in) const
 
void transposedtransform (const vec &in, vec &out) const
 
void transposedtransformnormal (const vec &in, vec &out) const
 
void transposedtransform (const plane &in, plane &out) const
 
float getscale () const
 
vec gettranslation () const
 
vec4 rowx () const
 
vec4 rowy () const
 
vec4 rowz () const
 
vec4 roww () const
 
bool invert (const matrix4 &m, double mindet=1.0e-12)
 
vec2 lineardepthscale () const
 

Public Attributes

vec4 a
 
vec4 b
 
vec4 c
 
vec4 d
 

Constructor & Destructor Documentation

matrix4::matrix4 ( )
inline

Referenced by mul(), and muld().

matrix4::matrix4 ( const float *  m)
inline
matrix4::matrix4 ( const vec a,
const vec b,
const vec c = vec(0, 0, 1) 
)
inline
matrix4::matrix4 ( const vec4 a,
const vec4 b,
const vec4 c,
const vec4 d = vec4(0, 0, 0, 1) 
)
inline
matrix4::matrix4 ( const matrix4x3 m)
inline
matrix4::matrix4 ( const matrix3 rot,
const vec trans 
)
inline

Member Function Documentation

void matrix4::clip ( const plane p,
const matrix4 m 
)
inline

References a, b, c, d, plane::offset, and scale().

Referenced by drawreflection().

void matrix4::frustum ( float  left,
float  right,
float  bottom,
float  top,
float  znear,
float  zfar 
)
inline

References d.

Referenced by perspective().

float matrix4::getscale ( ) const
inline
vec matrix4::gettranslation ( ) const
inline

References d.

Referenced by animmodel::part::render().

void matrix4::identity ( )
inline

References d.

Referenced by animmodel::render(), and renderprefab().

bool matrix4::invert ( const matrix4 m,
double  mindet = 1.0e-12 
)

References a, b, c, d, and det3x3().

Referenced by setcamprojmatrix().

void matrix4::jitter ( float  x,
float  y 
)
inline

References d.

vec2 matrix4::lineardepthscale ( ) const
inline

References d, and vec2::div().

Referenced by setcamprojmatrix().

void matrix4::mul ( const matrix4 x,
const matrix3 y 
)
inline
void matrix4::mul ( const matrix3 y)
inline

References matrix4(), and mul().

Referenced by mul().

void matrix4::mul ( const matrix4 x,
const matrix4 y 
)
inline
void matrix4::mul ( const matrix4 y)
inline

References matrix4().

void matrix4::muld ( const matrix4 x,
const matrix4 y 
)
inline

Referenced by setcamprojmatrix().

void matrix4::muld ( const matrix4 y)
inline

References matrix4().

template<class T >
void matrix4::mult ( const matrix4 x,
const matrix4 y 
)
inline

References a, b, c, d, vec4::madd(), and vec4::mul().

void matrix4::ortho ( float  left,
float  right,
float  bottom,
float  top,
float  znear,
float  zfar 
)
inline
void matrix4::perspective ( float  fovy,
float  aspect,
float  znear,
float  zfar 
)
inline
template<class T >
vec matrix4::perspectivetransform ( const T &  in) const
inline
void matrix4::projective ( float  zscale = 0.5f,
float  zoffset = 0.5f 
)
inline

References d.

Referenced by pushshadowmap().

void matrix4::reflectz ( float  z)
inline

References vec4::add(), d, mul(), and vec4::neg().

Referenced by drawreflection().

void matrix4::rotate ( float  ck,
float  sk,
const vec axis 
)
inline

References mul(), and matrix3::rotate().

Referenced by animmodel::part::render().

void matrix4::rotate ( float  angle,
const vec dir 
)
inline

References rotate().

Referenced by rotate().

void matrix4::rotate ( const vec2 sc,
const vec dir 
)
inline

References rotate().

Referenced by rotate().

void matrix4::rotate_around_x ( float  ck,
float  sk 
)
inline
void matrix4::rotate_around_x ( float  angle)
inline

References rotate_around_x().

Referenced by rotate_around_x().

void matrix4::rotate_around_x ( const vec2 sc)
inline

References rotate_around_x().

Referenced by rotate_around_x().

void matrix4::rotate_around_y ( float  ck,
float  sk 
)
inline

References vec4::madd(), vec4::msub(), and vec4::mul().

Referenced by renderprefab(), and setcammatrix().

void matrix4::rotate_around_y ( float  angle)
inline

References rotate_around_y().

Referenced by rotate_around_y().

void matrix4::rotate_around_y ( const vec2 sc)
inline

References rotate_around_y().

Referenced by rotate_around_y().

void matrix4::rotate_around_z ( float  ck,
float  sk 
)
inline
void matrix4::rotate_around_z ( float  angle)
inline

References rotate_around_z().

Referenced by rotate_around_z().

void matrix4::rotate_around_z ( const vec2 sc)
inline

References rotate_around_z().

Referenced by rotate_around_z().

vec4 matrix4::roww ( ) const
inline

References d.

Referenced by setvfcP().

vec4 matrix4::rowx ( ) const
inline

References d.

Referenced by setvfcP().

vec4 matrix4::rowy ( ) const
inline

References d.

Referenced by setvfcP().

vec4 matrix4::rowz ( ) const
inline

References d.

Referenced by setvfcP().

void matrix4::scale ( float  x,
float  y,
float  z 
)
inline
void matrix4::scale ( const vec v)
inline

References scale().

Referenced by scale().

void matrix4::scale ( float  n)
inline

References scale().

Referenced by scale().

void matrix4::scalexy ( float  x,
float  y 
)
inline

References d.

Referenced by drawcubemap().

void matrix4::scalez ( float  k)
inline

References d.

Referenced by renderavatar().

void matrix4::setscale ( float  x,
float  y,
float  z 
)
inline
void matrix4::setscale ( const vec v)
inline

References setscale().

Referenced by setscale().

void matrix4::setscale ( float  n)
inline

References setscale().

Referenced by setscale().

void matrix4::settranslation ( const vec v)
inline
void matrix4::settranslation ( float  x,
float  y,
float  z 
)
inline

References d.

void matrix4::transform ( const vec in,
vec out 
) const
inline
void matrix4::transform ( const vec4 in,
vec out 
) const
inline

References vec::add(), d, vec::mul(), and mul().

void matrix4::transform ( const vec in,
vec4 out 
) const
inline

References vec4::add(), d, vec4::madd(), and vec4::mul().

void matrix4::transform ( const vec4 in,
vec4 out 
) const
inline

References d, vec4::madd(), and vec4::mul().

template<class T , class U >
T matrix4::transform ( const U &  in) const
inline

References transform().

void matrix4::transformnormal ( const vec in,
vec out 
) const
inline

References vec::add(), vec::mul(), and mul().

Referenced by animmodel::render(), and transformnormal().

void matrix4::transformnormal ( const vec in,
vec4 out 
) const
inline

References vec4::madd(), and vec4::mul().

template<class T , class U >
T matrix4::transformnormal ( const U &  in) const
inline

References transformnormal().

void matrix4::translate ( const vec p)
inline
void matrix4::translate ( float  x,
float  y,
float  z 
)
inline

References translate().

Referenced by translate().

void matrix4::translate ( const vec p,
float  scale 
)
inline

References mul(), and translate().

Referenced by translate().

void matrix4::transpose ( )
inline

References d.

void matrix4::transpose ( const matrix4 m)
inline

References a, b, c, and d.

void matrix4::transposedtransform ( const vec in,
vec out 
) const
inline

References d, vec4::dot3(), and vec::sub().

Referenced by drawreflection(), and animmodel::part::render().

void matrix4::transposedtransform ( const plane in,
plane out 
) const
inline

References d, plane::dist(), and plane::offset.

void matrix4::transposedtransformnormal ( const vec in,
vec out 
) const
inline

References vec4::dot3().

Referenced by animmodel::part::render(), and setcammatrix().

Member Data Documentation

vec4 matrix4::a
vec4 matrix4::b
vec4 matrix4::c
vec4 matrix4::d

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