Defines a two-dimensional vector. More...
#include <Vector2.h>
Public Member Functions | |
Vector2 () | |
Constructs and initializes a two-dimensional vector instance to (0.0, 0.0). | |
Vector2 (const Vector2 &vector) | |
Constructs and initializes a two-dimensional vector from the specified two-dimensional vector. | |
Vector2 (float x, float y) | |
Constructs and initializes a two-dimensional vector from the specified xy-coordinates. | |
~Vector2 () | |
Destroys this two-dimensional vector instance. | |
bool | operator!= (const Vector2 &vector) const |
Tests this two-dimensional vector for inequality with the specified two-dimensional vector. | |
float | operator* (const Vector2 &vector) const |
Computes the dot product of this two-dimensional vector with the specified two-dimensional vector. | |
Vector2 | operator* (float s) const |
Computes the scalar multiplication of this two-dimensional vector with the specified scalar value. | |
Vector2 & | operator*= (float s) |
Sets the value of this two-dimensional vector to the scalar multiplication of itself with the specified scalar value. | |
Vector2 | operator+ (const Vector2 &vector) const |
Computes the vector sum of this two-dimensional vector with the specified two-dimensional vector. | |
Vector2 & | operator+= (const Vector2 &vector) |
Sets the value of this two-dimensional vector to the vector sum of itself with the specified two-dimensional vector. | |
Vector2 | operator- (const Vector2 &vector) const |
Computes the vector difference of this two-dimensional vector with the specified two-dimensional vector. | |
Vector2 | operator- () const |
Computes the negation of this two-dimensional vector. | |
Vector2 & | operator-= (const Vector2 &vector) |
Sets the value of this two-dimensional vector to the vector difference of itself with the specified two-dimensional vector. | |
Vector2 | operator/ (float s) const |
Computes the scalar division of this two-dimensional vector with the specified scalar value. | |
Vector2 & | operator/= (float s) |
Sets the value of this two-dimensional vector to the scalar division of itself with the specified scalar value. | |
bool | operator== (const Vector2 &vector) const |
Tests this two-dimensional vector for equality with the specified two-dimensional vector. | |
float | x () const |
Returns the x-coordinate of this two-dimensional vector. | |
float | y () const |
Returns the y-coordinate of this two-dimensional vector. |
Defines a two-dimensional vector.
RVO::Vector2::Vector2 | ( | ) | [inline] |
Constructs and initializes a two-dimensional vector instance to (0.0, 0.0).
RVO::Vector2::Vector2 | ( | const Vector2 & | vector | ) | [inline] |
Constructs and initializes a two-dimensional vector from the specified two-dimensional vector.
vector | The two-dimensional vector containing the xy-coordinates. |
RVO::Vector2::Vector2 | ( | float | x, | |
float | y | |||
) | [inline] |
Constructs and initializes a two-dimensional vector from the specified xy-coordinates.
x | The x-coordinate of the two-dimensional vector. | |
y | The y-coordinate of the two-dimensional vector. |
RVO::Vector2::~Vector2 | ( | ) | [inline] |
Destroys this two-dimensional vector instance.
bool RVO::Vector2::operator!= | ( | const Vector2 & | vector | ) | const [inline] |
Tests this two-dimensional vector for inequality with the specified two-dimensional vector.
vector | The two-dimensional vector with which to test for inequality. |
float RVO::Vector2::operator* | ( | const Vector2 & | vector | ) | const [inline] |
Computes the dot product of this two-dimensional vector with the specified two-dimensional vector.
vector | The two-dimensional vector with which the dot product should be computed. |
Vector2 RVO::Vector2::operator* | ( | float | s | ) | const [inline] |
Computes the scalar multiplication of this two-dimensional vector with the specified scalar value.
s | The scalar value with which the scalar multiplication should be computed. |
Vector2& RVO::Vector2::operator*= | ( | float | s | ) | [inline] |
Sets the value of this two-dimensional vector to the scalar multiplication of itself with the specified scalar value.
s | The scalar value with which the scalar multiplication should be computed. |
Computes the vector sum of this two-dimensional vector with the specified two-dimensional vector.
vector | The two-dimensional vector with which the vector sum should be computed. |
Sets the value of this two-dimensional vector to the vector sum of itself with the specified two-dimensional vector.
vector | The two-dimensional vector with which the vector sum should be computed. |
Computes the vector difference of this two-dimensional vector with the specified two-dimensional vector.
vector | The two-dimensional vector with which the vector difference should be computed. |
Vector2 RVO::Vector2::operator- | ( | ) | const [inline] |
Computes the negation of this two-dimensional vector.
Sets the value of this two-dimensional vector to the vector difference of itself with the specified two-dimensional vector.
vector | The two-dimensional vector with which the vector difference should be computed. |
Vector2 RVO::Vector2::operator/ | ( | float | s | ) | const [inline] |
Computes the scalar division of this two-dimensional vector with the specified scalar value.
s | The scalar value with which the scalar division should be computed. |
Vector2& RVO::Vector2::operator/= | ( | float | s | ) | [inline] |
Sets the value of this two-dimensional vector to the scalar division of itself with the specified scalar value.
s | The scalar value with which the scalar division should be computed. |
bool RVO::Vector2::operator== | ( | const Vector2 & | vector | ) | const [inline] |
Tests this two-dimensional vector for equality with the specified two-dimensional vector.
vector | The two-dimensional vector with which to test for equality. |
float RVO::Vector2::x | ( | ) | const [inline] |
Returns the x-coordinate of this two-dimensional vector.
float RVO::Vector2::y | ( | ) | const [inline] |
Returns the y-coordinate of this two-dimensional vector.