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

#include <geom.hpp>

Public Member Functions

 matrix3 ()
 
 matrix3 (const vec &a, const vec &b, const vec &c)
 
 matrix3 (float angle, const vec &axis)
 
 matrix3 (const quat &q)
 
 matrix3 (const matrix4x3 &m)
 
 matrix3 (const matrix4 &m)
 
void mul (const matrix3 &m, const matrix3 &n)
 
void mul (const matrix3 &n)
 
void multranspose (const matrix3 &m, const matrix3 &n)
 
void multranspose (const matrix3 &n)
 
void transposemul (const matrix3 &m, const matrix3 &n)
 
void transposemul (const matrix3 &n)
 
void transpose ()
 
template<class M >
void transpose (const M &m)
 
void invert (const matrix3 &o)
 
void invert ()
 
void normalize ()
 
void scale (float k)
 
void rotate (float angle, const vec &axis)
 
void rotate (float ck, float sk, const vec &axis)
 
void rotationalign (const vec &d, const vec &z)
 Cheap (and mathematically advanced) rotation method. More...
 
void setyaw (float ck, float sk)
 
void setyaw (float angle)
 
float trace () const
 
bool calcangleaxis (float tr, float &angle, vec &axis, float threshold=1e-16f) const
 
bool calcangleaxis (float &angle, vec &axis, float threshold=1e-16f) const
 
vec transform (const vec &o) const
 
vec transposedtransform (const vec &o) const
 
vec abstransform (const vec &o) const
 
vec abstransposedtransform (const vec &o) const
 
void identity ()
 
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)
 
vec transform (const vec2 &o)
 
vec transposedtransform (const vec2 &o) const
 
vec rowx () const
 
vec rowy () const
 
vec rowz () const
 

Public Attributes

vec a
 
vec b
 
vec c
 

Constructor & Destructor Documentation

matrix3::matrix3 ( )
inline
matrix3::matrix3 ( const vec a,
const vec b,
const vec c 
)
inline
matrix3::matrix3 ( float  angle,
const vec axis 
)
inlineexplicit

References rotate().

matrix3::matrix3 ( const quat q)
inlineexplicit

References a, b, and c.

matrix3::matrix3 ( const matrix4x3 m)
inlineexplicit
matrix3::matrix3 ( const matrix4 m)
inlineexplicit

Member Function Documentation

vec matrix3::abstransform ( const vec o) const
inline

References a, vec::abs(), vec::add(), b, c, vec::mul(), and mul().

vec matrix3::abstransposedtransform ( const vec o) const
inline

References a, vec::absdot(), b, and c.

bool matrix3::calcangleaxis ( float  tr,
float &  angle,
vec axis,
float  threshold = 1e-16f 
) const
inline
bool matrix3::calcangleaxis ( float &  angle,
vec axis,
float  threshold = 1e-16f 
) const
inline

References calcangleaxis(), and trace().

Referenced by calcangleaxis().

void matrix3::identity ( )
inline

References a, b, and c.

Referenced by recomputecamera().

void matrix3::invert ( const matrix3 o)
inline

References a, b, c, vec::mul(), vec::squaredlen(), and transpose().

void matrix3::invert ( )
inline

References invert(), and matrix3().

Referenced by invert().

void matrix3::mul ( const matrix3 m,
const matrix3 n 
)
inline
void matrix3::mul ( const matrix3 n)
inline

References matrix3(), and mul().

Referenced by mul().

void matrix3::multranspose ( const matrix3 m,
const matrix3 n 
)
inline
void matrix3::multranspose ( const matrix3 n)
inline

References matrix3(), and multranspose().

Referenced by multranspose().

void matrix3::normalize ( )
inline

References a, b, c, and vec::normalize().

Referenced by BIH::BIH().

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

References a, b, and c.

void matrix3::rotate_around_x ( float  ck,
float  sk 
)
inline

References b, c, vec::madd(), vec::msub(), and vec::mul().

Referenced by recomputecamera().

void matrix3::rotate_around_x ( float  angle)
inline

References rotate_around_x().

Referenced by rotate_around_x().

void matrix3::rotate_around_x ( const vec2 sc)
inline

References rotate_around_x().

Referenced by rotate_around_x().

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

References a, c, vec::madd(), vec::msub(), and vec::mul().

Referenced by recomputecamera().

void matrix3::rotate_around_y ( float  angle)
inline

References rotate_around_y().

Referenced by rotate_around_y().

void matrix3::rotate_around_y ( const vec2 sc)
inline

References rotate_around_y().

Referenced by rotate_around_y().

void matrix3::rotate_around_z ( float  ck,
float  sk 
)
inline

References a, b, vec::madd(), vec::msub(), and vec::mul().

Referenced by recomputecamera().

void matrix3::rotate_around_z ( float  angle)
inline

References rotate_around_z().

Referenced by rotate_around_z().

void matrix3::rotate_around_z ( const vec2 sc)
inline

References rotate_around_z().

Referenced by rotate_around_z().

void matrix3::rotationalign ( const vec d,
const vec z 
)
inline

Cheap (and mathematically advanced) rotation method.

Makes this matrix to a rotation matrix.

Warning
only give normalized vectors in.

References a, b, c, vec::cross(), and vec::dot().

vec matrix3::rowx ( ) const
inline

References a, b, and c.

vec matrix3::rowy ( ) const
inline

References a, b, and c.

vec matrix3::rowz ( ) const
inline

References a, b, and c.

void matrix3::scale ( float  k)
inline

References a, b, c, and vec::mul().

void matrix3::setyaw ( float  ck,
float  sk 
)
inline

References a, b, and c.

Referenced by mpr::EntOBB::EntOBB(), mpr::Model::Model(), and setyaw().

void matrix3::setyaw ( float  angle)
inline

References setyaw().

float matrix3::trace ( ) const
inline

References a, b, and c.

Referenced by calcangleaxis().

vec matrix3::transform ( const vec o) const
inline
vec matrix3::transform ( const vec2 o)
inline

References a, b, vec::madd(), and vec::mul().

void matrix3::transpose ( )
inline

References a, b, and c.

Referenced by invert().

template<class M >
void matrix3::transpose ( const M &  m)
inline

References a, b, and c.

vec matrix3::transposedtransform ( const vec o) const
inline
vec matrix3::transposedtransform ( const vec2 o) const
inline

References a, b, c, and vec::dot2().

void matrix3::transposemul ( const matrix3 m,
const matrix3 n 
)
inline

References a, b, c, and vec::dot().

Referenced by ragdolldata::calcrotfriction().

void matrix3::transposemul ( const matrix3 n)
inline

References matrix3(), and transposemul().

Referenced by transposemul().

Member Data Documentation

vec matrix3::a
vec matrix3::b
vec matrix3::c

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