EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GaTypes.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Gangsta Wrapper physics SDK abstraction library suite.
3  * Copyright (C) 2005 Ed Jones (Green Eyed Monster)
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * See also the files README.txt and LICENSE.txt in the root directory of this module.
20  */
21 #ifndef GATYPES_H
22 #define GATYPES_H
23 
24 #include "GaMath.h"
25 
26 namespace Ga
27 {
28  class GaException {
29  public:
31  GaException(const char *msg) { m_msg = msg; }
32  GaException(const std::string &msg) { m_msg = msg; }
33  const std::string &Description() { return m_msg; }
34  private:
35  std::string m_msg;
36  };
37 
38  class GaQuat;
39 
41  {
42  public:
43 
44  GaVec3(const Parameter &oth);
45  GaExpInl GaVec3():x(0.0f),y(0.0f),z(0.0f){}
46  GaExpInl GaVec3(GaFloat v):x(v),y(v),z(v){}
47  GaExpInl GaVec3(const GaFloat *v):x(v[0]),y(v[1]),z(v[2]){}
48  GaExpInl GaVec3(GaFloat X,GaFloat Y,GaFloat Z):x(X),y(Y),z(Z){}
49  GaExpInl GaVec3(const GaVec3& oth):x(oth.x),y(oth.y),z(oth.z){}
50 
51  GaExpInl GaVec3 operator-(const GaVec3 &oth) const
52  {
53  return GaVec3(x - oth.x,y - oth.y,z - oth.z);
54  }
55 
57  {
58  return GaVec3(x * s,y * s,z * s);
59  }
60 
62  {
63  return GaVec3(x / s,y / s,z / s);
64  }
65 
66  GaExpInl GaVec3 operator*(const GaVec3 &oth) const
67  {
68  return GaVec3(x * oth.x,y * oth.y,z * oth.z);
69  }
70 
72  {
73  x = oth.x;
74  y = oth.y;
75  z = oth.z;
76 
77  return *this;
78  }
79 
80  GaExpInl bool operator!=(const GaVec3& oth) const
81  {
82  return (x != oth.x) || (y != oth.y) || (z != oth.z);
83  }
84 
85  GaExpInl bool operator==(const GaVec3& oth) const
86  {
87  return (x == oth.x) && (y == oth.y) && (z == oth.z);
88  }
89 
90  GaExpInl GaVec3 operator+(const GaVec3 &oth) const
91  {
92  return GaVec3(x + oth.x,y + oth.y,z + oth.z);
93  }
94 
96  {
97  x += oth.x;
98  y += oth.y;
99  z += oth.z;
100 
101  return *this;
102  }
103 
105  {
106  x -= oth.x;
107  y -= oth.y;
108  z -= oth.z;
109 
110  return *this;
111  }
112 
114  {
115  x *= f;
116  y *= f;
117  z *= f;
118 
119  return *this;
120  }
121 
123  {
124  x /= f;
125  y /= f;
126  z /= f;
127 
128  return *this;
129  }
130 
132  {
133  x *= oth.x;
134  y *= oth.y;
135  z *= oth.z;
136 
137  return *this;
138  }
139 
140  GaExpInl GaVec3 crossProduct(const GaVec3 &oth) const
141  {
142  return GaVec3
143  (
144  (y * oth.z) - (oth.y * z),
145  (z * oth.x) - (oth.z * x),
146  (x * oth.y) - (oth.x * y)
147  );
148  }
149 
150  GaExpInl GaFloat dotProduct(const GaVec3 &oth) const
151  {
152  return (x * oth.x + y * oth.y + z * oth.z);
153  }
154 
155  GaExpInl GaFloat lengthSquared() const {return (x * x) + (y * y) + (z * z);}
156  GaExpInl GaFloat length() const {return Math::squareRoot(lengthSquared());}
157 
158  GaExpInl GaFloat distance(const GaVec3& oth) const
159  {
160  return Math::squareRoot( pow((oth.x - x), 2) + pow((oth.y - y), 2) + pow((oth.z - z), 2) );
161  }
162 
164  {
165  GaFloat len = length();
166  if(len > Math::GaEpsilon)
167  {
168  GaFloat inv = 1.0 / len;
169 
170  x *= inv;
171  y *= inv;
172  z *= inv;
173  }
174  return(len); //just in case they want it
175  }
176 
177  // angle in degrees
178  GaFloat angle(float ax, float ay, float bx, float by);
179  // angle between 2 vectors in degrees
180  GaExpInl GaFloat angle(const Ga::GaVec3 oth) const
181  {
182  return acos(this->dotProduct(oth)/(this->length()*oth.length()));
183  }
184 
185  GaVec3 slerp(Ga::GaVec3 v0, Ga::GaVec3 v1, double t);
186 
187  //optimized checks for a very common case
188  GaExpInl bool isZero() const {
189  return ((x == 0.0f) and (y == 0.0f) and (z == 0.0f));
190  }
191  GaExpInl bool isNotZero() const {
192  return ((x != 0.0f) or (y != 0.0f) or (z != 0.0f));
193  }
194  GaExpInl bool isNaN() const {
195  return (isnan(x) or isnan(y) or isnan(z));
196  }
197  GaExpInl bool isInf() const {
198  return (isinf(x) or isinf(y) or isinf(z));
199  }
200  GaVec3 rotationTo(const Ga::GaVec3& pos) const;
201 
202  GaVec3 &operator=(const Parameter &oth);
203 
204  //GaVec3 rotByQuat(GaVec3 v, GaQuat q);
205  //GaVec3 angleRot(GaVec3 from, GaVec3 to, double angle);
206 
208  };
209 
210  //commutative.
211  GaExpInl GaVec3 operator*(const GaFloat c, const GaVec3 &v1) {
212  return(v1 * c);
213  }
214  GaExpInl GaVec3 operator/(const GaFloat c, const GaVec3 &v1) {
215  return(v1 / c);
216  }
217 
219  {
220  public:
221  static GaQuat IDENTITY;
222  static GaQuat ZERO;
223 
224  GaExpInl GaQuat():w(0),v(0,0,0){}
225  GaExpInl GaQuat(GaFloat W,const GaVec3 &V):w(W),v(V){}
226  GaExpInl GaQuat(GaFloat W,GaFloat X,GaFloat Y,GaFloat Z):w(W),v(X,Y,Z){}
227 
228  GaQuat(const GaRadian &a,const GaVec3 &axis);
229  GaQuat(const GaMat3x3 &rot);
230 
231  GaExpInl GaVec3 operator*(const GaVec3 &vec) const
232  {
233  GaVec3 uv = v.crossProduct(vec);
234  GaVec3 uuv = v.crossProduct(uv);
235 
236  uv *= (2.0f * w);
237  uuv *= 2.0f;
238 
239  return GaVec3(vec.x + uv.x + uuv.x,vec.y + uv.y + uuv.y,vec.z + uv.z + uuv.z);
240  }
241 
242  GaExpInl GaQuat operator*(const GaQuat &oth) const
243  {
244  return GaQuat
245  (
246  w * oth.w - v.x * oth.v.x - v.y * oth.v.y - v.z * oth.v.z,
247  w * oth.v.x + v.x * oth.w + v.y * oth.v.z - v.z * oth.v.y,
248  w * oth.v.y + v.y * oth.w + v.z * oth.v.x - v.x * oth.v.z,
249  w * oth.v.z + v.z * oth.w + v.x * oth.v.y - v.y * oth.v.x
250  );
251  }
252 
254  {
255  w = oth.w;
256  v = oth.v;
257 
258  return *this;
259  }
260 
261  GaQuat &operator=(const Parameter &oth);
262  GaQuat(const Parameter &oth);
263 
264  GaQuat inverse() const;
265 
268  };
269 
271  {
272  public:
274 
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  }
281 
283  GaFloat m10,GaFloat m11,GaFloat m12,
284  GaFloat m20,GaFloat m21,GaFloat m22)
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  }
290 
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  }
316 
318  {
319  assert(i < 3 && "GaMat3x3: subscript out of range");
320  return m[i];
321  }
322 
323  const GaExpInl GaFloat *const operator[](GaUint i) const
324  {
325  assert(i < 3 && "GaMat3x3: subscript out of range");
326  return m[i];
327  }
328 
329  GaFloat m[3][3];
330  };
331 
333  {
334  public:
336 
338  {
339  m[0][0] = v[ 0]; m[0][1] = v[ 1]; m[0][2] = v[ 2]; m[0][3] = v[ 3];
340  m[1][0] = v[ 4]; m[1][1] = v[ 5]; m[1][2] = v[ 6]; m[1][3] = v[ 7];
341  m[2][0] = v[ 8]; m[2][1] = v[ 9]; m[2][2] = v[10]; m[2][3] = v[11];
342  m[3][0] = v[12]; m[3][1] = v[13]; m[3][2] = v[14]; m[3][3] = v[15];
343  }
344 
346  GaFloat m10,GaFloat m11,GaFloat m12,GaFloat m13,
347  GaFloat m20,GaFloat m21,GaFloat m22,GaFloat m23,
348  GaFloat m30,GaFloat m31,GaFloat m32,GaFloat m33)
349  {
350  m[0][0] = m00; m[0][1] = m01; m[0][2] = m02; m[0][3] = m03;
351  m[1][0] = m10; m[1][1] = m11; m[1][2] = m12; m[1][3] = m13;
352  m[2][0] = m20; m[2][1] = m21; m[2][2] = m22; m[2][3] = m23;
353  m[3][0] = m30; m[3][1] = m31; m[3][2] = m32; m[3][3] = m33;
354  }
355 
356  GaExpInl GaMat4x4(const GaVec3 &p,const GaQuat &q)
357  {
358  GaMat3x3 rot(q);
359 
360  m[0][0] = rot[0][0]; m[0][1] = rot[0][1]; m[0][2] = rot[0][2]; m[0][3] = p.x;
361  m[1][0] = rot[1][0]; m[1][1] = rot[1][1]; m[1][2] = rot[1][2]; m[1][3] = p.y;
362  m[2][0] = rot[2][0]; m[2][1] = rot[2][1]; m[2][2] = rot[2][2]; m[2][3] = p.z;
363  m[3][0] = 0.0; m[3][1] = 0.0; m[3][2] = 0.0; m[3][3] = 1.0;
364  }
365 
367  {
368  GaMat4x4 o;
369 
370  o.m[0][0] = m[0][0] * oth.m[0][0] + m[0][1] * oth.m[1][0] + m[0][2] * oth.m[2][0] + m[0][3] * oth.m[3][0];
371  o.m[0][1] = m[0][0] * oth.m[0][1] + m[0][1] * oth.m[1][1] + m[0][2] * oth.m[2][1] + m[0][3] * oth.m[3][1];
372  o.m[0][2] = m[0][0] * oth.m[0][2] + m[0][1] * oth.m[1][2] + m[0][2] * oth.m[2][2] + m[0][3] * oth.m[3][2];
373  o.m[0][3] = m[0][0] * oth.m[0][3] + m[0][1] * oth.m[1][3] + m[0][2] * oth.m[2][3] + m[0][3] * oth.m[3][3];
374 
375  o.m[1][0] = m[1][0] * oth.m[0][0] + m[1][1] * oth.m[1][0] + m[1][2] * oth.m[2][0] + m[1][3] * oth.m[3][0];
376  o.m[1][1] = m[1][0] * oth.m[0][1] + m[1][1] * oth.m[1][1] + m[1][2] * oth.m[2][1] + m[1][3] * oth.m[3][1];
377  o.m[1][2] = m[1][0] * oth.m[0][2] + m[1][1] * oth.m[1][2] + m[1][2] * oth.m[2][2] + m[1][3] * oth.m[3][2];
378  o.m[1][3] = m[1][0] * oth.m[0][3] + m[1][1] * oth.m[1][3] + m[1][2] * oth.m[2][3] + m[1][3] * oth.m[3][3];
379 
380  o.m[2][0] = m[2][0] * oth.m[0][0] + m[2][1] * oth.m[1][0] + m[2][2] * oth.m[2][0] + m[2][3] * oth.m[3][0];
381  o.m[2][1] = m[2][0] * oth.m[0][1] + m[2][1] * oth.m[1][1] + m[2][2] * oth.m[2][1] + m[2][3] * oth.m[3][1];
382  o.m[2][2] = m[2][0] * oth.m[0][2] + m[2][1] * oth.m[1][2] + m[2][2] * oth.m[2][2] + m[2][3] * oth.m[3][2];
383  o.m[2][3] = m[2][0] * oth.m[0][3] + m[2][1] * oth.m[1][3] + m[2][2] * oth.m[2][3] + m[2][3] * oth.m[3][3];
384 
385  o.m[3][0] = m[3][0] * oth.m[0][0] + m[3][1] * oth.m[1][0] + m[3][2] * oth.m[2][0] + m[3][3] * oth.m[3][0];
386  o.m[3][1] = m[3][0] * oth.m[0][1] + m[3][1] * oth.m[1][1] + m[3][2] * oth.m[2][1] + m[3][3] * oth.m[3][1];
387  o.m[3][2] = m[3][0] * oth.m[0][2] + m[3][1] * oth.m[1][2] + m[3][2] * oth.m[2][2] + m[3][3] * oth.m[3][2];
388  o.m[3][3] = m[3][0] * oth.m[0][3] + m[3][1] * oth.m[1][3] + m[3][2] * oth.m[2][3] + m[3][3] * oth.m[3][3];
389 
390  return o;
391  }
392 
394  {
395  assert(i < 4 && "GaMax4x4: subscript out of range");
396  return m[i];
397  }
398 
399  GaExpInl const GaFloat *const operator[](GaUint i) const
400  {
401  assert(i < 4 && "GaMax4x4: subscript out of range");
402  return m[i];
403  }
404 
405  GaExpInl GaVec3 operator*(const GaVec3 &v) const
406  {
407  GaFloat w = 1.0f / ( m[3][0] * v.x + m[3][1] * v.y + m[3][2] * v.z + m[3][3] );
408 
409  GaVec3 r(
410  ( m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z + m[0][3] ) * w,
411  ( m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z + m[1][3] ) * w,
412  ( m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z + m[2][3] ) * w );
413 
414  return r;
415  }
416 
417  GaExpInl void toFloatMatrix(float *o)
418  {
419  o[0] = m[0][0]; o[4] = m[0][1]; o[8] = m[0][2]; o[12] = m[0][3];
420  o[1] = m[1][0]; o[5] = m[1][1]; o[9] = m[1][2]; o[13] = m[1][3];
421  o[2] = m[2][0]; o[6] = m[2][1]; o[10] = m[2][2]; o[14] = m[2][3];
422  o[3] = m[3][0]; o[7] = m[3][1]; o[11] = m[3][2]; o[15] = m[3][3];
423  }
424 
426  {
427  return GaMat4x4
428  (
429  s*m[0][0], s*m[0][1], s*m[0][2], s*m[0][3],
430  s*m[1][0], s*m[1][1], s*m[1][2], s*m[1][3],
431  s*m[2][0], s*m[2][1], s*m[2][2], s*m[2][3],
432  s*m[3][0], s*m[3][1], s*m[3][2], s*m[3][3]
433  );
434  }
435 
436  GaMat4x4 inverse() const;
437  GaMat4x4 adjoint() const;
438  GaFloat determinant() const;
439 
440  GaFloat m[4][4];
441  };
442 
444  {
445  public:
446  GaExpInl GaDegree() { d = 0; }
447  GaExpInl GaDegree(GaFloat a) { d = a; }
448  GaDegree(const GaRadian &a);
449 
451  };
452 
454  {
455  public:
456  GaExpInl GaRadian() { r = 0; }
457  GaExpInl GaRadian(GaFloat a) { r = a; }
459 
461  };
462 }
463 
464 #endif
GaVec3 v
Definition: GaTypes.h:267
GaExpInl GaMat3x3(const GaFloat *v)
Definition: GaTypes.h:275
GaExpInl GaFloat dotProduct(const GaVec3 &oth) const
Definition: GaTypes.h:150
GaExpInl bool isNotZero() const
Definition: GaTypes.h:191
static GaQuat IDENTITY
Definition: GaTypes.h:221
GaFloat m[4][4]
Definition: GaTypes.h:440
GaExpInl GaRadian()
Definition: GaTypes.h:456
GaExpInl GaFloat length() const
Definition: GaTypes.h:156
itemID[count] Create count or of the specified() x() y(z)-Jump to the specified position in space.Stopped." ) COMMAND( translocate
unsigned int GaUint
Definition: GaPreReqs.h:66
GaExpInl GaVec3 & operator-=(const GaVec3 &oth)
Definition: GaTypes.h:104
GaExpInl GaVec3(const GaFloat *v)
Definition: GaTypes.h:47
GaExpInl GaVec3 operator/(const GaFloat c, const GaVec3 &v1)
Definition: GaTypes.h:214
GaException(const char *msg)
Definition: GaTypes.h:31
GaExpInl GaVec3 & operator*=(GaFloat f)
Definition: GaTypes.h:113
GaExpInl GaVec3 crossProduct(const GaVec3 &oth) const
Definition: GaTypes.h:140
static const GaExport GaFloat GaEpsilon
Definition: GaMath.h:34
Definition: GaMath.h:26
GaExpInl GaVec3(GaFloat v)
Definition: GaTypes.h:46
GaExpInl GaQuat(GaFloat W, const GaVec3 &V)
Definition: GaTypes.h:225
GaExpInl bool isNaN() const
Definition: GaTypes.h:194
const std::string & Description()
Definition: GaTypes.h:33
GaExpInl GaVec3 & operator+=(const GaVec3 &oth)
Definition: GaTypes.h:95
GaExpInl GaRadian(GaFloat a)
Definition: GaTypes.h:457
GaFloat d
Definition: GaTypes.h:450
GaException(const std::string &msg)
Definition: GaTypes.h:32
GaExpInl void toFloatMatrix(float *o)
Definition: GaTypes.h:417
GaExpInl GaVec3 operator*(const GaVec3 &v) const
Definition: GaTypes.h:405
GaExpInl GaMat3x3(const GaQuat &q)
Definition: GaTypes.h:291
GaExpInl GaQuat(GaFloat W, GaFloat X, GaFloat Y, GaFloat Z)
Definition: GaTypes.h:226
GaExpInl GaVec3(GaFloat X, GaFloat Y, GaFloat Z)
Definition: GaTypes.h:48
GaFloat x
Definition: GaTypes.h:207
GaExpInl GaFloat lengthSquared() const
Definition: GaTypes.h:155
GaExpInl bool operator!=(const GaVec3 &oth) const
Definition: GaTypes.h:80
GaExpInl GaVec3 & operator*=(const GaVec3 &oth)
Definition: GaTypes.h:131
GaExpInl GaFloat normalize()
Definition: GaTypes.h:163
GaExpInl GaMat3x3()
Definition: GaTypes.h:273
GaExpInl GaFloat angle(const Ga::GaVec3 oth) const
Definition: GaTypes.h:180
GaExpInl bool operator==(const GaVec3 &oth) const
Definition: GaTypes.h:85
GaExpInl GaDegree()
Definition: GaTypes.h:446
GaExpInl GaVec3 operator*(const GaVec3 &vec) const
Definition: GaTypes.h:231
GaExpInl GaVec3 operator+(const GaVec3 &oth) const
Definition: GaTypes.h:90
GaExpInl GaVec3 operator*(GaFloat s) const
Definition: GaTypes.h:56
GaExpInl GaDegree(GaFloat a)
Definition: GaTypes.h:447
GaExpInl GaVec3 & operator/=(GaFloat f)
Definition: GaTypes.h:122
GaExpInl GaMat4x4 operator*(const GaMat4x4 &oth) const
Definition: GaTypes.h:366
static GaQuat ZERO
Definition: GaTypes.h:222
static GaFloat squareRoot(GaFloat f)
Definition: GaMath.h:39
GaExpInl GaFloat * operator[](GaUint i)
Definition: GaTypes.h:317
GaExpInl GaMat4x4(const GaFloat *v)
Definition: GaTypes.h:337
GaExpInl bool isInf() const
Definition: GaTypes.h:197
#define GaExpInl
Definition: GaPreReqs.h:63
GaExpInl GaMat4x4(GaFloat m00, GaFloat m01, GaFloat m02, GaFloat m03, GaFloat m10, GaFloat m11, GaFloat m12, GaFloat m13, GaFloat m20, GaFloat m21, GaFloat m22, GaFloat m23, GaFloat m30, GaFloat m31, GaFloat m32, GaFloat m33)
Definition: GaTypes.h:345
GaExpInl GaQuat()
Definition: GaTypes.h:224
static const GaExport GaFloat GaDegreesInRadian
Definition: GaMath.h:32
GaFloat w
Definition: GaTypes.h:266
GaExpInl GaMat4x4()
Definition: GaTypes.h:335
GaExpInl GaQuat operator*(const GaQuat &oth) const
Definition: GaTypes.h:242
GaExpInl GaVec3 operator/(GaFloat s) const
Definition: GaTypes.h:61
GaFloat y
Definition: GaTypes.h:207
const GaExpInl GaFloat *const operator[](GaUint i) const
Definition: GaTypes.h:323
std::string m_msg
Definition: GaTypes.h:35
GaFloat r
Definition: GaTypes.h:460
GaExpInl GaMat4x4 operator*(GaFloat s)
Definition: GaTypes.h:425
GaExpInl GaVec3 & operator=(const GaVec3 &oth)
Definition: GaTypes.h:71
GaExpInl GaQuat & operator=(const GaQuat &oth)
Definition: GaTypes.h:253
GaExpInl bool isZero() const
Definition: GaTypes.h:188
GaExpInl GaMat4x4(const GaVec3 &p, const GaQuat &q)
Definition: GaTypes.h:356
GaExpInl GaVec3()
Definition: GaTypes.h:45
GaExpInl GaRadian(const GaDegree &a)
Definition: GaTypes.h:458
GaExpInl GaVec3(const GaVec3 &oth)
Definition: GaTypes.h:49
double GaFloat
Definition: GaPreReqs.h:69
GaExpInl const GaFloat *const operator[](GaUint i) const
Definition: GaTypes.h:399
GaExpInl GaFloat distance(const GaVec3 &oth) const
Definition: GaTypes.h:158
GaExpInl GaVec3 operator*(const GaVec3 &oth) const
Definition: GaTypes.h:66
GaExpInl GaFloat * operator[](GaUint i)
Definition: GaTypes.h:393
GaExpInl GaVec3 operator-(const GaVec3 &oth) const
Definition: GaTypes.h:51
GaExpInl GaMat3x3(GaFloat m00, GaFloat m01, GaFloat m02, GaFloat m10, GaFloat m11, GaFloat m12, GaFloat m20, GaFloat m21, GaFloat m22)
Definition: GaTypes.h:282
GaFloat z
Definition: GaTypes.h:207
#define GaExport
Definition: GaPreReqs.h:57
GaExpInl GaVec3 operator*(const GaFloat c, const GaVec3 &v1)
Definition: GaTypes.h:211