44 GaVec3(
const Parameter &oth);
58 return GaVec3(x * s,
y * s,z * s);
63 return GaVec3(x / s,
y / s,z / s);
82 return (x != oth.
x) || (
y != oth.
y) || (z != oth.
z);
87 return (x == oth.
x) && (
y == oth.
y) && (z == oth.
z);
144 (
y * oth.
z) - (oth.
y * z),
145 (z * oth.
x) - (oth.
z * x),
146 (x * oth.
y) - (oth.
x *
y)
152 return (x * oth.
x +
y * oth.
y + z * oth.
z);
178 GaFloat angle(
float ax,
float ay,
float bx,
float by);
182 return acos(this->dotProduct(oth)/(this->length()*oth.
length()));
189 return ((x == 0.0f) and (
y == 0.0f) and (z == 0.0f));
192 return ((x != 0.0f) or (
y != 0.0f) or (z != 0.0f));
195 return (isnan(x) or isnan(
y) or isnan(z));
198 return (isinf(x) or isinf(
y) or isinf(z));
202 GaVec3 &operator=(
const Parameter &oth);
239 return GaVec3(vec.
x + uv.
x + uuv.
x,vec.
y + uv.
y + uuv.
y,vec.
z + uv.
z + uuv.
z);
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
261 GaQuat &operator=(
const Parameter &oth);
262 GaQuat(
const Parameter &oth);
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];
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;
306 m[0][0] = 1.0-(fTyy+fTzz);
310 m[1][1] = 1.0-(fTxx+fTzz);
314 m[2][2] = 1.0-(fTxx+fTyy);
319 assert(i < 3 &&
"GaMat3x3: subscript out of range");
325 assert(i < 3 &&
"GaMat3x3: subscript out of range");
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];
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;
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;
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];
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];
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];
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];
395 assert(i < 4 &&
"GaMax4x4: subscript out of range");
401 assert(i < 4 &&
"GaMax4x4: subscript out of range");
407 GaFloat w = 1.0f / ( m[3][0] * v.
x + m[3][1] * v.
y + m[3][2] * v.
z + m[3][3] );
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 );
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];
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]
GaExpInl GaMat3x3(const GaFloat *v)
GaExpInl GaFloat dotProduct(const GaVec3 &oth) const
GaExpInl bool isNotZero() const
GaExpInl GaFloat length() const
itemID[count] Create count or of the specified() x() y(z)-Jump to the specified position in space.Stopped." ) COMMAND( translocate
GaExpInl GaVec3 & operator-=(const GaVec3 &oth)
GaExpInl GaVec3(const GaFloat *v)
GaExpInl GaVec3 operator/(const GaFloat c, const GaVec3 &v1)
GaException(const char *msg)
GaExpInl GaVec3 & operator*=(GaFloat f)
GaExpInl GaVec3 crossProduct(const GaVec3 &oth) const
static const GaExport GaFloat GaEpsilon
GaExpInl GaVec3(GaFloat v)
GaExpInl GaQuat(GaFloat W, const GaVec3 &V)
GaExpInl bool isNaN() const
const std::string & Description()
GaExpInl GaVec3 & operator+=(const GaVec3 &oth)
GaExpInl GaRadian(GaFloat a)
GaException(const std::string &msg)
GaExpInl void toFloatMatrix(float *o)
GaExpInl GaVec3 operator*(const GaVec3 &v) const
GaExpInl GaMat3x3(const GaQuat &q)
GaExpInl GaQuat(GaFloat W, GaFloat X, GaFloat Y, GaFloat Z)
GaExpInl GaVec3(GaFloat X, GaFloat Y, GaFloat Z)
GaExpInl GaFloat lengthSquared() const
GaExpInl bool operator!=(const GaVec3 &oth) const
GaExpInl GaVec3 & operator*=(const GaVec3 &oth)
GaExpInl GaFloat normalize()
GaExpInl GaFloat angle(const Ga::GaVec3 oth) const
GaExpInl bool operator==(const GaVec3 &oth) const
GaExpInl GaVec3 operator*(const GaVec3 &vec) const
GaExpInl GaVec3 operator+(const GaVec3 &oth) const
GaExpInl GaVec3 operator*(GaFloat s) const
GaExpInl GaDegree(GaFloat a)
GaExpInl GaVec3 & operator/=(GaFloat f)
GaExpInl GaMat4x4 operator*(const GaMat4x4 &oth) const
static GaFloat squareRoot(GaFloat f)
GaExpInl GaFloat * operator[](GaUint i)
GaExpInl GaMat4x4(const GaFloat *v)
GaExpInl bool isInf() const
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)
static const GaExport GaFloat GaDegreesInRadian
GaExpInl GaQuat operator*(const GaQuat &oth) const
GaExpInl GaVec3 operator/(GaFloat s) const
const GaExpInl GaFloat *const operator[](GaUint i) const
GaExpInl GaMat4x4 operator*(GaFloat s)
GaExpInl GaVec3 & operator=(const GaVec3 &oth)
GaExpInl GaQuat & operator=(const GaQuat &oth)
GaExpInl bool isZero() const
GaExpInl GaMat4x4(const GaVec3 &p, const GaQuat &q)
GaExpInl GaRadian(const GaDegree &a)
GaExpInl GaVec3(const GaVec3 &oth)
GaExpInl const GaFloat *const operator[](GaUint i) const
GaExpInl GaFloat distance(const GaVec3 &oth) const
GaExpInl GaVec3 operator*(const GaVec3 &oth) const
GaExpInl GaFloat * operator[](GaUint i)
GaExpInl GaVec3 operator-(const GaVec3 &oth) const
GaExpInl GaMat3x3(GaFloat m00, GaFloat m01, GaFloat m02, GaFloat m10, GaFloat m11, GaFloat m12, GaFloat m20, GaFloat m21, GaFloat m22)
GaExpInl GaVec3 operator*(const GaFloat c, const GaVec3 &v1)