2D vector 2 class
More...
#include <tdme/math/Vector2.h>
2D vector 2 class
- Author
- Andreas Drewke
- Version
- $Id$
Definition at line 18 of file Vector2.h.
◆ Vector2() [1/4]
Public constructor.
Definition at line 29 of file Vector2.h.
◆ Vector2() [2/4]
Public constructor.
- Parameters
-
Definition at line 38 of file Vector2.h.
◆ Vector2() [3/4]
Vector2 |
( |
const array< float, 2 > & |
v | ) |
|
|
inline |
Public constructor.
- Parameters
-
Definition at line 47 of file Vector2.h.
◆ Vector2() [4/4]
Public constructor.
- Parameters
-
Definition at line 55 of file Vector2.h.
◆ add()
Adds a vector.
- Parameters
-
- Returns
- this vector
Definition at line 129 of file Vector2.h.
◆ clone()
Clones the vector.
- Returns
- new cloned vector
Definition at line 338 of file Vector2.h.
◆ computeLength()
float computeLength |
( |
| ) |
const |
|
inline |
- Returns
- the vectors length
Definition at line 171 of file Vector2.h.
◆ equals() [1/2]
bool equals |
( |
const Vector2 & |
v | ) |
const |
|
inline |
Compares this vector with given vector.
- Parameters
-
- Returns
- equality
Definition at line 347 of file Vector2.h.
◆ equals() [2/2]
bool equals |
( |
const Vector2 & |
v, |
|
|
float |
tolerance |
|
) |
| const |
|
inline |
Compares this vector with given vector.
- Parameters
-
v | vector v |
tolerance | tolerance per component(x, y, z) |
- Returns
- equality
Definition at line 357 of file Vector2.h.
◆ getArray()
array< float, 2 > & getArray |
( |
| ) |
const |
|
inline |
- Returns
- vector as array
Definition at line 330 of file Vector2.h.
◆ getX()
◆ getY()
◆ operator!=()
bool operator!= |
( |
const Vector2 & |
v | ) |
const |
|
inline |
Non equality comparison operator.
- Parameters
-
- Returns
- non equality
Definition at line 323 of file Vector2.h.
◆ operator*() [1/2]
Vector2 operator* |
( |
const float |
f | ) |
const |
|
inline |
Operator * (float)
- Parameters
-
- Returns
- new vector (this * f)
Definition at line 218 of file Vector2.h.
◆ operator*() [2/2]
Operator * (Vector2&)
- Parameters
-
- Returns
- new vector (this * v)
Definition at line 228 of file Vector2.h.
◆ operator*=() [1/2]
Vector2 & operator*= |
( |
const float |
f | ) |
|
|
inline |
Operator *=.
- Parameters
-
- Returns
- this vector multiplied by f
Definition at line 296 of file Vector2.h.
◆ operator*=() [2/2]
Operator *=.
- Parameters
-
- Returns
- this vector multiplied by v
Definition at line 277 of file Vector2.h.
◆ operator+()
Operator +.
- Parameters
-
- Returns
- new vector (this + v)
Definition at line 198 of file Vector2.h.
◆ operator+=()
Operator +=.
- Parameters
-
- Returns
- this vector added by v
Definition at line 259 of file Vector2.h.
◆ operator-()
Operator -.
- Parameters
-
- Returns
- new vector (this - v)
Definition at line 208 of file Vector2.h.
◆ operator-=()
Operator -=.
- Parameters
-
- Returns
- this vector substracted by v
Definition at line 268 of file Vector2.h.
◆ operator/() [1/2]
Vector2 operator/ |
( |
const float |
f | ) |
const |
|
inline |
Operator / (f)
- Parameters
-
- Returns
- new vector (this / f)
Definition at line 238 of file Vector2.h.
◆ operator/() [2/2]
Operator / (Vector2&)
- Parameters
-
- Returns
- new vector (this / v)
Definition at line 248 of file Vector2.h.
◆ operator/=() [1/2]
Vector2 & operator/= |
( |
const float |
f | ) |
|
|
inline |
Operator /=.
- Parameters
-
- Returns
- this vector divided by f
Definition at line 305 of file Vector2.h.
◆ operator/=() [2/2]
Operator /=.
- Parameters
-
- Returns
- this vector devided by v
Definition at line 286 of file Vector2.h.
◆ operator==()
bool operator== |
( |
const Vector2 & |
v | ) |
const |
|
inline |
Equality comparison operator.
- Parameters
-
- Returns
- equality
Definition at line 314 of file Vector2.h.
◆ operator[]() [1/2]
float & operator[] |
( |
int |
i | ) |
|
|
inline |
Array access operator.
- Parameters
-
- Returns
- vector3 component
Definition at line 180 of file Vector2.h.
◆ operator[]() [2/2]
const float & operator[] |
( |
int |
i | ) |
const |
|
inline |
Const array access operator.
- Parameters
-
- Returns
- vector3 component
Definition at line 189 of file Vector2.h.
◆ scale() [1/2]
Vector2 & scale |
( |
const float |
scale | ) |
|
|
inline |
Scale this vector.
- Parameters
-
- Returns
- this vector
Definition at line 151 of file Vector2.h.
◆ scale() [2/2]
Scale this vector.
- Parameters
-
- Returns
- this vector
Definition at line 162 of file Vector2.h.
◆ set() [1/3]
Vector2 & set |
( |
const array< float, 2 > & |
v | ) |
|
|
inline |
Set up vector.
- Parameters
-
v | float array containing x,y values |
- Returns
- this vector
Definition at line 76 of file Vector2.h.
◆ set() [2/3]
Set up vector.
- Parameters
-
- Returns
- this vector
Definition at line 86 of file Vector2.h.
◆ set() [3/3]
Set up vector.
- Parameters
-
- Returns
- this vector
Definition at line 65 of file Vector2.h.
◆ setX()
set X
- Parameters
-
- Returns
- this vector
Definition at line 103 of file Vector2.h.
◆ setY()
◆ sub()
Subtracts a vector.
- Parameters
-
- Returns
- this vector
Definition at line 140 of file Vector2.h.
◆ Matrix2D3x3
◆ data
The documentation for this class was generated from the following file:
- /home/andreas/Development/drewke.net/tdme2/src/tdme/math/Vector2.h