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

#include <Vector2.h>

Public Member Functions

 Vector2 (const Any &any)
 
Any toAny () const
 
 Vector2 ()
 
 Vector2 (class TextInput &t)
 
 Vector2 (class BinaryInput &b)
 
 Vector2 (float x, float y)
 
 Vector2 (float coordinate[2])
 
 Vector2 (double coordinate[2])
 
 Vector2 (const Vector2 &other)
 
 Vector2 (const Vector2int16 &other)
 
 Vector2 (const Vector2unorm16 &other)
 
 Vector2 (const Vector2int32 &other)
 
Vector2operator= (const Any &a)
 
void serialize (class BinaryOutput &b) const
 
void deserialize (class BinaryInput &b)
 
void serialize (class TextOutput &t) const
 
void deserialize (class TextInput &t)
 
float & operator[] (int i)
 
const float & operator[] (int i) const
 
Vector2operator= (const Vector2 &other)
 
bool operator== (const Vector2 &other) const
 
bool operator!= (const Vector2 &other) const
 
size_t hashCode () const
 
bool fuzzyEq (const Vector2 &other) const
 
bool fuzzyNe (const Vector2 &other) const
 
bool isFinite () const
 
bool isNaN () const
 
bool isZero () const
 
bool isUnit () const
 
Vector2 operator+ (const Vector2 &v) const
 
Vector2 operator- (const Vector2 &v) const
 
Vector2 operator* (float s) const
 
Vector2 pow (float p) const
 
Vector2 operator* (const Vector2 &v) const
 
Vector2 operator/ (const Vector2 &v) const
 
Vector2 operator/ (float s) const
 
Vector2 operator- () const
 
float sum () const
 
Vector2 lerp (const Vector2 &v, float alpha) const
 
Vector2 clamp (const Vector2 &low, const Vector2 &high) const
 
Vector2 clamp (float low, float high) const
 
Vector2operator+= (const Vector2 &)
 
Vector2operator-= (const Vector2 &)
 
Vector2operator*= (float)
 
Vector2operator/= (float)
 
Vector2operator*= (const Vector2 &)
 
Vector2operator/= (const Vector2 &)
 
float length () const
 
Vector2 direction () const
 
Vector2 directionOrZero () const
 
Vector2 fastDirection () const
 
float squaredLength () const
 
float dot (const Vector2 &s) const
 
Vector2 abs () const
 
Vector2 min (const Vector2 &v) const
 
Vector2 max (const Vector2 &v) const
 
Vector2 maxAbs (const Vector2 &v) const
 
Vector2 minAbs (const Vector2 &v) const
 
std::string toString () const
 
Vector2 xx () const
 
Vector2 yx () const
 
Vector2 xy () const
 
Vector2 yy () const
 
Vector3 xxx () const
 
Vector3 yxx () const
 
Vector3 xyx () const
 
Vector3 yyx () const
 
Vector3 xxy () const
 
Vector3 yxy () const
 
Vector3 xyy () const
 
Vector3 yyy () const
 
Vector4 xxxx () const
 
Vector4 yxxx () const
 
Vector4 xyxx () const
 
Vector4 yyxx () const
 
Vector4 xxyx () const
 
Vector4 yxyx () const
 
Vector4 xyyx () const
 
Vector4 yyyx () const
 
Vector4 xxxy () const
 
Vector4 yxxy () const
 
Vector4 xyxy () const
 
Vector4 yyxy () const
 
Vector4 xxyy () const
 
Vector4 yxyy () const
 
Vector4 xyyy () const
 
Vector4 yyyy () const
 

Static Public Member Functions

static Vector2 random (Random &r=Random::common())
 
static const Vector2zero ()
 
static const Vector2one ()
 
static const Vector2unitX ()
 
static const Vector2unitY ()
 
static const Vector2inf ()
 
static const Vector2nan ()
 
static const Vector2minFinite ()
 
static const Vector2maxFinite ()
 

Public Attributes

float x
 
float y
 

Private Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

G3D::Vector2::Vector2 ( const Any any)
Parameters
anyMust either Vector2(#, #) or Vector2 {x = #, y = #}
33  {
34  any.verifyName("Vector2", "Point2");
35  any.verifyType(Any::TABLE, Any::ARRAY);
36  any.verifySize(2);
37 
38  if (any.type() == Any::ARRAY) {
39  x = any[0];
40  y = any[1];
41  } else {
42  // Table
43  x = any["x"];
44  y = any["y"];
45  }
46 }
Definition: Any.h:187
bool any(float x)
Definition: g3dmath.h:424
Definition: Any.h:187
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

G3D::Vector2::Vector2 ( )
inline

Creates the zero vector

282  : x(0.0f), y(0.0f) {
283 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the caller graph for this function:

G3D::Vector2::Vector2 ( class TextInput t)
G3D::Vector2::Vector2 ( class BinaryInput b)
114  {
115  deserialize(b);
116 }
void deserialize(class BinaryInput &b)
Definition: Vector2.cpp:119

+ Here is the call graph for this function:

G3D::Vector2::Vector2 ( float  x,
float  y 
)
inline
286  : x(_x), y(_y) {
287 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
G3D::Vector2::Vector2 ( float  coordinate[2])
inline
290  {
291  x = afCoordinate[0];
292  y = afCoordinate[1];
293 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
G3D::Vector2::Vector2 ( double  coordinate[2])
inline
297  {
298  x = (float)afCoordinate[0];
299  y = (float)afCoordinate[1];
300 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
G3D::Vector2::Vector2 ( const Vector2 other)
inline
303  {
304  x = rkVector.x;
305  y = rkVector.y;
306 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
G3D::Vector2::Vector2 ( const Vector2int16 other)
inline
309  : x(v.x), y(v.y) {
310 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
G3D::Vector2::Vector2 ( const Vector2unorm16 other)
inline
311  : x(float(v.x)), y(float(v.y)) {
312 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
G3D::Vector2::Vector2 ( const Vector2int32 other)
explicit
29  : x((float)other.x), y((float)other.y) {
30 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

Member Function Documentation

Vector2 G3D::Vector2::abs ( ) const
inline

Componentwise absolute value

184  {
185  return Vector2(fabs(x), fabs(y));
186  }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 G3D::Vector2::clamp ( const Vector2 low,
const Vector2 high 
) const
inline
137  {
138  return Vector2(
139  G3D::clamp(x, low.x, high.x),
140  G3D::clamp(y, low.y, high.y));
141  }
double clamp(double val, double low, double hi)
Definition: g3dmath.h:571
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector2 G3D::Vector2::clamp ( float  low,
float  high 
) const
inline
143  {
144  return Vector2(
145  (float)G3D::clamp(x, low, high),
146  (float)G3D::clamp(y, low, high));
147  }
double clamp(double val, double low, double hi)
Definition: g3dmath.h:571
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

void G3D::Vector2::deserialize ( class BinaryInput b)
119  {
120  x = b.readFloat32();
121  y = b.readFloat32();
122 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G3D::Vector2::deserialize ( class TextInput t)
131  {
132  t.readSymbol("(");
133  x = (float)t.readNumber();
134  t.readSymbol(",");
135  y = (float)t.readNumber();
136  t.readSymbol(")");
137 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 G3D::Vector2::direction ( ) const
inline

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

424  {
425  float lenSquared = x * x + y * y;
426 
427  if (lenSquared != 1.0f) {
428  return *this / sqrtf(lenSquared);
429  } else {
430  return *this;
431  }
432 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the caller graph for this function:

Vector2 G3D::Vector2::directionOrZero ( ) const
inline

Returns Vector2::zero() is magnitude is almost zero, otherwise returns unit-length vector.

434  {
435  float mag = length();
436  if (mag < 0.0000001f) {
437  return Vector2::zero();
438  } else if (mag < 1.00001f && mag > 0.99999f) {
439  return *this;
440  } else {
441  return *this * (1.0f / mag);
442  }
443 }
float length() const
Definition: Vector2.h:419
static const Vector2 & zero()
Definition: Vector2.cpp:67

+ Here is the call graph for this function:

float G3D::Vector2::dot ( const Vector2 s) const
inline
446  {
447  return x*rkVector.x + y*rkVector.y;
448 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the caller graph for this function:

Vector2 G3D::Vector2::fastDirection ( ) const
inline

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

176  {
177  return direction();
178  }
Vector2 direction() const
Definition: Vector2.h:424

+ Here is the call graph for this function:

bool G3D::Vector2::fuzzyEq ( const Vector2 other) const
inline
464  {
465  return G3D::fuzzyEq((*this - other).squaredLength(), 0);
466 }
float squaredLength() const
Definition: Vector2.h:414
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857

+ Here is the call graph for this function:

bool G3D::Vector2::fuzzyNe ( const Vector2 other) const
inline
470  {
471  return G3D::fuzzyNe((*this - other).squaredLength(), 0);
472 }
bool fuzzyNe(double a, double b)
Definition: g3dmath.h:861
float squaredLength() const
Definition: Vector2.h:414

+ Here is the call graph for this function:

size_t G3D::Vector2::hashCode ( ) const
106  {
107  unsigned int xhash = (*(int*)(void*)(&x));
108  unsigned int yhash = (*(int*)(void*)(&y));
109 
110  return xhash + (yhash * 37);
111 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the caller graph for this function:

const Vector2 & G3D::Vector2::inf ( )
static
82  {
83  static Vector2 v(G3D::finf(), G3D::finf());
84  return v;
85 }
float finf()
Definition: g3dmath.cpp:71
Vector2()
Definition: Vector2.h:282

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Returns true if this vector has finite length

476  {
477  return G3D::isFinite(x) && G3D::isFinite(y);
478 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
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::Vector2::isNaN ( ) const
inline

True if any field is NaN

95  {
96  return G3D::isNaN(x) || G3D::isNaN(y);
97  }
bool isNaN(double x)
Definition: g3dmath.cpp:56
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Returns true if this vector has length == 1

488  {
489  return G3D::fuzzyEq(squaredLength(), 1.0f);
490 }
float squaredLength() const
Definition: Vector2.h:414
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857

+ Here is the call graph for this function:

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

Returns true if this vector has length == 0

482  {
483  return G3D::fuzzyEq(fabsf(x) + fabsf(y), 0.0f);
484 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
bool fuzzyEq(double a, double b)
Definition: g3dmath.h:857

+ Here is the call graph for this function:

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

Magnitude of the vector

419  {
420  return sqrtf(x*x + y*y);
421 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the caller graph for this function:

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

Linear interpolation

133  {
134  return (*this) + (v - *this) * alpha;
135  }

+ Here is the caller graph for this function:

Vector2 G3D::Vector2::max ( const Vector2 v) const
inline

Component-wise maximum

458  {
459  return Vector2(G3D::max(v.x, x), G3D::max(v.y, y));
460 }
T max(const T &x, const T &y)
Definition: g3dmath.h:320
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector2 G3D::Vector2::maxAbs ( const Vector2 v) const
inline

Component-wise argmax(abs(), v.abs()).

For the larger magnitude vector, simply use (a.squaredMagnitude() > b.squaredMagnitude) ? a : b.

See also
max
199  {
200  return Vector2(::fabsf(x) > ::fabsf(v.x) ? x : v.x, ::fabsf(y) > ::fabsf(v.y) ? y : v.y);
201  }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

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

Largest representable vector

100  {
101  static Vector2 v(FLT_MAX, FLT_MAX);
102  return v;
103 }
Vector2()
Definition: Vector2.h:282
Vector2 G3D::Vector2::min ( const Vector2 v) const
inline

Component-wise minimum

452  {
453  return Vector2(G3D::min(v.x, x), G3D::min(v.y, y));
454 }
float y
Definition: Vector2.h:50
T min(const T &x, const T &y)
Definition: g3dmath.h:305
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector2 G3D::Vector2::minAbs ( const Vector2 v) const
inline

Component-wise argmin(abs(), v.abs()).

For the smaller magnitude vector, simply use (a.squaredMagnitude() < b.squaredMagnitude) ? a : b.

See also
max
208  {
209  return Vector2(::fabsf(x) < ::fabsf(v.x) ? x : v.x, ::fabsf(y) < ::fabsf(v.y) ? y : v.y);
210  }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

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

smallest (most negative) representable vector

94  {
95  static Vector2 v(-FLT_MAX, -FLT_MAX);
96  return v;
97 }
Vector2()
Definition: Vector2.h:282
const Vector2 & G3D::Vector2::nan ( )
static
88  {
89  static Vector2 v(G3D::fnan(), G3D::fnan());
90  return v;
91 }
float fnan()
Definition: g3dmath.cpp:82
Vector2()
Definition: Vector2.h:282

+ Here is the call graph for this function:

const Vector2 & G3D::Vector2::one ( )
static
62  {
63  static const Vector2 v(1, 1); return v;
64 }
Vector2()
Definition: Vector2.h:282
bool G3D::Vector2::operator!= ( const Vector2 other) const
inline
336  {
337  return ( x != rkVector.x || y != rkVector.y);
338 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::operator* ( float  s) const
inline
351  {
352  return Vector2(fScalar*x, fScalar*y);
353 }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 G3D::Vector2::operator* ( const Vector2 v) const
inline

Array (pointwise) multiplication

403  {
404  return Vector2(x * rkVector.x, y * rkVector.y);
405 }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 & G3D::Vector2::operator*= ( float  fScalar)
inline
379  {
380  x *= fScalar;
381  y *= fScalar;
382  return *this;
383 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 & G3D::Vector2::operator*= ( const Vector2 rkVector)
inline
388  {
389  x *= rkVector.x;
390  y *= rkVector.y;
391  return *this;
392 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::operator+ ( const Vector2 v) const
inline
341  {
342  return Vector2(x + rkVector.x, y + rkVector.y);
343 }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 & G3D::Vector2::operator+= ( const Vector2 rkVector)
inline
363  {
364  x += rkVector.x;
365  y += rkVector.y;
366  return *this;
367 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::operator- ( const Vector2 v) const
inline
346  {
347  return Vector2(x - rkVector.x, y - rkVector.y);
348 }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 G3D::Vector2::operator- ( ) const
inline

Unary minus

357  {
358  return Vector2( -x, -y);
359 }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 & G3D::Vector2::operator-= ( const Vector2 rkVector)
inline
371  {
372  x -= rkVector.x;
373  y -= rkVector.y;
374  return *this;
375 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::operator/ ( const Vector2 v) const
inline

Array division

409  {
410  return Vector2(x / rkVector.x, y / rkVector.y);
411 }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector2 G3D::Vector2::operator/ ( float  s) const
162  {
163  return *this * (1.0f / k);
164 }
Vector2 & G3D::Vector2::operator/= ( float  k)
166  {
167  this->x /= k;
168  this->y /= k;
169  return *this;
170 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 & G3D::Vector2::operator/= ( const Vector2 rkVector)
inline
396  {
397  x /= rkVector.x;
398  y /= rkVector.y;
399  return *this;
400 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
bool G3D::Vector2::operator< ( const Vector2 ) const
private
bool G3D::Vector2::operator<= ( const Vector2 ) const
private
Vector2 & G3D::Vector2::operator= ( const Any a)
49  {
50  *this = Vector2(a);
51  return *this;
52 }
Vector2()
Definition: Vector2.h:282

+ Here is the call graph for this function:

Vector2 & G3D::Vector2::operator= ( const Vector2 other)
inline
324  {
325  x = rkVector.x;
326  y = rkVector.y;
327  return *this;
328 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
bool G3D::Vector2::operator== ( const Vector2 other) const
inline
331  {
332  return ( x == rkVector.x && y == rkVector.y);
333 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
bool G3D::Vector2::operator> ( const Vector2 ) const
private
bool G3D::Vector2::operator>= ( const Vector2 ) const
private
float & G3D::Vector2::operator[] ( int  i)
inline
314  {
315  return ((float*)this)[i];
316 }
const float & G3D::Vector2::operator[] ( int  i) const
inline
319  {
320  return ((float*)this)[i];
321 }
Vector2 G3D::Vector2::pow ( float  p) const
inline

Raise each component of this vector to a power

111  {
112  return Vector2(powf(x, p), powf(y, p));
113  }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

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

Uniformly distributed random vector on the unit sphere

150  {
151  Vector2 result;
152 
153  do {
154  result = Vector2(r.uniform(-1, 1), r.uniform(-1, 1));
155 
156  } while (result.squaredLength() >= 1.0f);
157 
158  return result.direction();
159 }
virtual float uniform(float low, float high)
Definition: Random.h:113
Vector2()
Definition: Vector2.h:282

+ Here is the call graph for this function:

void G3D::Vector2::serialize ( class BinaryOutput b) const
125  {
126  b.writeFloat32(x);
127  b.writeFloat32(y);
128 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G3D::Vector2::serialize ( class TextOutput t) const
140  {
141  t.writeSymbol("(");
142  t.writeNumber(x);
143  t.writeSymbol(",");
144  t.writeNumber(y);
145  t.writeSymbol(")");
146 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

float G3D::Vector2::squaredLength ( ) const
inline
414  {
415  return x*x + y*y;
416 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the caller graph for this function:

float G3D::Vector2::sum ( ) const
inline

x + y

126  {
127  return x + y;
128  }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Any G3D::Vector2::toAny ( ) const

Converts the Vector2 to an Any.

55  {
56  Any any(Any::ARRAY, "Vector2");
57  any.append(x, y);
58  return any;
59 }
bool any(float x)
Definition: g3dmath.h:424
Definition: Any.h:187
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

std::string G3D::Vector2::toString ( ) const
175  {
176  return G3D::format("(%g, %g)", x, y);
177 }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
std::string __cdecl format(const char *fmt...) G3D_CHECK_PRINTF_ARGS

+ Here is the call graph for this function:

const Vector2 & G3D::Vector2::unitX ( )
static
72  {
73  static Vector2 v(1, 0);
74  return v;
75 }
Vector2()
Definition: Vector2.h:282
const Vector2 & G3D::Vector2::unitY ( )
static
77  {
78  static Vector2 v(0, 1);
79  return v;
80 }
Vector2()
Definition: Vector2.h:282
Vector2 G3D::Vector2::xx ( ) const
181 { return Vector2 (x, x); }
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

Vector3 G3D::Vector2::xxx ( ) const
188 { return Vector3 (x, x, x); }
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xxxx ( ) const
199 { return Vector4 (x, x, x, x); }
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xxxy ( ) const
207 { return Vector4 (x, x, x, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector3 G3D::Vector2::xxy ( ) const
192 { return Vector3 (x, x, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xxyx ( ) const
203 { return Vector4 (x, x, y, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xxyy ( ) const
211 { return Vector4 (x, x, y, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::xy ( ) const
183 { return Vector2 (x, y); }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector2::xyx ( ) const
190 { return Vector3 (x, y, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xyxx ( ) const
201 { return Vector4 (x, y, x, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xyxy ( ) const
209 { return Vector4 (x, y, x, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector3 G3D::Vector2::xyy ( ) const
194 { return Vector3 (x, y, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xyyx ( ) const
205 { return Vector4 (x, y, y, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::xyyy ( ) const
213 { return Vector4 (x, y, y, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::yx ( ) const
182 { return Vector2 (y, x); }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282
float x
Definition: Vector2.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 G3D::Vector2::yxx ( ) const
189 { return Vector3 (y, x, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yxxx ( ) const
200 { return Vector4 (y, x, x, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yxxy ( ) const
208 { return Vector4 (y, x, x, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector3 G3D::Vector2::yxy ( ) const
193 { return Vector3 (y, x, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yxyx ( ) const
204 { return Vector4 (y, x, y, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yxyy ( ) const
212 { return Vector4 (y, x, y, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector2 G3D::Vector2::yy ( ) const
184 { return Vector2 (y, y); }
float y
Definition: Vector2.h:50
Vector2()
Definition: Vector2.h:282

+ Here is the call graph for this function:

Vector3 G3D::Vector2::yyx ( ) const
191 { return Vector3 (y, y, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yyxx ( ) const
202 { return Vector4 (y, y, x, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yyxy ( ) const
210 { return Vector4 (y, y, x, y); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector3 G3D::Vector2::yyy ( ) const
195 { return Vector3 (y, y, y); }
float y
Definition: Vector2.h:50
Vector4 G3D::Vector2::yyyx ( ) const
206 { return Vector4 (y, y, y, x); }
float y
Definition: Vector2.h:50
float x
Definition: Vector2.h:49
Vector4 G3D::Vector2::yyyy ( ) const
214 { return Vector4 (y, y, y, y); }
float y
Definition: Vector2.h:50
const Vector2 & G3D::Vector2::zero ( )
static
67  {
68  static Vector2 v(0, 0);
69  return v;
70 }
Vector2()
Definition: Vector2.h:282

+ Here is the caller graph for this function:

Member Data Documentation

float G3D::Vector2::x
float G3D::Vector2::y

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