#include <Geometry.h>
Public Member Functions | |
kt_double | Distance (const Vector2 &rOther) const |
const T & | GetX () const |
const T & | GetY () const |
kt_double | Length () const |
void | MakeCeil (const Vector2 &rOther) |
void | MakeFloor (const Vector2 &rOther) |
kt_bool | operator!= (const Vector2 &rOther) const |
kt_double | operator* (const Vector2 &rOther) const |
const Vector2 | operator* (T scalar) const |
void | operator*= (T scalar) |
const Vector2 | operator+ (const Vector2 &rOther) const |
void | operator+= (const Vector2 &rOther) |
const Vector2 | operator- (const Vector2 &rOther) const |
const Vector2 | operator- (T scalar) const |
void | operator-= (const Vector2 &rOther) |
const Vector2 | operator/ (T scalar) const |
void | operator/= (T scalar) |
kt_bool | operator< (const Vector2 &rOther) const |
kt_bool | operator== (const Vector2 &rOther) const |
void | SetX (const T &x) |
void | SetY (const T &y) |
kt_double | SquaredDistance (const Vector2 &rOther) const |
kt_double | SquaredLength () const |
const String | ToString () const |
Vector2 () | |
Vector2 (T x, T y) | |
Private Attributes | |
T | m_Values [2] |
Friends | |
KARTO_FORCEINLINE std::ostream & | operator<< (std::ostream &rStream, const Vector2 &rVector) |
Represents a 2-dimensional vector (x, y)
Definition at line 323 of file Geometry.h.
|
inline |
Vector at the origin
Definition at line 329 of file Geometry.h.
|
inline |
|
inline |
Gets the distance to the given vector
rOther | vector |
Definition at line 443 of file Geometry.h.
|
inline |
Gets the x-coordinate of this vector
Definition at line 351 of file Geometry.h.
|
inline |
Gets the y-coordinate of this vector
Definition at line 369 of file Geometry.h.
|
inline |
Returns the length of the vector
Definition at line 423 of file Geometry.h.
|
inline |
|
inline |
|
inline |
Inequality operator
Definition at line 557 of file Geometry.h.
|
inline |
Vector dot-product
Definition at line 516 of file Geometry.h.
|
inline |
Scales the vector by the given scalar
Definition at line 524 of file Geometry.h.
|
inline |
In-place scalar multiplication
Definition at line 540 of file Geometry.h.
|
inline |
Vector addition
Definition at line 483 of file Geometry.h.
|
inline |
In-place vector addition
Definition at line 465 of file Geometry.h.
|
inline |
Vector subtraction
Definition at line 491 of file Geometry.h.
|
inline |
Subtract the vector by the given scalar
Definition at line 532 of file Geometry.h.
|
inline |
In-place vector subtraction
Definition at line 474 of file Geometry.h.
|
inline |
Divides a vector by the scalar
Definition at line 508 of file Geometry.h.
|
inline |
In-place scalar division
Definition at line 499 of file Geometry.h.
|
inline |
Less than operator
rOther | vector |
Definition at line 568 of file Geometry.h.
|
inline |
Equality operator
Definition at line 549 of file Geometry.h.
|
inline |
Sets the x-coordinate of this vector
x | the x-coordinate of the vector |
Definition at line 360 of file Geometry.h.
|
inline |
Sets the y-coordinate of this vector
y | the y-coordinate of the vector |
Definition at line 378 of file Geometry.h.
|
inline |
Returns the square of the distance to the given vector
rOther | vector |
Definition at line 433 of file Geometry.h.
|
inline |
Returns the square of the length of the vector
Definition at line 414 of file Geometry.h.
|
inline |
Returns a string representation of this vector
Definition at line 452 of file Geometry.h.
|
friend |
Write vector onto output stream
Definition at line 587 of file Geometry.h.
|
private |
Definition at line 594 of file Geometry.h.