TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::Vector3 Class Reference

#include <Vector3.h>

Public Types

enum  Axis { X_AXIS =0, Y_AXIS =1, Z_AXIS =2, DETECT_AXIS =-1 }
 

Public Member Functions

 Vector3 ()
 
 Vector3 (const Any &any)
 
Any toAny (const std::string &name) const
 
Any toAny () const
 
 Vector3 (const Vector4int8 &)
 
 Vector3 (const class Vector2 &v, float z)
 
 Vector3 (const class Vector3int32 &v)
 
 Vector3 (class BinaryInput &b)
 
 Vector3 (float _x, float _y, float _z)
 
 Vector3 (float coordinate[3])
 
 Vector3 (double coordinate[3])
 
 Vector3 (const class Vector3int16 &v)
 
 Vector3 (class TextInput &t)
 
 Vector3 (const class Color3 &c)
 
void serialize (class BinaryOutput &b) const
 
void deserialize (class BinaryInput &b)
 
void serialize (class TextOutput &t) const
 
void deserialize (class TextInput &t)
 
const float &__fastcall operator[] (int i) const
 
float & operator[] (int i)
 
bool nonZero () const
 
Axis primaryAxis () const
 
Vector3 &__fastcall operator= (const Vector3 &rkVector)
 
Vector3operator= (const Any &a)
 
bool operator== (const Vector3 &rkVector) const
 
bool operator!= (const Vector3 &rkVector) const
 
size_t hashCode () const
 
bool fuzzyEq (const Vector3 &other) const
 
bool fuzzyNe (const Vector3 &other) const
 
bool isFinite () const
 
bool isNaN () const
 
bool isZero () const
 
bool isUnit () const
 
Vector3 movedTowards (const Vector3 &goal, float maxTranslation) const
 
void moveTowards (const Vector3 &goal, float maxTranslation)
 
Vector3 __fastcall operator+ (const Vector3 &v) const
 
Vector3 __fastcall operator- (const Vector3 &v) const
 
Vector3 __fastcall operator* (float s) const
 
Vector3 __fastcall operator/ (float s) const
 
Vector3 __fastcall operator* (const Vector3 &v) const
 
Vector3 __fastcall operator/ (const Vector3 &v) const
 
Vector3 __fastcall operator- () const
 
Vector3 &__fastcall operator+= (const Vector3 &v)
 
Vector3 &__fastcall operator-= (const Vector3 &v)
 
Vector3 &__fastcall operator*= (float s)
 
Vector3 &__fastcall operator/= (float s)
 
Vector3 &__fastcall operator*= (const Vector3 &v)
 
Vector3 &__fastcall operator/= (const Vector3 &v)
 
float length () const
 
float magnitude () const
 
Vector3 pow (float p) const
 
Vector3 direction () const
 
Vector3 fastDirection () const
 
Vector3 reflectAbout (const Vector3 &normal) const
 
Vector3 reflectionDirection (const Vector3 &normal) const
 
Vector3 directionOrZero () const
 
Vector3 refractionDirection (const Vector3 &normal, float iInside, float iOutside) const
 
Vector3 unit () const
 
Vector3 fastUnit () const
 
float squaredLength () const
 
float squaredMagnitude () const
 
float __fastcall dot (const Vector3 &rkVector) const
 
Vector3 __fastcall cross (const Vector3 &rkVector) const
 
Vector3 unitCross (const Vector3 &rkVector) const
 
class Matrix3 cross () const
 
Vector3 __fastcall min (const Vector3 &v) const
 
Vector3 __fastcall max (const Vector3 &v) const
 
float min () const
 
float max () const
 
std::string toString () const
 
Vector3 clamp (const Vector3 &low, const Vector3 &high) const
 
Vector3 clamp (float low, float high) const
 
Vector3 floor () const
 
Vector3 round () const
 
Vector3 lerp (const Vector3 &v, float alpha) const
 
float sum () const
 
float average () const
 
void getTangents (Vector3 &X, Vector3 &Y) const
 
Vector2 xx () const
 
Vector2 yx () const
 
Vector2 zx () const
 
Vector2 xy () const
 
Vector2 yy () const
 
Vector2 zy () const
 
Vector2 xz () const
 
Vector2 yz () const
 
Vector2 zz () const
 
Vector3 xxx () const
 
Vector3 yxx () const
 
Vector3 zxx () const
 
Vector3 xyx () const
 
Vector3 yyx () const
 
Vector3 zyx () const
 
Vector3 xzx () const
 
Vector3 yzx () const
 
Vector3 zzx () const
 
Vector3 xxy () const
 
Vector3 yxy () const
 
Vector3 zxy () const
 
Vector3 xyy () const
 
Vector3 yyy () const
 
Vector3 zyy () const
 
Vector3 xzy () const
 
Vector3 yzy () const
 
Vector3 zzy () const
 
Vector3 xxz () const
 
Vector3 yxz () const
 
Vector3 zxz () const
 
Vector3 xyz () const
 
Vector3 yyz () const
 
Vector3 zyz () const
 
Vector3 xzz () const
 
Vector3 yzz () const
 
Vector3 zzz () const
 
Vector4 xxxx () const
 
Vector4 yxxx () const
 
Vector4 zxxx () const
 
Vector4 xyxx () const
 
Vector4 yyxx () const
 
Vector4 zyxx () const
 
Vector4 xzxx () const
 
Vector4 yzxx () const
 
Vector4 zzxx () const
 
Vector4 xxyx () const
 
Vector4 yxyx () const
 
Vector4 zxyx () const
 
Vector4 xyyx () const
 
Vector4 yyyx () const
 
Vector4 zyyx () const
 
Vector4 xzyx () const
 
Vector4 yzyx () const
 
Vector4 zzyx () const
 
Vector4 xxzx () const
 
Vector4 yxzx () const
 
Vector4 zxzx () const
 
Vector4 xyzx () const
 
Vector4 yyzx () const
 
Vector4 zyzx () const
 
Vector4 xzzx () const
 
Vector4 yzzx () const
 
Vector4 zzzx () const
 
Vector4 xxxy () const
 
Vector4 yxxy () const
 
Vector4 zxxy () const
 
Vector4 xyxy () const
 
Vector4 yyxy () const
 
Vector4 zyxy () const
 
Vector4 xzxy () const
 
Vector4 yzxy () const
 
Vector4 zzxy () const
 
Vector4 xxyy () const
 
Vector4 yxyy () const
 
Vector4 zxyy () const
 
Vector4 xyyy () const
 
Vector4 yyyy () const
 
Vector4 zyyy () const
 
Vector4 xzyy () const
 
Vector4 yzyy () const
 
Vector4 zzyy () const
 
Vector4 xxzy () const
 
Vector4 yxzy () const
 
Vector4 zxzy () const
 
Vector4 xyzy () const
 
Vector4 yyzy () const
 
Vector4 zyzy () const
 
Vector4 xzzy () const
 
Vector4 yzzy () const
 
Vector4 zzzy () const
 
Vector4 xxxz () const
 
Vector4 yxxz () const
 
Vector4 zxxz () const
 
Vector4 xyxz () const
 
Vector4 yyxz () const
 
Vector4 zyxz () const
 
Vector4 xzxz () const
 
Vector4 yzxz () const
 
Vector4 zzxz () const
 
Vector4 xxyz () const
 
Vector4 yxyz () const
 
Vector4 zxyz () const
 
Vector4 xyyz () const
 
Vector4 yyyz () const
 
Vector4 zyyz () const
 
Vector4 xzyz () const
 
Vector4 yzyz () const
 
Vector4 zzyz () const
 
Vector4 xxzz () const
 
Vector4 yxzz () const
 
Vector4 zxzz () const
 
Vector4 xyzz () const
 
Vector4 yyzz () const
 
Vector4 zyzz () const
 
Vector4 xzzz () const
 
Vector4 yzzz () const
 
Vector4 zzzz () const
 

Static Public Member Functions

static void orthonormalize (Vector3 akVector[3])
 
static Vector3 random (Random &r=Random::common())
 Random unit vector, uniformly distributed on the sphere. More...
 
static Vector3 cosHemiRandom (const Vector3 &n, Random &r=Random::common())
 Random unit vector, distributed according to $\max(\cos \theta,0)$. More...
 
static Vector3 cosSphereRandom (const Vector3 &n, Random &r=Random::common())
 
static Vector3 cosPowHemiRandom (const Vector3 &n, const float k, Random &r=Random::common())
 Random unit vector, distributed according to $\max(\cos^k \theta,0)$. More...
 
static Vector3 hemiRandom (const Vector3 &normal, Random &r=Random::common())
 Random vector distributed over the hemisphere about normal. More...
 
static const Vector3zero ()
 
static const Vector3one ()
 
static const Vector3unitX ()
 
static const Vector3unitY ()
 
static const Vector3unitZ ()
 
static const Vector3inf ()
 
static const Vector3nan ()
 
static const Vector3minFinite ()
 
static const Vector3maxFinite ()
 
static Vector3ignore ()
 

Public Attributes

float x
 
float y
 
float z
 

Private Member Functions

bool operator< (const Vector3 &) const
 
bool operator> (const Vector3 &) const
 
bool operator<= (const Vector3 &) const
 
bool operator>= (const Vector3 &) const
 

Detailed Description

Swizzles Vector classes have swizzle operators, e.g. v.xy(), that allow selection of arbitrary sub-fields. These cannot be used as write masks. Examples

Vector3 v(1, 2, 3);
Vector3 j;
Vector2 b;
b = v.xz();
j = b.xx();

Warning

Do not subclass– this implementation makes assumptions about the memory layout.

Member Enumeration Documentation

Enumerator
X_AXIS 
Y_AXIS 
Z_AXIS 
DETECT_AXIS 
122 {X_AXIS=0, Y_AXIS=1, Z_AXIS=2, DETECT_AXIS=-1};
Definition: Vector3.h:122
Definition: Vector3.h:122
Definition: Vector3.h:122
Definition: Vector3.h:122

Constructor & Destructor Documentation

G3D::Vector3::Vector3 ( )
inline

Initializes to zero

604  : x(0.0f), y(0.0f), z(0.0f) {
605 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

G3D::Vector3::Vector3 ( const Any any)
explicit
Parameters
anyMust either Vector3(#, #, #) or Vector3 {x = #, y = #, z = #}. Because Point3 is a typedef for Vector3 in the current implementation, this constructor accepts Point3(#, #, #), etc. as well.
54  {
55  if (any.name() == "Vector3::inf" || any.name() == "Point3::inf") {
56  *this = inf();
57  return;
58  } else if (any.name() == "Vector3::zero" || any.name() == "Point3::zero") {
59  *this = zero();
60  return;
61  } else if (any.name() == "Vector3::nan" || any.name() == "Point3::nan") {
62  *this = nan();
63  return;
64  }
65 
66  any.verifyName("Vector3", "Point3");
67  any.verifyType(Any::TABLE, Any::ARRAY);
68  any.verifySize(3);
69 
70  if (any.type() == Any::ARRAY) {
71  x = any[0];
72  y = any[1];
73  z = any[2];
74  } else {
75  // Table
76  x = any["x"];
77  y = any["y"];
78  z = any["z"];
79  }
80 }
Definition: Any.h:187
float x
Definition: Vector3.h:62
bool any(float x)
Definition: g3dmath.h:424
Definition: Any.h:187
float y
Definition: Vector3.h:62
static const Vector3 & zero()
Definition: Vector3.cpp:119
float z
Definition: Vector3.h:62
static const Vector3 & inf()
Definition: Vector3.cpp:124
static const Vector3 & nan()
Definition: Vector3.cpp:125

+ Here is the call graph for this function:

G3D::Vector3::Vector3 ( const Vector4int8 v)

Divides by 127

109 : x(v.x / 127.0f), y(v.y / 127.0f), z(v.z / 127.0f) {}
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( const class Vector2 v,
float  z 
)
111  : x(v.x), y(v.y), z(_z) {
112 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( const class Vector3int32 v)
107 : x((float)v.x), y((float)v.y), z((float)v.z) {}
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( class BinaryInput b)
explicit
178  {
179  deserialize(b);
180 }
void deserialize(class BinaryInput &b)
Definition: Vector3.cpp:190

+ Here is the call graph for this function:

G3D::Vector3::Vector3 ( float  _x,
float  _y,
float  _z 
)
inline
609  : x(fX), y(fY), z(fZ) {
610 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( float  coordinate[3])
inlineexplicit
613  : x(V[0]), y(V[1]), z(V[2]){
614 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( double  coordinate[3])
inlineexplicit
617  : x((float)V[0]), y((float)V[1]), z((float)V[2]){
618 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( const class Vector3int16 v)
183  {
184  x = v.x;
185  y = v.y;
186  z = v.z;
187 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
G3D::Vector3::Vector3 ( class TextInput t)
explicit
174  {
175  deserialize(t);
176 }
void deserialize(class BinaryInput &b)
Definition: Vector3.cpp:190

+ Here is the call graph for this function:

G3D::Vector3::Vector3 ( const class Color3 c)
explicit
105 : x(v.r), y(v.g), z(v.b) {}
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

Member Function Documentation

float G3D::Vector3::average ( ) const
inline
415  {
416  return sum() / 3.0f;
417  }
float sum() const
Definition: Vector3.h:411

+ Here is the call graph for this function:

Vector3 G3D::Vector3::clamp ( const Vector3 low,
const Vector3 high 
) const
inline
329  {
330  return Vector3(
331  G3D::clamp(x, low.x, high.x),
332  G3D::clamp(y, low.y, high.y),
333  G3D::clamp(z, low.z, high.z));
334  }
float x
Definition: Vector3.h:62
double clamp(double val, double low, double hi)
Definition: g3dmath.h:571
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::clamp ( float  low,
float  high 
) const
inline
336  {
337  return Vector3(
338  G3D::clamp(x, low, high),
339  G3D::clamp(y, low, high),
340  G3D::clamp(z, low, high));
341  }
float x
Definition: Vector3.h:62
double clamp(double val, double low, double hi)
Definition: g3dmath.h:571
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 G3D::Vector3::cosHemiRandom ( const Vector3 n,
Random r = Random::common() 
)
static

Random unit vector, distributed according to $\max(\cos \theta,0)$.

That is, so that the probability of $\vec{V}$ is proportional to $\max(\vec{v} \cdot \vec{n}, 0)$. Useful in photon mapping for Lambertian scattering.

Distribution rendered by G3D::DirectionHistogram:

vector3-coshemirandom.png
Parameters
nUnit vector at the center of the distribution.

[Henrik] Wann Jensen, Realistic Image Synthesis using Photon Mapping eqn 2.24

243  {
244  debugAssertM(G3D::fuzzyEq(normal.length(), 1.0f),
245  "cosHemiRandom requires its argument to have unit length");
246 
247  float x, y, z;
248  r.cosHemi(x, y, z);
249 
250  // Make a coordinate system
251  const Vector3& Z = normal;
252 
253  Vector3 X, Y;
254  normal.getTangents(X, Y);
255 
256  return
257  x * X +
258  y * Y +
259  z * Z;
260 }
#define Z
Definition: CollisionDetection.cpp:2283
float x
Definition: Vector3.h:62
#define X
Definition: CollisionDetection.cpp:2281
#define debugAssertM(exp, message)
Definition: debugAssert.h:161
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857
#define Y
Definition: CollisionDetection.cpp:2282

+ Here is the call graph for this function:

Vector3 G3D::Vector3::cosPowHemiRandom ( const Vector3 n,
const float  k,
Random r = Random::common() 
)
static

Random unit vector, distributed according to $\max(\cos^k \theta,0)$.

That is, so that the probability of $\vec{V}$ is proportional to $\max((\vec{v} \cdot \vec{n})^k, 0)$. Useful in photon mapping for glossy scattering.

Distribution rendered by G3D::DirectionHistogram:

vector3-cospowhemirandom.png
Parameters
nUnit vector at the center of the distribution.

[Ashikhmin] and Shirley, An anisotropic Phong BRDF model, Journal of Graphics Tools, 2002

283  {
284  debugAssertM(G3D::fuzzyEq(normal.length(), 1.0f),
285  "cosPowHemiRandom requires its argument to have unit length");
286 
287  float x, y, z;
288  r.cosPowHemi(k, x, y, z);
289 
290  // Make a coordinate system
291  const Vector3& Z = normal;
292 
293  Vector3 X, Y;
294  normal.getTangents(X, Y);
295 
296  return
297  x * X +
298  y * Y +
299  z * Z;
300 }
#define Z
Definition: CollisionDetection.cpp:2283
float x
Definition: Vector3.h:62
#define X
Definition: CollisionDetection.cpp:2281
#define debugAssertM(exp, message)
Definition: debugAssert.h:161
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857
#define Y
Definition: CollisionDetection.cpp:2282

+ Here is the call graph for this function:

Vector3 G3D::Vector3::cosSphereRandom ( const Vector3 n,
Random r = Random::common() 
)
static
263  {
264  debugAssertM(G3D::fuzzyEq(normal.length(), 1.0f),
265  "cosSphereRandom requires its argument to have unit length");
266 
267  float x, y, z;
268  r.cosSphere(x, y, z);
269 
270  // Make a coordinate system
271  const Vector3& Z = normal;
272 
273  Vector3 X, Y;
274  normal.getTangents(X, Y);
275 
276  return
277  x * X +
278  y * Y +
279  z * Z;
280 }
#define Z
Definition: CollisionDetection.cpp:2283
float x
Definition: Vector3.h:62
#define X
Definition: CollisionDetection.cpp:2281
#define debugAssertM(exp, message)
Definition: debugAssert.h:161
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857
#define Y
Definition: CollisionDetection.cpp:2282

+ Here is the call graph for this function:

Vector3 G3D::Vector3::cross ( const Vector3 rkVector) const
inline

Cross product. Note that two cross products in a row can be computed more cheaply: v1 x (v2 x v3) = (v1 dot v3) v2 - (v1 dot v2) v3.

776  {
777  return Vector3(y*rkVector.z - z*rkVector.y, z*rkVector.x - x*rkVector.z,
778  x*rkVector.y - y*rkVector.x);
779 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Matrix3 G3D::Vector3::cross ( ) const

Returns a matrix such that v.cross() * w = v.cross(w).

[ 0  -v.z  v.y ]
[ v.z  0  -v.x ]
[ -v.y v.x  0  ]
393  {
394  return Matrix3( 0, -z, y,
395  z, 0, -x,
396  -y, x, 0);
397 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

void G3D::Vector3::deserialize ( class BinaryInput b)
190  {
191  x = b.readFloat32();
192  y = b.readFloat32();
193  z = b.readFloat32();
194 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G3D::Vector3::deserialize ( class TextInput t)
197  {
198  t.readSymbol("(");
199  x = (float)t.readNumber();
200  t.readSymbol(",");
201  y = (float)t.readNumber();
202  t.readSymbol(",");
203  z = (float)t.readNumber();
204  t.readSymbol(")");
205 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 G3D::Vector3::direction ( ) const
inline

Returns a unit-length version of this vector. Returns nan if length is almost zero.

756  {
757  const float lenSquared = squaredMagnitude();
758  const float invSqrt = 1.0f / sqrtf(lenSquared);
759  return Vector3(x * invSqrt, y * invSqrt, z * invSqrt);
760 }
float squaredMagnitude() const
Definition: Vector3.h:736
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::directionOrZero ( ) const
inline

Returns Vector3::zero() if the length is nearly zero, otherwise returns a unit vector.

237  {
238  float mag = magnitude();
239  if (mag < 0.0000001f) {
240  return Vector3::zero();
241  } else if (mag < 1.00001f && mag > 0.99999f) {
242  return *this;
243  } else {
244  return *this * (1.0f / mag);
245  }
246  }
static const Vector3 & zero()
Definition: Vector3.cpp:119
float magnitude() const
Definition: Vector3.h:746

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float G3D::Vector3::dot ( const Vector3 rkVector) const
inline
771  {
772  return x*rkVector.x + y*rkVector.y + z*rkVector.z;
773 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::fastDirection ( ) const
inline

Potentially less accurate but faster than direction(). Only works if System::hasSSE is true.

764  {
765  float lenSquared = x * x + y * y + z * z;
766  float invSqrt = rsq(lenSquared);
767  return Vector3(x * invSqrt, y * invSqrt, z * invSqrt);
768 }
float x
Definition: Vector3.h:62
float rsq(float x)
Definition: g3dmath.h:380
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::fastUnit ( ) const
inline

Returns a normalized vector. May be computed with lower precision than unit

287  {
288  return fastDirection();
289  }
Vector3 fastDirection() const
Definition: Vector3.h:764

+ Here is the call graph for this function:

Vector3 G3D::Vector3::floor ( ) const
inline
344  {
345  return G3D::Vector3(::floor(x), ::floor(y), ::floor(z));
346  }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Definition: Vector3.h:58
Vector3 floor() const
Definition: Vector3.h:344
float z
Definition: Vector3.h:62
bool G3D::Vector3::fuzzyEq ( const Vector3 other) const
inline
640  {
641  return G3D::fuzzyEq((*this - other).squaredMagnitude(), 0);
642 }
float squaredMagnitude() const
Definition: Vector3.h:736
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G3D::Vector3::fuzzyNe ( const Vector3 other) const
inline
646  {
647  return G3D::fuzzyNe((*this - other).squaredMagnitude(), 0);
648 }
float squaredMagnitude() const
Definition: Vector3.h:736
bool fuzzyNe(double a, double b)
Definition: g3dmath.h:861

+ Here is the call graph for this function:

void G3D::Vector3::getTangents ( Vector3 X,
Vector3 Y 
) const
inline

Creates two orthonormal tangent vectors X and Y such that if Z = this, X x Y = Z.

437  {
438  debugAssertM(G3D::fuzzyEq(length(), 1.0f),
439  "makeAxes requires Z to have unit length");
440 
441  // Choose another vector not perpendicular
442  X = (abs(x) < 0.9f) ? Vector3::unitX() : Vector3::unitY();
443 
444  // Remove the part that is parallel to Z
445  X -= *this * this->dot(X);
446  X /= X.length();
447 
448  Y = this->cross(X);
449  }
float x
Definition: Vector3.h:62
class Matrix3 cross() const
Definition: Vector3.cpp:393
#define X
Definition: CollisionDetection.cpp:2281
double abs(double fValue)
Definition: g3dmath.h:617
float __fastcall dot(const Vector3 &rkVector) const
Definition: Vector3.h:771
#define debugAssertM(exp, message)
Definition: debugAssert.h:161
float length() const
Definition: Vector3.h:751
static const Vector3 & unitX()
Definition: Vector3.cpp:121
static const Vector3 & unitY()
Definition: Vector3.cpp:122
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857
#define Y
Definition: CollisionDetection.cpp:2282

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t G3D::Vector3::hashCode ( ) const
155  {
156  const uint32* u = (const uint32*)this;
157  return
160  HashTrait<uint32>::hashCode((u[2] << 16) | ~(u[2] >> 16));
161 }
size_t hashCode() const
Definition: Vector2unorm16.h:76
uint32_t uint32
Definition: Define.h:150

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::hemiRandom ( const Vector3 normal,
Random r = Random::common() 
)
static

Random vector distributed over the hemisphere about normal.

Distribution rendered by G3D::DirectionHistogram:

vector3-hemirandom.png
303  {
304  const Vector3& V = Vector3::random(r);
305 
306  if (V.dot(normal) < 0) {
307  return -V;
308  } else {
309  return V;
310  }
311 }
static Vector3 random(Random &r=Random::common())
Random unit vector, uniformly distributed on the sphere.
Definition: Vector3.cpp:226
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector3 & G3D::Vector3::ignore ( )
static

Can be passed to ignore a vector3 parameter

114  {
115  static Vector3 v;
116  return v;
117 }
Vector3()
Definition: Vector3.h:604
const Vector3 & G3D::Vector3::inf ( )
static
124 { static const Vector3 v((float)G3D::finf(), (float)G3D::finf(), (float)G3D::finf()); return v; }
float finf()
Definition: g3dmath.cpp:71
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G3D::Vector3::isFinite ( ) const
inline

Returns true if this vector has finite length.

652  {
653  return G3D::isFinite(x) && G3D::isFinite(y) && G3D::isFinite(z);
654 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
bool isFinite(double x)
Definition: g3dmath.h:525

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G3D::Vector3::isNaN ( ) const

True if any field is nan

83  {
84  return G3D::isNaN(x) || G3D::isNaN(y) || G3D::isNaN(z);
85 }
float x
Definition: Vector3.h:62
bool isNaN(double x)
Definition: g3dmath.cpp:56
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G3D::Vector3::isUnit ( ) const
inline

Returns true if this vector has length ~= 1

805  {
806  return G3D::fuzzyEq(squaredMagnitude(), 1.0f);
807 }
float squaredMagnitude() const
Definition: Vector3.h:736
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G3D::Vector3::isZero ( ) const
inline

Returns true if this vector has length ~= 0

799  {
800  return G3D::fuzzyEq(fabsf(x) + fabsf(y) + fabsf(z), 0.0f);
801 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float G3D::Vector3::length ( ) const
inline

Same as magnitude

751  {
752  return magnitude();
753 }
float magnitude() const
Definition: Vector3.h:746

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::lerp ( const Vector3 v,
float  alpha 
) const
inline

Linear interpolation

357  {
358  return (*this) + (v - *this) * alpha;
359  }

+ Here is the caller graph for this function:

float G3D::Vector3::magnitude ( ) const
inline
746  {
747  return ::sqrtf(x*x + y*y + z*z);
748 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::max ( const Vector3 v) const
inline
794  {
795  return Vector3(G3D::max(v.x, x), G3D::max(v.y, y), G3D::max(v.z, z));
796 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
T max(const T &x, const T &y)
Definition: g3dmath.h:320
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float G3D::Vector3::max ( ) const
inline

Largest element

323  {
324  return G3D::max(G3D::max(x, y), z);
325  }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
T max(const T &x, const T &y)
Definition: g3dmath.h:320
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

const Vector3 & G3D::Vector3::maxFinite ( )
static

Largest representable vector

127 { static const Vector3 v(FLT_MAX, FLT_MAX, FLT_MAX); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::min ( const Vector3 v) const
inline
789  {
790  return Vector3(G3D::min(v.x, x), G3D::min(v.y, y), G3D::min(v.z, z));
791 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
T min(const T &x, const T &y)
Definition: g3dmath.h:305
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float G3D::Vector3::min ( ) const
inline

Smallest element

318  {
319  return G3D::min(G3D::min(x, y), z);
320  }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
T min(const T &x, const T &y)
Definition: g3dmath.h:305
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

const Vector3 & G3D::Vector3::minFinite ( )
static

Smallest (most negative) representable vector

126 { static const Vector3 v(-FLT_MAX, -FLT_MAX, -FLT_MAX); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::movedTowards ( const Vector3 goal,
float  maxTranslation 
) const

Returns a vector that is this translated towards goal with a maximum translation of maxTranslation.

35  {
36  Vector3 t = *this;
37  t.moveTowards(goal, maxTranslation);
38  return t;
39 }
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

void G3D::Vector3::moveTowards ( const Vector3 goal,
float  maxTranslation 
)
42  {
43  // Apply clamped translation
44  Vector3 dX = goal - *this;
45  float length = dX.length();
46  if ((length < 0.00001f) || (length < maxTranslation)) {
47  *this = goal;
48  } else {
49  *this += G3D::min(1.0f, maxTranslation / length) * dX;
50  }
51 }
float length() const
Definition: Vector3.h:751
Vector3()
Definition: Vector3.h:604
T min(const T &x, const T &y)
Definition: g3dmath.h:305

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Vector3 & G3D::Vector3::nan ( )
static
125 { static const Vector3 v((float)G3D::fnan(), (float)G3D::fnan(), (float)G3D::fnan()); return v; }
float fnan()
Definition: g3dmath.cpp:82
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G3D::Vector3::nonZero ( ) const
inline
118  {
119  return (x != 0) || (y != 0) || (z != 0);
120  }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
const Vector3 & G3D::Vector3::one ( )
static
120 { static const Vector3 v(1, 1, 1); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

bool G3D::Vector3::operator!= ( const Vector3 rkVector) const
inline
662  {
663  return ( x != rkVector.x || y != rkVector.y || z != rkVector.z );
664 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::operator* ( float  s) const
inline
681  {
682  return Vector3(x * f, y * f, z * f);
683 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 G3D::Vector3::operator* ( const Vector3 v) const
inline
677  {
678  return Vector3(x * rkVector.x, y * rkVector.y, z * rkVector.z);
679 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 & G3D::Vector3::operator*= ( float  s)
inline
712  {
713  x *= fScalar;
714  y *= fScalar;
715  z *= fScalar;
716  return *this;
717 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 & G3D::Vector3::operator*= ( const Vector3 v)
inline
720  {
721  x *= rkVector.x;
722  y *= rkVector.y;
723  z *= rkVector.z;
724  return *this;
725 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::operator+ ( const Vector3 v) const
inline
667  {
668  return Vector3(x + rkVector.x, y + rkVector.y, z + rkVector.z);
669 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 & G3D::Vector3::operator+= ( const Vector3 v)
inline
696  {
697  x += rkVector.x;
698  y += rkVector.y;
699  z += rkVector.z;
700  return *this;
701 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::operator- ( const Vector3 v) const
inline
672  {
673  return Vector3(x - rkVector.x, y - rkVector.y, z - rkVector.z);
674 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 G3D::Vector3::operator- ( ) const
inline
691  {
692  return Vector3(-x, -y, -z);
693 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3 & G3D::Vector3::operator-= ( const Vector3 v)
inline
704  {
705  x -= rkVector.x;
706  y -= rkVector.y;
707  z -= rkVector.z;
708  return *this;
709 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 __fastcall G3D::Vector3::operator/ ( float  s) const
inline
159  {
160  return *this * (1.0f / s);
161  }
Vector3 G3D::Vector3::operator/ ( const Vector3 v) const
inline
686  {
687  return Vector3(x / rkVector.x, y / rkVector.y, z / rkVector.z);
688 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3& __fastcall G3D::Vector3::operator/= ( float  s)
inline
170  {
171  return (*this *= (1.0f / s));
172  }
Vector3 & G3D::Vector3::operator/= ( const Vector3 v)
inline
728  {
729  x /= rkVector.x;
730  y /= rkVector.y;
731  z /= rkVector.z;
732  return *this;
733 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
bool G3D::Vector3::operator< ( const Vector3 ) const
private
bool G3D::Vector3::operator<= ( const Vector3 ) const
private
Vector3 & G3D::Vector3::operator= ( const Vector3 rkVector)
inline
631  {
632  x = rkVector.x;
633  y = rkVector.y;
634  z = rkVector.z;
635  return *this;
636 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 & G3D::Vector3::operator= ( const Any a)
88  {
89  *this = Vector3(a);
90  return *this;
91 }
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

bool G3D::Vector3::operator== ( const Vector3 rkVector) const
inline
657  {
658  return ( x == rkVector.x && y == rkVector.y && z == rkVector.z );
659 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
bool G3D::Vector3::operator> ( const Vector3 ) const
private
bool G3D::Vector3::operator>= ( const Vector3 ) const
private
const float & G3D::Vector3::operator[] ( int  i) const
inline
621  {
622  return ((float*)this)[i];
623 }
float & G3D::Vector3::operator[] ( int  i)
inline
625  {
626  return ((float*)this)[i];
627 }
void G3D::Vector3::orthonormalize ( Vector3  akVector[3])
static

Gram-Schmidt orthonormalization.

357  {
358  // If the input vectors are v0, v1, and v2, then the Gram-Schmidt
359  // orthonormalization produces vectors u0, u1, and u2 as follows,
360  //
361  // u0 = v0/|v0|
362  // u1 = (v1-(u0*v1)u0)/|v1-(u0*v1)u0|
363  // u2 = (v2-(u0*v2)u0-(u1*v2)u1)/|v2-(u0*v2)u0-(u1*v2)u1|
364  //
365  // where |A| indicates length of vector A and A*B indicates dot
366  // product of vectors A and B.
367 
368  // compute u0
369  akVector[0] = akVector[0].direction();
370 
371  // compute u1
372  float fDot0 = akVector[0].dot(akVector[1]);
373  akVector[1] -= akVector[0] * fDot0;
374  akVector[1] = akVector[1].direction();
375 
376  // compute u2
377  float fDot1 = akVector[1].dot(akVector[2]);
378  fDot0 = akVector[0].dot(akVector[2]);
379  akVector[2] -= akVector[0] * fDot0 + akVector[1] * fDot1;
380  akVector[2] = akVector[2].direction();
381 }

+ Here is the call graph for this function:

Vector3 G3D::Vector3::pow ( float  p) const
inline

Raise each component of this vector to a power

182  {
183  return Vector3(powf(x, p), powf(y, p), powf(z, p));
184  }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector3::Axis G3D::Vector3::primaryAxis ( ) const

Returns the largest dimension. Particularly convenient for determining which plane to project a triangle onto for point-in-polygon tests.

129  {
130 
131  Axis a = X_AXIS;
132 
133  double nx = abs(x);
134  double ny = abs(y);
135  double nz = abs(z);
136 
137  if (nx > ny) {
138  if (nx > nz) {
139  a = X_AXIS;
140  } else {
141  a = Z_AXIS;
142  }
143  } else {
144  if (ny > nz) {
145  a = Y_AXIS;
146  } else {
147  a = Z_AXIS;
148  }
149  }
150 
151  return a;
152 }
float x
Definition: Vector3.h:62
Definition: Vector3.h:122
double abs(double fValue)
Definition: g3dmath.h:617
Axis
Definition: Vector3.h:122
float y
Definition: Vector3.h:62
Definition: Vector3.h:122
Definition: Vector3.h:122
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::random ( Random r = Random::common())
static

Random unit vector, uniformly distributed on the sphere.

Distribution rendered by G3D::DirectionHistogram:

vector3-random.png
226  {
227  Vector3 result;
228  r.sphere(result.x, result.y, result.z);
229  return result;
230 }
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::reflectAbout ( const Vector3 normal) const

Reflect this vector about the (not necessarily unit) normal. Assumes that both the before and after vectors point away from the base of the normal.

Note that if used for a collision or ray reflection you must negate the resulting vector to get a direction pointing away from the collision.

  V'    N      V
    r   ^   -,
     \  |  /
       |/

See also Vector3::reflectionDirection

233  {
234  Vector3 out;
235 
236  Vector3 N = normal.direction();
237 
238  // 2 * normal.dot(this) * normal - this
239  return N * 2 * this->dot(N) - *this;
240 }
float __fastcall dot(const Vector3 &rkVector) const
Definition: Vector3.h:771
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::reflectionDirection ( const Vector3 normal) const

See also G3D::Ray::reflect. The length is 1.

  V'    N       V
    r   ^    /
     \  |  /
       |'-
315  {
316  return -reflectAbout(normal).direction();
317 }
Vector3 direction() const
Definition: Vector3.h:756
Vector3 reflectAbout(const Vector3 &normal) const
Definition: Vector3.cpp:233

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::refractionDirection ( const Vector3 normal,
float  iInside,
float  iOutside 
) const

Returns the direction of a refracted ray, where iExit is the index of refraction for the previous material and iEnter is the index of refraction for the new material. Like Vector3::reflectionDirection, the result has length 1 and is pointed away from the intersection.

Returns Vector3::zero() in the case of total internal refraction.

Parameters
iOutsideThe index of refraction (eta) outside (on the positive normal side) of the surface.
iInsideThe index of refraction (eta) inside (on the negative normal side) of the surface.

See also G3D::Ray::refract.

         N      V
         ^    /
         |  /
         |'-
     __–
V'<–
324  {
325 
326  // From pg. 24 of Henrik Wann Jensen. Realistic Image Synthesis
327  // Using Photon Mapping. AK Peters. ISBN: 1568811470. July 2001.
328 
329  // Invert the directions from Wann Jensen's formulation
330  // and normalize the vectors.
331  const Vector3 W = -direction();
332  Vector3 N = normal.direction();
333 
334  float h1 = iOutside;
335  float h2 = iInside;
336 
337  if (normal.dot(*this) > 0.0f) {
338  h1 = iInside;
339  h2 = iOutside;
340  N = -N;
341  }
342 
343  const float hRatio = h1 / h2;
344  const float WdotN = W.dot(N);
345 
346  float det = 1.0f - (float)square(hRatio) * (1.0f - (float)square(WdotN));
347 
348  if (det < 0) {
349  // Total internal reflection
350  return Vector3::zero();
351  } else {
352  return -hRatio * (W - WdotN * N) - N * sqrt(det);
353  }
354 }
Vector3 direction() const
Definition: Vector3.h:756
Vector3()
Definition: Vector3.h:604
static const Vector3 & zero()
Definition: Vector3.cpp:119
double square(double fValue)
Definition: g3dmath.h:698

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::round ( ) const
inline
349  {
350  return Vector3(G3D::round(x), G3D::round(y), G3D::round(z));
351  }
float x
Definition: Vector3.h:62
double round(double f)
Definition: g3dmath.h:214
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

void G3D::Vector3::serialize ( class BinaryOutput b) const

Format is three float32's

219  {
220  b.writeFloat32(x);
221  b.writeFloat32(y);
222  b.writeFloat32(z);
223 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G3D::Vector3::serialize ( class TextOutput t) const

Format is "(%f, %f, %f)"

208  {
209  t.writeSymbol("(");
210  t.writeNumber(x);
211  t.writeSymbol(",");
212  t.writeNumber(y);
213  t.writeSymbol(",");
214  t.writeNumber(z);
215  t.writeSymbol(")");
216 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

float G3D::Vector3::squaredLength ( ) const
inline

Same as squaredMagnitude

741  {
742  return squaredMagnitude();
743 }
float squaredMagnitude() const
Definition: Vector3.h:736

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float G3D::Vector3::squaredMagnitude ( ) const
inline
736  {
737  return x*x + y*y + z*z;
738 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

float G3D::Vector3::sum ( ) const
inline
411  {
412  return x + y + z;
413  }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

Any G3D::Vector3::toAny ( const std::string &  name) const

Converts the Vector3 to an Any, using the specified name instead of "Vector3"

99  {
100  Any any(Any::ARRAY, name);
101  any.append(x, y, z);
102  return any;
103 }
float x
Definition: Vector3.h:62
bool any(float x)
Definition: g3dmath.h:424
Definition: Any.h:187
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Any G3D::Vector3::toAny ( ) const

Converts the Vector3 to an Any.

94  {
95  return toAny("Vector3");
96 }
Any toAny() const
Definition: Vector3.cpp:94
std::string G3D::Vector3::toString ( ) const
386  {
387  return G3D::format("(%g, %g, %g)", x, y, z);
388 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
std::string __cdecl format(const char *fmt...) G3D_CHECK_PRINTF_ARGS
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::unit ( ) const
inline

Synonym for direction

281  {
282  return direction();
283  }
Vector3 direction() const
Definition: Vector3.h:756

+ Here is the call graph for this function:

Vector3 G3D::Vector3::unitCross ( const Vector3 rkVector) const
inline
782  {
783  Vector3 kCross(y*rkVector.z - z*rkVector.y, z*rkVector.x - x*rkVector.z,
784  x*rkVector.y - y*rkVector.x);
785  return kCross.direction();
786 }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

const Vector3 & G3D::Vector3::unitX ( )
static
121 { static const Vector3 v(1, 0, 0); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

const Vector3 & G3D::Vector3::unitY ( )
static
122 { static const Vector3 v(0, 1, 0); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

const Vector3 & G3D::Vector3::unitZ ( )
static
123 { static const Vector3 v(0, 0, 1); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

Vector2 G3D::Vector3::xx ( ) const
411 { return Vector2 (x, x); }
float x
Definition: Vector3.h:62
Vector3 G3D::Vector3::xxx ( ) const
423 { return Vector3 (x, x, x); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xxxx ( ) const
453 { return Vector4 (x, x, x, x); }
float x
Definition: Vector3.h:62
Vector4 G3D::Vector3::xxxy ( ) const
480 { return Vector4 (x, x, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xxxz ( ) const
507 { return Vector4 (x, x, x, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::xxy ( ) const
432 { return Vector3 (x, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xxyx ( ) const
462 { return Vector4 (x, x, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xxyy ( ) const
489 { return Vector4 (x, x, y, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xxyz ( ) const
516 { return Vector4 (x, x, y, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::xxz ( ) const
441 { return Vector3 (x, x, z); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xxzx ( ) const
471 { return Vector4 (x, x, z, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xxzy ( ) const
498 { return Vector4 (x, x, z, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xxzz ( ) const
525 { return Vector4 (x, x, z, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::xy ( ) const
414 { return Vector2 (x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3 G3D::Vector3::xyx ( ) const
426 { return Vector3 (x, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xyxx ( ) const
456 { return Vector4 (x, y, x, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xyxy ( ) const
483 { return Vector4 (x, y, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xyxz ( ) const
510 { return Vector4 (x, y, x, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::xyy ( ) const
435 { return Vector3 (x, y, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xyyx ( ) const
465 { return Vector4 (x, y, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xyyy ( ) const
492 { return Vector4 (x, y, y, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::xyyz ( ) const
519 { return Vector4 (x, y, y, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::xyz ( ) const
444 { return Vector3 (x, y, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector4 G3D::Vector3::xyzx ( ) const
474 { return Vector4 (x, y, z, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xyzy ( ) const
501 { return Vector4 (x, y, z, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xyzz ( ) const
528 { return Vector4 (x, y, z, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::xz ( ) const
417 { return Vector2 (x, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62

+ Here is the caller graph for this function:

Vector3 G3D::Vector3::xzx ( ) const
429 { return Vector3 (x, z, x); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xzxx ( ) const
459 { return Vector4 (x, z, x, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xzxy ( ) const
486 { return Vector4 (x, z, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xzxz ( ) const
513 { return Vector4 (x, z, x, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::xzy ( ) const
438 { return Vector3 (x, z, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xzyx ( ) const
468 { return Vector4 (x, z, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xzyy ( ) const
495 { return Vector4 (x, z, y, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xzyz ( ) const
522 { return Vector4 (x, z, y, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::xzz ( ) const
447 { return Vector3 (x, z, z); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::xzzx ( ) const
477 { return Vector4 (x, z, z, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xzzy ( ) const
504 { return Vector4 (x, z, z, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::xzzz ( ) const
531 { return Vector4 (x, z, z, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::yx ( ) const
412 { return Vector2 (y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3 G3D::Vector3::yxx ( ) const
424 { return Vector3 (y, x, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yxxx ( ) const
454 { return Vector4 (y, x, x, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yxxy ( ) const
481 { return Vector4 (y, x, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yxxz ( ) const
508 { return Vector4 (y, x, x, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yxy ( ) const
433 { return Vector3 (y, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yxyx ( ) const
463 { return Vector4 (y, x, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yxyy ( ) const
490 { return Vector4 (y, x, y, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yxyz ( ) const
517 { return Vector4 (y, x, y, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yxz ( ) const
442 { return Vector3 (y, x, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yxzx ( ) const
472 { return Vector4 (y, x, z, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yxzy ( ) const
499 { return Vector4 (y, x, z, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yxzz ( ) const
526 { return Vector4 (y, x, z, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::yy ( ) const
415 { return Vector2 (y, y); }
float y
Definition: Vector3.h:62
Vector3 G3D::Vector3::yyx ( ) const
427 { return Vector3 (y, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yyxx ( ) const
457 { return Vector4 (y, y, x, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yyxy ( ) const
484 { return Vector4 (y, y, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yyxz ( ) const
511 { return Vector4 (y, y, x, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yyy ( ) const
436 { return Vector3 (y, y, y); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yyyx ( ) const
466 { return Vector4 (y, y, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yyyy ( ) const
493 { return Vector4 (y, y, y, y); }
float y
Definition: Vector3.h:62
Vector4 G3D::Vector3::yyyz ( ) const
520 { return Vector4 (y, y, y, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yyz ( ) const
445 { return Vector3 (y, y, z); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yyzx ( ) const
475 { return Vector4 (y, y, z, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yyzy ( ) const
502 { return Vector4 (y, y, z, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yyzz ( ) const
529 { return Vector4 (y, y, z, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::yz ( ) const
418 { return Vector2 (y, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yzx ( ) const
430 { return Vector3 (y, z, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yzxx ( ) const
460 { return Vector4 (y, z, x, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yzxy ( ) const
487 { return Vector4 (y, z, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yzxz ( ) const
514 { return Vector4 (y, z, x, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yzy ( ) const
439 { return Vector3 (y, z, y); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yzyx ( ) const
469 { return Vector4 (y, z, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yzyy ( ) const
496 { return Vector4 (y, z, y, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yzyz ( ) const
523 { return Vector4 (y, z, y, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::yzz ( ) const
448 { return Vector3 (y, z, z); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::yzzx ( ) const
478 { return Vector4 (y, z, z, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yzzy ( ) const
505 { return Vector4 (y, z, z, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::yzzz ( ) const
532 { return Vector4 (y, z, z, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
const Vector3 & G3D::Vector3::zero ( )
static
119 { static const Vector3 v(0, 0, 0); return v; }
Vector3()
Definition: Vector3.h:604

+ Here is the caller graph for this function:

Vector2 G3D::Vector3::zx ( ) const
413 { return Vector2 (z, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zxx ( ) const
425 { return Vector3 (z, x, x); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zxxx ( ) const
455 { return Vector4 (z, x, x, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zxxy ( ) const
482 { return Vector4 (z, x, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zxxz ( ) const
509 { return Vector4 (z, x, x, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zxy ( ) const
434 { return Vector3 (z, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zxyx ( ) const
464 { return Vector4 (z, x, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zxyy ( ) const
491 { return Vector4 (z, x, y, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zxyz ( ) const
518 { return Vector4 (z, x, y, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zxz ( ) const
443 { return Vector3 (z, x, z); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zxzx ( ) const
473 { return Vector4 (z, x, z, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zxzy ( ) const
500 { return Vector4 (z, x, z, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zxzz ( ) const
527 { return Vector4 (z, x, z, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::zy ( ) const
416 { return Vector2 (z, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zyx ( ) const
428 { return Vector3 (z, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zyxx ( ) const
458 { return Vector4 (z, y, x, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zyxy ( ) const
485 { return Vector4 (z, y, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zyxz ( ) const
512 { return Vector4 (z, y, x, z); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zyy ( ) const
437 { return Vector3 (z, y, y); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zyyx ( ) const
467 { return Vector4 (z, y, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zyyy ( ) const
494 { return Vector4 (z, y, y, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zyyz ( ) const
521 { return Vector4 (z, y, y, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zyz ( ) const
446 { return Vector3 (z, y, z); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zyzx ( ) const
476 { return Vector4 (z, y, z, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zyzy ( ) const
503 { return Vector4 (z, y, z, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zyzz ( ) const
530 { return Vector4 (z, y, z, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector2 G3D::Vector3::zz ( ) const
419 { return Vector2 (z, z); }
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zzx ( ) const
431 { return Vector3 (z, z, x); }
float x
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zzxx ( ) const
461 { return Vector4 (z, z, x, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zzxy ( ) const
488 { return Vector4 (z, z, x, y); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zzxz ( ) const
515 { return Vector4 (z, z, x, z); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zzy ( ) const
440 { return Vector3 (z, z, y); }
float y
Definition: Vector3.h:62
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zzyx ( ) const
470 { return Vector4 (z, z, y, x); }
float x
Definition: Vector3.h:62
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zzyy ( ) const
497 { return Vector4 (z, z, y, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zzyz ( ) const
524 { return Vector4 (z, z, y, z); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector3 G3D::Vector3::zzz ( ) const
449 { return Vector3 (z, z, z); }
Vector3()
Definition: Vector3.h:604
float z
Definition: Vector3.h:62

+ Here is the call graph for this function:

Vector4 G3D::Vector3::zzzx ( ) const
479 { return Vector4 (z, z, z, x); }
float x
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zzzy ( ) const
506 { return Vector4 (z, z, z, y); }
float y
Definition: Vector3.h:62
float z
Definition: Vector3.h:62
Vector4 G3D::Vector3::zzzz ( ) const
533 { return Vector4 (z, z, z, z); }
float z
Definition: Vector3.h:62

Member Data Documentation

float G3D::Vector3::x
float G3D::Vector3::y
float G3D::Vector3::z

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