#include <vector2.h>
List of all members.
Detailed Description
Defines a two-dimensional vector and its operations.
Constructor & Destructor Documentation
RVO::Vector2::Vector2 |
( |
|
) |
[inline] |
Constructs a null vector.
RVO::Vector2::Vector2 |
( |
const Vector2 & |
q |
) |
[inline] |
Copy constructor.
- Parameters:
-
| q | The vector to be copied into the new vector. |
RVO::Vector2::Vector2 |
( |
float |
x, |
|
|
float |
y | |
|
) |
| | [inline] |
Constructor.
- Parameters:
-
| x | The x-component of the new vector. |
| y | The y-component of the new vector. |
Member Function Documentation
bool RVO::Vector2::operator!= |
( |
const Vector2 & |
q |
) |
const [inline] |
Vector inequality.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- True if the lhs vector and the rhs vector are not equal. False otherwise.
float RVO::Vector2::operator* |
( |
const Vector2 & |
q |
) |
const [inline] |
Dot product.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- The dot product of the lhs vector and the rhs vector.
Vector2 RVO::Vector2::operator* |
( |
float |
a |
) |
const [inline] |
Scalar product.
- Parameters:
-
| a | The right hand side scalar |
- Returns:
- The scalar product of the lhs vector and the rhs scalar.
Vector2& RVO::Vector2::operator*= |
( |
float |
a |
) |
[inline] |
The operator multiplies the vector by a scalar.
- Parameters:
-
- Returns:
- A reference to the vector.
Vector addition.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- The sum of the lhs vector and the rhs vector.
const Vector2& RVO::Vector2::operator+ |
( |
|
) |
const [inline] |
Unary plus.
- Returns:
- A reference to the vector.
The operator adds an rhs vector to the vector.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- A reference to the vector.
Vector subtraction.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- The vector difference of the lhs vector and the rhs vector.
Vector2 RVO::Vector2::operator- |
( |
|
) |
const [inline] |
Unary minus.
- Returns:
- The negation of the vector.
The operator subtracts an rhs vector from the vector.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- A reference to the vector.
Vector2 RVO::Vector2::operator/ |
( |
float |
a |
) |
const [inline] |
Scalar division.
- Parameters:
-
| a | The right hand side scalar |
- Returns:
- The scalar division of the lhs vector and the rhs scalar.
Vector2& RVO::Vector2::operator/= |
( |
float |
a |
) |
[inline] |
The operator divides the vector by a scalar.
- Parameters:
-
- Returns:
- A reference to the vector.
bool RVO::Vector2::operator== |
( |
const Vector2 & |
q |
) |
const [inline] |
Vector equality.
- Parameters:
-
| q | The right hand side vector |
- Returns:
- True if the lhs vector and the rhs vector are equal. False otherwise.
float RVO::Vector2::x |
( |
|
) |
const [inline] |
- Returns:
- The x-component of the vector.
float RVO::Vector2::y |
( |
|
) |
const [inline] |
- Returns:
- The y-component of the vector.