sculpto
Public Member Functions | Public Attributes | List of all members
scl::math::matr4_data< T > Class Template Reference

#include <matr4.h>

Inheritance diagram for scl::math::matr4_data< T >:
scl::math::matr4< T >

Public Member Functions

 matr4_data ()
 
 matr4_data (const matr4_data &Other)
 
 matr4_data (T A00, T A01, T A02, T A03, T A10, T A11, T A12, T A13, T A20, T A21, T A22, T A23, T A30, T A31, T A32, T A33)
 
 operator T* ()
 

Public Attributes

A [4][4]
 

Detailed Description

template<class T>
class scl::math::matr4_data< T >

4x4 matrix data type class. Used to pass onlt neccecery data to shaders.

Definition at line 17 of file matr4.h.

Constructor & Destructor Documentation

◆ matr4_data() [1/3]

template<class T >
scl::math::matr4_data< T >::matr4_data ( )
inline

Default matrix data constructor.

Definition at line 24 of file matr4.h.

24 :
25 A { {1, 0, 0, 0},
26 {0, 1, 0, 0},
27 {0, 0, 1, 0},
28 {0, 0, 0, 1} } {}

◆ matr4_data() [2/3]

template<class T >
scl::math::matr4_data< T >::matr4_data ( const matr4_data< T > &  Other)
inline

Default matrix data copy constructor.

Definition at line 31 of file matr4.h.

32 {
33 memcpy(A, Other.A, sizeof(T) * 16);
34 }

◆ matr4_data() [3/3]

template<class T >
scl::math::matr4_data< T >::matr4_data ( A00,
A01,
A02,
A03,
A10,
A11,
A12,
A13,
A20,
A21,
A22,
A23,
A30,
A31,
A32,
A33 
)
inline
  • Matrix data constructor by 16 values.
Parameters
A00-A33- matrx valeus.

Definition at line 41 of file matr4.h.

44 :
45 A { {A00, A01, A02, A03},
46 {A10, A11, A12, A13},
47 {A20, A21, A22, A23},
48 {A30, A31, A32, A33} } {}

Member Function Documentation

◆ operator T*()

template<class T >
scl::math::matr4_data< T >::operator T* ( )
inline
  • Getting pointer to first component of natrix operator. Need to pass vector to shader.
Returns
pointer to first component of matrix.

Definition at line 56 of file matr4.h.

57 {
58 return A[0];
59 }

Member Data Documentation

◆ A

template<class T >
T scl::math::matr4_data< T >::A[4][4]

Matrix data

Definition at line 21 of file matr4.h.


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