karto::Vector2< T > Class Template Reference
#include <Karto.h>
List of all members.
Detailed Description
template<typename T>
class karto::Vector2< T >
Definition at line 863 of file Karto.h.
Constructor & Destructor Documentation
Default constructor
Definition at line 869 of file Karto.h.
Constructor initializing vector location
- Parameters:
-
Definition at line 880 of file Karto.h.
Member Function Documentation
Gets the distance to the other vector2
- Parameters:
-
- Returns:
- distance to other vector2
Definition at line 975 of file Karto.h.
Gets the x-coordinate of this vector2
- Returns:
- the x-coordinate of the vector2
Definition at line 891 of file Karto.h.
Gets the y-coordinate of this vector2
- Returns:
- the y-coordinate of the vector2
Definition at line 909 of file Karto.h.
Returns the length of the vector (x and y).
- Returns:
- length of the vector
Definition at line 956 of file Karto.h.
Ceiling point operator
- Parameters:
-
Definition at line 937 of file Karto.h.
Floor point operator
- Parameters:
-
Definition at line 927 of file Karto.h.
Inequality operator returns true if any of the corresponding x, y values of each Vector2 not the same.
- Parameters:
-
Definition at line 1090 of file Karto.h.
Scales the vector by the given scalar
- Parameters:
-
Definition at line 1053 of file Karto.h.
Computes the dot product between the two vectors
- Parameters:
-
- Returns:
- dot product
Definition at line 1044 of file Karto.h.
In place scalar multiplication operator
- Parameters:
-
Definition at line 1071 of file Karto.h.
Addition operator
- Parameters:
-
- Returns:
- vector resulting from adding this vector with the given vector
Definition at line 1004 of file Karto.h.
Subtract the vector by the given scalar
- Parameters:
-
Definition at line 1062 of file Karto.h.
Subtraction operator
- Parameters:
-
- Returns:
- vector resulting from subtracting this vector from the given vector
Definition at line 1014 of file Karto.h.
Divides a Vector2
- Parameters:
-
- Returns:
- scalar product
Definition at line 1034 of file Karto.h.
In place scalar division operator
- Parameters:
-
Definition at line 1023 of file Karto.h.
Less than operator
- Parameters:
-
- Returns:
- true if left vector is less than right vector
Definition at line 1100 of file Karto.h.
Equality operator returns true if the corresponding x, y values of each Vector2 are the same values.
- Parameters:
-
Definition at line 1081 of file Karto.h.
Sets the x-coordinate of this vector2
- Parameters:
-
| x | the x-coordinate of the vector2 |
Definition at line 900 of file Karto.h.
Sets the y-coordinate of this vector2
- Parameters:
-
| y | the y-coordinate of the vector2 |
Definition at line 918 of file Karto.h.
Returns the square distance to the given vector
- Returns:
- square distance to the given vector
Definition at line 965 of file Karto.h.
Returns the square of the length of the vector
- Returns:
- square of the length of the vector
Definition at line 947 of file Karto.h.
Friends And Related Function Documentation
template<typename T>
std::ostream& operator<< |
( |
std::ostream & |
rStream, |
|
|
const Vector2< T > & |
rVector | |
|
) |
| | [friend] |
Write Vector2 onto output stream
- Parameters:
-
| rStream | output stream |
| rVector | to write |
Definition at line 1115 of file Karto.h.
template<typename T>
std::istream& operator>> |
( |
std::istream & |
rStream, |
|
|
const Vector2< T > & |
| |
|
) |
| | [friend] |
Read Vector2 from input stream
- Parameters:
-
| rStream | input stream |
| rVector | to read |
Definition at line 1126 of file Karto.h.
Member Data Documentation
The documentation for this class was generated from the following file: