|
LPCGame
A Simple 2d Game Engine
|
A 2D vector. More...
#include <vectors.h>
Public Member Functions | |
| Vector2 (T pX, T pY) | |
| void | Set (T pX, T pY) |
| void | Set (Vector2< T > &v) |
| Json::Value | Save () |
| void | Load (Json::Value val) |
| Vector2< T > | operator+ (Vector2< T > val) const |
| Operators. | |
| Vector2< T > | operator- (Vector2< T > val) const |
| Vector2< T > & | operator+= (Vector2< T > val) |
| bool | operator== (Vector2< T > val) const |
| Vector2< T > | operator* (Vector2< T > val) const |
| Vector2< T > | operator* (float val) const |
| Vector2< T > | operator/ (Vector2< T > val) const |
| Vector2< T > | operator/ (float val) const |
| operator Vector2< int > () const | |
| Conversions. | |
| operator Vector2< float > () const | |
| operator Vector2< double > () const | |
| operator SDL_Point () const | |
| operator std::string () const | |
Public Attributes | |
| T | x |
| T | y |
A 2D vector.
A 2D vector
Setup the vector with an x & y value
| pX | The x value to set |
| pY | The y value to set |
|
inline |
Load the vector from a Json::Value
| val | The Json::Value to load from |
|
inline |
Save the vector to a Json::Value
|
inline |
Setup the vector with an x & y value
| pX | The x value to set |
| pY | The y value to set |
Set the vector with the same values as another vector
| v | the vector to get vals from |