CSEngine
Loading...
Searching...
No Matches
CSE::Matrix3< T > Class Template Reference

Public Member Functions

 Matrix3 (const T *m)
 
Matrix3 Transposed () const
 
Vector3< T > operator* (const Vector3< T > &b) const
 
const T * Pointer () const
 

Public Attributes

vec3 x
 
vec3 y
 
vec3 z
 

Detailed Description

template<typename T>
class CSE::Matrix3< T >

Definition at line 36 of file Matrix.h.

Constructor & Destructor Documentation

◆ Matrix3() [1/2]

template<typename T >
CSE::Matrix3< T >::Matrix3 ( )
inline

Definition at line 43 of file Matrix.h.

43 {
44 MAT3_XX = 1;
45 MAT3_XY = 0;
46 MAT3_XZ = 0;
47 MAT3_YX = 0;
48 MAT3_YY = 1;
49 MAT3_YZ = 0;
50 MAT3_ZX = 0;
51 MAT3_ZY = 0;
52 MAT3_ZZ = 1;
53 }

◆ Matrix3() [2/2]

template<typename T >
CSE::Matrix3< T >::Matrix3 ( const T *  m)
inlineexplicit

Definition at line 55 of file Matrix.h.

55 {
56 MAT3_XX = m[0];
57 MAT3_XY = m[1];
58 MAT3_XZ = m[2];
59 MAT3_YX = m[3];
60 MAT3_YY = m[4];
61 MAT3_YZ = m[5];
62 MAT3_ZX = m[6];
63 MAT3_ZY = m[7];
64 MAT3_ZZ = m[8];
65 }

Member Function Documentation

◆ operator*()

template<typename T >
Vector3< T > CSE::Matrix3< T >::operator* ( const Vector3< T > &  b) const
inline

Definition at line 83 of file Matrix.h.

83 {
84 Vector3<T> v;
85 v.x = MAT3_XX * b.x + MAT3_XY * b.y + MAT3_XZ * b.z;
86 v.y = MAT3_YX * b.x + MAT3_YY * b.y + MAT3_YZ * b.z;
87 v.z = MAT3_ZX * b.x + MAT3_ZY * b.y + MAT3_ZZ * b.z;
88 return v;
89 }

◆ Pointer()

template<typename T >
const T * CSE::Matrix3< T >::Pointer ( ) const
inline

Definition at line 91 of file Matrix.h.

91 {
92 return &MAT3_XX;
93 }

◆ Transposed()

template<typename T >
Matrix3 CSE::Matrix3< T >::Transposed ( ) const
inline

Definition at line 69 of file Matrix.h.

69 {
70 Matrix3 m;
71 m.MAT3_XX = MAT3_XX;
72 m.MAT3_XY = MAT3_YX;
73 m.MAT3_XZ = MAT3_ZX;
74 m.MAT3_YX = MAT3_XY;
75 m.MAT3_YY = MAT3_YY;
76 m.MAT3_YZ = MAT3_ZY;
77 m.MAT3_ZX = MAT3_XZ;
78 m.MAT3_ZY = MAT3_YZ;
79 m.MAT3_ZZ = MAT3_ZZ;
80 return m;
81 }

Member Data Documentation

◆ x

template<typename T >
vec3 CSE::Matrix3< T >::x

Definition at line 39 of file Matrix.h.

◆ y

template<typename T >
vec3 CSE::Matrix3< T >::y

Definition at line 40 of file Matrix.h.

◆ z

template<typename T >
vec3 CSE::Matrix3< T >::z

Definition at line 41 of file Matrix.h.


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