EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Ga::GaMat3x3 Class Reference

#include "GaTypes.h"

Public Member Functions

GaExpInl GaMat3x3 ()
 
GaExpInl GaMat3x3 (const GaFloat *v)
 
GaExpInl GaMat3x3 (GaFloat m00, GaFloat m01, GaFloat m02, GaFloat m10, GaFloat m11, GaFloat m12, GaFloat m20, GaFloat m21, GaFloat m22)
 
GaExpInl GaMat3x3 (const GaQuat &q)
 
GaExpInl GaFloatoperator[] (GaUint i)
 
const GaExpInl GaFloat *const operator[] (GaUint i) const
 

Public Attributes

GaFloat m [3][3]
 

Detailed Description

Definition at line 270 of file GaTypes.h.

Constructor & Destructor Documentation

GaExpInl Ga::GaMat3x3::GaMat3x3 ( )
inline

Definition at line 273 of file GaTypes.h.

273 {}
GaExpInl Ga::GaMat3x3::GaMat3x3 ( const GaFloat v)
inline

Definition at line 275 of file GaTypes.h.

276  {
277  m[0][0] = v[0]; m[0][1] = v[1]; m[0][2] = v[2];
278  m[1][0] = v[3]; m[1][1] = v[4]; m[1][2] = v[5];
279  m[2][0] = v[6]; m[2][1] = v[7]; m[2][2] = v[8];
280  }
GaFloat m[3][3]
Definition: GaTypes.h:329
GaExpInl Ga::GaMat3x3::GaMat3x3 ( GaFloat  m00,
GaFloat  m01,
GaFloat  m02,
GaFloat  m10,
GaFloat  m11,
GaFloat  m12,
GaFloat  m20,
GaFloat  m21,
GaFloat  m22 
)
inline

Definition at line 282 of file GaTypes.h.

285  {
286  m[0][0] = m00; m[0][1] = m01; m[0][2] = m02;
287  m[1][0] = m10; m[1][1] = m11; m[1][2] = m12;
288  m[2][0] = m20; m[2][1] = m21; m[2][2] = m22;
289  }
GaFloat m[3][3]
Definition: GaTypes.h:329
GaExpInl Ga::GaMat3x3::GaMat3x3 ( const GaQuat q)
inline

Definition at line 291 of file GaTypes.h.

References Ga::GaQuat::v, Ga::GaQuat::w, Ga::GaVec3::x, Ga::GaVec3::y, and Ga::GaVec3::z.

292  {
293  GaFloat fTx = 2.0*q.v.x;
294  GaFloat fTy = 2.0*q.v.y;
295  GaFloat fTz = 2.0*q.v.z;
296  GaFloat fTwx = fTx*q.w;
297  GaFloat fTwy = fTy*q.w;
298  GaFloat fTwz = fTz*q.w;
299  GaFloat fTxx = fTx*q.v.x;
300  GaFloat fTxy = fTy*q.v.x;
301  GaFloat fTxz = fTz*q.v.x;
302  GaFloat fTyy = fTy*q.v.y;
303  GaFloat fTyz = fTz*q.v.y;
304  GaFloat fTzz = fTz*q.v.z;
305 
306  m[0][0] = 1.0-(fTyy+fTzz);
307  m[0][1] = fTxy-fTwz;
308  m[0][2] = fTxz+fTwy;
309  m[1][0] = fTxy+fTwz;
310  m[1][1] = 1.0-(fTxx+fTzz);
311  m[1][2] = fTyz-fTwx;
312  m[2][0] = fTxz-fTwy;
313  m[2][1] = fTyz+fTwx;
314  m[2][2] = 1.0-(fTxx+fTyy);
315  }
GaFloat m[3][3]
Definition: GaTypes.h:329
double GaFloat
Definition: GaPreReqs.h:69

Member Function Documentation

GaExpInl GaFloat* Ga::GaMat3x3::operator[] ( GaUint  i)
inline

Definition at line 317 of file GaTypes.h.

318  {
319  assert(i < 3 && "GaMat3x3: subscript out of range");
320  return m[i];
321  }
GaFloat m[3][3]
Definition: GaTypes.h:329
const GaExpInl GaFloat* const Ga::GaMat3x3::operator[] ( GaUint  i) const
inline

Definition at line 323 of file GaTypes.h.

324  {
325  assert(i < 3 && "GaMat3x3: subscript out of range");
326  return m[i];
327  }
GaFloat m[3][3]
Definition: GaTypes.h:329

Member Data Documentation

GaFloat Ga::GaMat3x3::m[3][3]

Definition at line 329 of file GaTypes.h.


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