TrinityCore
G3D::Matrix2 Class Reference

#include <Matrix2.h>

Public Member Functions

Matrix2 ()

Matrix2 (float v00, float v01, float v10, float v11)

Vector2 operator* (const Vector2 &v) const

Matrix2 inverse () const

Matrix2 transpose () const

float determinant () const

Matrix2 operator* (float f) const

Matrix2 operator/ (float f) const

float * operator[] (int i)

const float * operator[] (int i) const

operator float * ()

operator const float * () const

Static Public Member Functions

static Matrix2 identity ()

Private Attributes

float data [2][2]

Constructor & Destructor Documentation

 G3D::Matrix2::Matrix2 ( )
inline
17  {
18  data[0][0] = 1.0f; data[0][1] = 0.0f;
19  data[1][0] = 0.0f; data[1][1] = 1.0f;
20  }
float data[2][2]
Definition: Matrix2.h:13

Here is the caller graph for this function:

 G3D::Matrix2::Matrix2 ( float v00, float v01, float v10, float v11 )
inline
22  {
23  data[0][0] = v00; data[0][1] = v01;
24  data[1][0] = v10; data[1][1] = v11;
25  }
float data[2][2]
Definition: Matrix2.h:13

Member Function Documentation

 float G3D::Matrix2::determinant ( ) const
inline
46  {
47  return data[0][0] * data[1][1] - data[0][1] * data[1][0];
48  }
float data[2][2]
Definition: Matrix2.h:13

Here is the caller graph for this function:

 static Matrix2 G3D::Matrix2::identity ( )
inlinestatic
27  {
28  return Matrix2(1.0f, 0.0f, 0.0f, 1.0f);
29  }
Matrix2()
Definition: Matrix2.h:17

Here is the call graph for this function:

 Matrix2 G3D::Matrix2::inverse ( ) const
inline
36  {
37  return Matrix2(data[1][1], -data[0][1],
38  -data[1][0], data[0][0]) * (1.0f / determinant());
39  }
float determinant() const
Definition: Matrix2.h:46
float data[2][2]
Definition: Matrix2.h:13
Matrix2()
Definition: Matrix2.h:17

Here is the call graph for this function:

 G3D::Matrix2::operator const float * ( ) const
inline
74  {
75  return (const float*)&data[0][0];
76  }
float data[2][2]
Definition: Matrix2.h:13
 G3D::Matrix2::operator float * ( )
inline
70  {
71  return (float*)&data[0][0];
72  }
float data[2][2]
Definition: Matrix2.h:13
 Vector2 G3D::Matrix2::operator* ( const Vector2 & v ) const
inline
31  {
32  return Vector2(data[0][0] * v[0] + data[0][1] * v[1],
33  data[1][0] * v[0] + data[1][1] * v[1]);
34  }
float data[2][2]
Definition: Matrix2.h:13
 Matrix2 G3D::Matrix2::operator* ( float f ) const
inline
50  {
51  return Matrix2(data[0][0] * f, data[0][1] * f,
52  data[1][0] * f, data[1][1] * f);
53  }
float data[2][2]
Definition: Matrix2.h:13
Matrix2()
Definition: Matrix2.h:17

Here is the call graph for this function:

 Matrix2 G3D::Matrix2::operator/ ( float f ) const
inline
55  {
56  return Matrix2(data[0][0] / f, data[0][1] / f,
57  data[1][0] / f, data[1][1] / f);
58  }
float data[2][2]
Definition: Matrix2.h:13
Matrix2()
Definition: Matrix2.h:17

Here is the call graph for this function:

 float* G3D::Matrix2::operator[] ( int i )
inline
60  {
61  debugAssert(i >= 0 && i <= 1);
62  return (float*)&data[i][0];
63  }
float data[2][2]
Definition: Matrix2.h:13
#define debugAssert(exp)
Definition: debugAssert.h:160
 const float* G3D::Matrix2::operator[] ( int i ) const
inline
65  {
66  debugAssert(i >= 0 && i <= 1);
67  return (const float*)&data[i][0];
68  }
float data[2][2]
Definition: Matrix2.h:13
#define debugAssert(exp)
Definition: debugAssert.h:160
 Matrix2 G3D::Matrix2::transpose ( ) const
inline
41  {
42  return Matrix2(data[0][0], data[1][0],
43  data[0][1], data[1][1]);
44  }
float data[2][2]
Definition: Matrix2.h:13
Matrix2()
Definition: Matrix2.h:17

Here is the call graph for this function:

Member Data Documentation

 float G3D::Matrix2::data[2][2]
private

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