SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
WAI Namespace Reference

WAI : Where Am I: Collection of duplicate structs for vectors. More...

Classes

struct  V2
 
struct  V3
 
struct  M3x3
 
struct  M4x4
 
class  ModeOrbSlam2
 

Enumerations

enum  TrackingState { TrackingState_None , TrackingState_Idle , TrackingState_Initializing , TrackingState_TrackingOK , TrackingState_TrackingLost }
 

Functions

V3 v3 (float x, float y, float z)
 
V3 subV3 (V3 v1, V3 v2)
 
M3x3 identityM3x3 ()
 
M3x3 multM3x3 (M3x3 m1, M3x3 m2)
 
V3 multM3x3V3 (M3x3 m, V3 v)
 
M3x3 rotateXM3x3 (float theta)
 

Detailed Description

WAI : Where Am I: Collection of duplicate structs for vectors.

Enumeration Type Documentation

◆ TrackingState

Enumerator
TrackingState_None 
TrackingState_Idle 
TrackingState_Initializing 
TrackingState_TrackingOK 
TrackingState_TrackingLost 

Definition at line 26 of file WAIModeOrbSlam2.h.

27 {
33 };
@ TrackingState_Initializing
@ TrackingState_Idle
@ TrackingState_TrackingOK
@ TrackingState_None
@ TrackingState_TrackingLost

Function Documentation

◆ identityM3x3()

M3x3 WAI::identityM3x3 ( )
inline

Definition at line 65 of file WAIMath.h.

66 {
67  M3x3 result;
68 
69  for (int i = 0; i < 3; i++)
70  {
71  for (int j = 0; j < 3; j++)
72  {
73  if (i == j)
74  {
75  result.e[i][j] = 1.0f;
76  }
77  else
78  {
79  result.e[i][j] = 0.0f;
80  }
81  }
82  }
83 
84  return result;
85 }

◆ multM3x3()

M3x3 WAI::multM3x3 ( M3x3  m1,
M3x3  m2 
)
inline

Definition at line 87 of file WAIMath.h.

88 {
89  M3x3 result = {};
90 
91  for (int i = 0; i < 3; i++)
92  {
93  for (int j = 0; j < 3; j++)
94  {
95  for (int k = 0; k < 3; k++)
96  {
97  float v1 = m1.e[k][j];
98  float v2 = m2.e[i][k];
99  result.e[i][j] += v1 * v2;
100  }
101  }
102  }
103 
104  return result;
105 }

◆ multM3x3V3()

V3 WAI::multM3x3V3 ( M3x3  m,
V3  v 
)
inline

Definition at line 107 of file WAIMath.h.

108 {
109  V3 result = {};
110 
111  for (int i = 0; i < 3; i++)
112  {
113  for (int j = 0; j < 3; j++)
114  {
115  result.e[i] += m.e[j][i] * v.e[j];
116  }
117  }
118 
119  return result;
120 }

◆ rotateXM3x3()

M3x3 WAI::rotateXM3x3 ( float  theta)
inline

Definition at line 122 of file WAIMath.h.

123 {
124  M3x3 result = identityM3x3();
125 
126  result.e[1][1] = cos(theta);
127  result.e[1][2] = sin(theta);
128  result.e[2][1] = -1 * sin(theta);
129  result.e[2][2] = cos(theta);
130 
131  return result;
132 }
M3x3 identityM3x3()
Definition: WAIMath.h:65

◆ subV3()

V3 WAI::subV3 ( V3  v1,
V3  v2 
)
inline

Definition at line 49 of file WAIMath.h.

50 {
51  V3 result;
52 
53  result.x = v1.x - v2.x;
54  result.y = v1.y - v2.y;
55  result.z = v1.z - v2.z;
56 
57  return result;
58 }

◆ v3()

V3 WAI::v3 ( float  x,
float  y,
float  z 
)
inline

Definition at line 38 of file WAIMath.h.

39 {
40  V3 result;
41 
42  result.x = x;
43  result.y = y;
44  result.z = z;
45 
46  return result;
47 }