g4tools  5.4.0
Public Member Functions | List of all members
tools::mat4d Class Reference
Inheritance diagram for tools::mat4d:
Inheritance graph
[legend]
Collaboration diagram for tools::mat4d:
Collaboration graph
[legend]

Public Member Functions

 mat4d ()
 
virtual ~mat4d ()
 
 mat4d (const mat4d &a_from)
 
mat4doperator= (const mat4d &a_from)
 
 mat4d (double a_00, double a_01, double a_02, double a_03, double a_10, double a_11, double a_12, double a_13, double a_20, double a_21, double a_22, double a_23, double a_30, double a_31, double a_32, double a_33)
 
 mat4d (const parent &a_from)
 
mat4doperator= (const parent &a_from)
 
 mat4d (const mat4< float > &a_from)
 
mat4doperator= (const mat4< float > &a_from)
 
void set_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle)
 
void mul_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle)
 
void left_mul_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle)
 
template<class VEC >
void set_rotate (const VEC &a_dir, double a_angle)
 
void mul_2d (double &a_x, double &a_y) const
 
void mul_3d (double &a_x, double &a_y, double &a_z) const
 
void mul_4d (double &a_x, double &a_y, double &a_z, double &a_w) const
 
- Public Member Functions inherited from tools::mat4< double >
 mat4 ()
 
 mat4 (const mat< double, 4 > &a_from)
 
 mat4 (const mat4 &a_from)
 
 mat4 (const double &a_00, const double &a_01, const double &a_02, const double &a_03, const double &a_10, const double &a_11, const double &a_12, const double &a_13, const double &a_20, const double &a_21, const double &a_22, const double &a_23, const double &a_30, const double &a_31, const double &a_32, const double &a_33)
 
virtual ~mat4 ()
 
mat4operator= (const mat4 &a_from)
 
void set_matrix (const mat4< double > &a_m)
 
void set_matrix (const double &a_00, const double &a_01, const double &a_02, const double &a_03, const double &a_10, const double &a_11, const double &a_12, const double &a_13, const double &a_20, const double &a_21, const double &a_22, const double &a_23, const double &a_30, const double &a_31, const double &a_32, const double &a_33)
 
void set_scale (const double &a_s)
 
void set_scale (const double &a_1, const double &a_2, const double &a_3)
 
void set_translate (const double &a_x, const double &a_y, const double &a_z)
 
void set_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double(*a_sin)(double), double(*a_cos)(double))
 
void set_ortho (const double &a_l, const double &a_r, const double &a_b, const double &a_t, const double &a_n, const double &a_f)
 
void set_frustum (const double &a_l, const double &a_r, const double &a_b, const double &a_t, const double &a_n, const double &a_f)
 
void get_translate (double &a_x, double &a_y, double &a_z) const
 
void no_translate ()
 
void mul_4 (double &a_x, double &a_y, double &a_z, double &a_p) const
 
void mul_3 (double &a_x, double &a_y, double &a_z) const
 
void mul_2 (double &a_x, double &a_y) const
 
void mul_dir_3 (double &a_x, double &a_y, double &a_z) const
 
void mul_dir_3 (VEC &a_dir) const
 
void mul_trans_3 (double &a_x, double &a_y, double &a_z) const
 
void mul_scale (const double &a_sx, const double &a_sy, const double &a_sz)
 
void mul_scale (const double &a_s)
 
void mul_translate (const double &a_x, const double &a_y, const double &a_z)
 
void mul_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double(*a_sin)(double), double(*a_cos)(double))
 
void left_mul_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double(*a_sin)(double), double(*a_cos)(double))
 
void left_mul_scale (const double &a_x, const double &a_y, const double &a_z)
 
void left_mul_translate (const double &a_x, const double &a_y, const double &a_z)
 
void v00 (const double &a_value)
 
const double & v00 () const
 
void v10 (const double &a_value)
 
const double & v10 () const
 
void v20 (const double &a_value)
 
const double & v20 () const
 
void v30 (const double &a_value)
 
const double & v30 () const
 
void v01 (const double &a_value)
 
const double & v01 () const
 
void v11 (const double &a_value)
 
const double & v11 () const
 
void v21 (const double &a_value)
 
const double & v21 () const
 
void v31 (const double &a_value)
 
const double & v31 () const
 
void v02 (const double &a_value)
 
const double & v02 () const
 
void v12 (const double &a_value)
 
const double & v12 () const
 
void v22 (const double &a_value)
 
const double & v22 () const
 
void v32 (const double &a_value)
 
const double & v32 () const
 
void v03 (const double &a_value)
 
const double & v03 () const
 
void v13 (const double &a_value)
 
const double & v13 () const
 
void v23 (const double &a_value)
 
const double & v23 () const
 
void v33 (const double &a_value)
 
const double & v33 () const
 
void mul_mtx_rot_root (const double &a_00, const double &a_01, const double &a_02, const double &a_10, const double &a_11, const double &a_12, const double &a_20, const double &a_21, const double &a_22)
 
void set_mat3 (MAT3 &a_m3)
 
- Public Member Functions inherited from tools::mat< double, 4 >
 mat ()
 
 mat (const mat &a_from)
 
 mat (const double a_v[])
 
virtual ~mat ()
 
matoperator= (const mat &a_from)
 
unsigned int dimension () const
 

Additional Inherited Members

- Static Protected Member Functions inherited from tools::mat4< double >
static void _set_translate (const double &a_x, const double &a_y, const double &a_z, double v[])
 
static void _set_scale (const double &a_1, const double &a_2, const double &a_3, double v[])
 
static void _set_rotate (const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double v[], double(*a_sin)(double), double(*a_cos)(double))
 
- Protected Attributes inherited from tools::mat< double, 4 >
double m_vec [D *D]
 

Detailed Description

Definition at line 12 of file mat4d.

Constructor & Destructor Documentation

◆ mat4d() [1/5]

tools::mat4d::mat4d ( )
inline

Definition at line 15 of file mat4d.

15 {}

◆ ~mat4d()

virtual tools::mat4d::~mat4d ( )
inlinevirtual

Definition at line 16 of file mat4d.

16 {}

◆ mat4d() [2/5]

tools::mat4d::mat4d ( const mat4d a_from)
inline

Definition at line 18 of file mat4d.

18 :parent(a_from){}

◆ mat4d() [3/5]

tools::mat4d::mat4d ( double  a_00,
double  a_01,
double  a_02,
double  a_03,
double  a_10,
double  a_11,
double  a_12,
double  a_13,
double  a_20,
double  a_21,
double  a_22,
double  a_23,
double  a_30,
double  a_31,
double  a_32,
double  a_33 
)
inline

Definition at line 24 of file mat4d.

28  :parent(a_00,a_01,a_02,a_03,
29  a_10,a_11,a_12,a_13,
30  a_20,a_21,a_22,a_23,
31  a_30,a_31,a_32,a_33)
32  {}

◆ mat4d() [4/5]

tools::mat4d::mat4d ( const parent a_from)
inline

Definition at line 33 of file mat4d.

33 :parent(a_from){}

◆ mat4d() [5/5]

tools::mat4d::mat4d ( const mat4< float > &  a_from)
inline

Definition at line 39 of file mat4d.

39  :parent(){
40  for(unsigned int index=0;index<16;index++) {
41  m_vec[index] = a_from.data()[index];
42  }
43  }

Member Function Documentation

◆ left_mul_rotate()

void tools::mat4d::left_mul_rotate ( const double &  a_x,
const double &  a_y,
const double &  a_z,
const double &  a_angle 
)
inline

Definition at line 57 of file mat4d.

57  {
58  parent::left_mul_rotate(a_x,a_y,a_z,a_angle,::sin,::cos);
59  }

◆ mul_2d()

void tools::mat4d::mul_2d ( double &  a_x,
double &  a_y 
) const
inline

Definition at line 68 of file mat4d.

68  {
69  parent::mul_2(a_x,a_y);
70  }

◆ mul_3d()

void tools::mat4d::mul_3d ( double &  a_x,
double &  a_y,
double &  a_z 
) const
inline

Definition at line 71 of file mat4d.

71  {
72  parent::mul_3(a_x,a_y,a_z);
73  }

◆ mul_4d()

void tools::mat4d::mul_4d ( double &  a_x,
double &  a_y,
double &  a_z,
double &  a_w 
) const
inline

Definition at line 74 of file mat4d.

74  {
75  parent::mul_4(a_x,a_y,a_z,a_w);
76  }

◆ mul_rotate()

void tools::mat4d::mul_rotate ( const double &  a_x,
const double &  a_y,
const double &  a_z,
const double &  a_angle 
)
inline

Definition at line 54 of file mat4d.

54  {
55  parent::mul_rotate(a_x,a_y,a_z,a_angle,::sin,::cos);
56  }

◆ operator=() [1/3]

mat4d& tools::mat4d::operator= ( const mat4< float > &  a_from)
inline

Definition at line 44 of file mat4d.

44  {
45  for(unsigned int index=0;index<16;index++) {
46  m_vec[index] = a_from.data()[index];
47  }
48  return *this;
49  }

◆ operator=() [2/3]

mat4d& tools::mat4d::operator= ( const mat4d a_from)
inline

Definition at line 19 of file mat4d.

19  {
20  parent::operator=(a_from);
21  return *this;
22  }

◆ operator=() [3/3]

mat4d& tools::mat4d::operator= ( const parent a_from)
inline

Definition at line 34 of file mat4d.

34  {
35  parent::operator=(a_from);
36  return *this;
37  }

◆ set_rotate() [1/2]

void tools::mat4d::set_rotate ( const double &  a_x,
const double &  a_y,
const double &  a_z,
const double &  a_angle 
)
inline

Definition at line 51 of file mat4d.

51  {
52  parent::set_rotate(a_x,a_y,a_z,a_angle,::sin,::cos);
53  }

◆ set_rotate() [2/2]

template<class VEC >
void tools::mat4d::set_rotate ( const VEC &  a_dir,
double  a_angle 
)
inline

Definition at line 62 of file mat4d.

62  {
63  //WARNING : a_dir must be a normalized vector.
64  parent::set_rotate(a_dir[0],a_dir[1],a_dir[2],a_angle,::sin,::cos);
65  }

The documentation for this class was generated from the following file:
tools::mat4< double >::mul_2
void mul_2(double &a_x, double &a_y) const
Definition: mat4:198
tools::mat< double, 4 >::m_vec
double m_vec[D *D]
Definition: mat:85
tools::mat4< double >::left_mul_rotate
void left_mul_rotate(const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double(*a_sin)(double), double(*a_cos)(double))
Definition: mat4:285
tools::mat4< double >::set_rotate
void set_rotate(const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double(*a_sin)(double), double(*a_cos)(double))
Definition: mat4:61
tools::mat4< double >::operator=
mat4 & operator=(const mat4 &a_from)
Definition: mat4:27
tools::mat4< double >::mul_4
void mul_4(double &a_x, double &a_y, double &a_z, double &a_p) const
Definition: mat4:168
tools::mat4< double >::mul_3
void mul_3(double &a_x, double &a_y, double &a_z) const
Definition: mat4:184
tools::mat4< double >::mul_rotate
void mul_rotate(const double &a_x, const double &a_y, const double &a_z, const double &a_angle, double(*a_sin)(double), double(*a_cos)(double))
Definition: mat4:279