This is used to represent a point on a 2 dimentional area, such as a screen. More...
#include <vector2.h>
Public Member Functions | |
Vector2 () | |
Default Constructor. | |
Vector2 (const Real &xy) | |
Single Real value Constructor. More... | |
Vector2 (const Real &x, const Real &y) | |
Real value Constructor. More... | |
Vector2 (const Ogre::Vector2 &Vec) | |
Ogre Value Constructor. More... | |
void | ExtractOgreVector2 (const Ogre::Vector2 &Thiers) |
Copies an existing Ogre vector2. More... | |
Ogre::Vector2 | GetOgreVector2 () const |
Gets a Ogre vector2. More... | |
Vector2 & | Normalize () |
Normalizes this Vector2. More... | |
Boolean | operator!= (const Mezzanine::Vector2 &Vec2) const |
Equality Comparison Operator. More... | |
Boolean | operator!= (const Ogre::Vector2 &Vec2) const |
Equality Comparison Operator. More... | |
Vector2 | operator* (const Real &scalar) const |
Scaling by multiplication. More... | |
Vector2 | operator* (const Vector2 &Vec2) const |
Multiplaction Operator. More... | |
Vector2 & | operator*= (const Real &scalar) |
Scaling by multiplication. More... | |
Vector2 & | operator*= (const Vector2 &Vec2) |
Multiplaction assignment Operator. More... | |
Vector2 | operator+ (const Vector2 &Vec2) const |
Addition Operator. More... | |
Vector2 & | operator+= (const Vector2 &Vec2) |
Addition assignment Operator. More... | |
Vector2 | operator- (const Vector2 &Vec2) const |
Subraction Operator. More... | |
Vector2 & | operator-= (const Vector2 &Vec2) |
Subraction assignment Operator. More... | |
Vector2 | operator/ (const Real &scalar) const |
Scaling by Division. More... | |
Vector2 | operator/ (const Vector2 &Vec2) const |
Division Operator. More... | |
Vector2 & | operator/= (const Real &scalar) |
Scaling by Division. More... | |
Vector2 & | operator/= (const Vector2 &Vec2) |
Division assignment Operator. More... | |
Boolean | operator<= (const Mezzanine::Vector2 &Vec) const |
Less or Equal Comparison Operator. More... | |
Boolean | operator== (const Mezzanine::Vector2 &Vec2) const |
Equality Comparison Operator. More... | |
Boolean | operator== (const Ogre::Vector2 &Vec2) const |
Equality Comparison Operator. More... | |
Boolean | operator>= (const Mezzanine::Vector2 &Vec) const |
Greater than or Equal Comparison Operator. More... | |
Vector2 | Perpendicular () const |
Generates a Vector2 that is perpendicular to this vector. More... | |
void | ProtoDeSerialize (const XML::Node &OneNode) |
Take the data stored in an XML and overwrite this instance of this object with it. More... | |
void | ProtoSerialize (XML::Node &CurrentRoot) const |
Convert this class to an XML::Node ready for serialization. More... | |
void | SetIdentity () |
Sets the values of this vector2 to identity values(0,0). | |
void | SetValues (const Real &x, const Real &y) |
Sets the X and Y values of this vector2. More... | |
Static Public Member Functions | |
static String | SerializableName () |
Get the name of the the XML tag this class will leave behind as its instances are serialized. More... | |
Public Attributes | |
Real | X |
Coordinate on the X vector. | |
Real | Y |
Coordinate on the Y vector. | |
This is used to represent a point on a 2 dimentional area, such as a screen.
This contains an X and Y value used to represent coordinates. This also has a number of facilities to make converting to graphics subsystems as easy as possible.
Mezzanine::Vector2::Vector2 | ( | const Real & | xy) |
Single Real value Constructor.
xy | Value to set both x and y to. |
Definition at line 58 of file vector2.cpp.
Real value Constructor.
x | Coordinate on the X vector. |
y | Coordinate on the Y vector. |
Definition at line 61 of file vector2.cpp.
Mezzanine::Vector2::Vector2 | ( | const Ogre::Vector2 & | Vec) |
Ogre Value Constructor.
Vec | The vector to be copied to make this vector. |
Definition at line 64 of file vector2.cpp.
void Mezzanine::Vector2::ExtractOgreVector2 | ( | const Ogre::Vector2 & | Thiers) |
Copies an existing Ogre vector2.
Thiers | The vector2 to be extracted. |
Definition at line 75 of file vector2.cpp.
Ogre::Vector2 Mezzanine::Vector2::GetOgreVector2 | ( | ) | const |
Gets a Ogre vector2.
Definition at line 67 of file vector2.cpp.
Vector2 & Mezzanine::Vector2::Normalize | ( | ) |
Normalizes this Vector2.
Definition at line 224 of file vector2.cpp.
Boolean Mezzanine::Vector2::operator!= | ( | const Mezzanine::Vector2 & | Vec2) | const |
Equality Comparison Operator.
Vec2 | This is the other Mezzanine::Vector2. |
Definition at line 102 of file vector2.cpp.
Boolean Mezzanine::Vector2::operator!= | ( | const Ogre::Vector2 & | Vec2) | const |
Equality Comparison Operator.
Vec2 | This is the other Ogre::Vector2. |
Definition at line 108 of file vector2.cpp.
Scaling by multiplication.
scalar | This is the amount to scale the Vector2 by. |
Definition at line 120 of file vector2.cpp.
Multiplaction Operator.
Vec2 | The other Vector2 to multiply by this. |
Definition at line 172 of file vector2.cpp.
Scaling by multiplication.
scalar | This is the amount to scale the Vector2 by. |
Definition at line 139 of file vector2.cpp.
Multiplaction assignment Operator.
Vec2 | The other Vector2 to multiply by this. |
Definition at line 202 of file vector2.cpp.
Addition Operator.
Vec2 | The other Vector2 to add to this. |
Definition at line 156 of file vector2.cpp.
Addition assignment Operator.
Vec2 | The other Vector2 to add to this. |
Definition at line 188 of file vector2.cpp.
Subraction Operator.
Vec2 | The other Vector2 to subtract from this. |
Definition at line 164 of file vector2.cpp.
Subraction assignment Operator.
Vec2 | The other Vector2 to subtract from this. |
Definition at line 195 of file vector2.cpp.
Scaling by Division.
scalar | This is the amount to scale the Vector2 by. |
Definition at line 128 of file vector2.cpp.
Division Operator.
Vec2 | The other Vector2 to divide by. |
Definition at line 180 of file vector2.cpp.
Scaling by Division.
scalar | This is the amount to scale the Vector2 by. |
Definition at line 146 of file vector2.cpp.
Division assignment Operator.
Vec2 | The other Vector2 to divide by. |
Definition at line 209 of file vector2.cpp.
Boolean Mezzanine::Vector2::operator<= | ( | const Mezzanine::Vector2 & | Vec) | const |
Less or Equal Comparison Operator.
Returns true if X<=X and Y<=Y. If any of those do not hold this returns false.
Vec | This is the other Mezzanine::Vector2. |
Definition at line 111 of file vector2.cpp.
Boolean Mezzanine::Vector2::operator== | ( | const Mezzanine::Vector2 & | Vec2) | const |
Equality Comparison Operator.
Vec2 | This is the other Mezzanine::Vector2 to compare with. |
Definition at line 99 of file vector2.cpp.
Boolean Mezzanine::Vector2::operator== | ( | const Ogre::Vector2 & | Vec2) | const |
Equality Comparison Operator.
Vec2 | This is the other Ogre::Vector2. |
Definition at line 105 of file vector2.cpp.
Boolean Mezzanine::Vector2::operator>= | ( | const Mezzanine::Vector2 & | Vec) | const |
Greater than or Equal Comparison Operator.
Returns true if X>=X and Y>=Y . If any of those do not hold this returns false.
Vec | This is the other Mezzanine::Vector2. |
Definition at line 114 of file vector2.cpp.
Vector2 Mezzanine::Vector2::Perpendicular | ( | ) | const |
Generates a Vector2 that is perpendicular to this vector.
Definition at line 219 of file vector2.cpp.
void Mezzanine::Vector2::ProtoDeSerialize | ( | const XML::Node & | OneNode) |
Take the data stored in an XML and overwrite this instance of this object with it.
OneNode | and XML::Node containing the data. |
Definition at line 262 of file vector2.cpp.
void Mezzanine::Vector2::ProtoSerialize | ( | XML::Node & | CurrentRoot) | const |
Convert this class to an XML::Node ready for serialization.
CurrentRoot | The point in the XML hierarchy that all this vector2 should be appended to. |
Definition at line 241 of file vector2.cpp.
|
static |
Get the name of the the XML tag this class will leave behind as its instances are serialized.
Definition at line 278 of file vector2.cpp.
Sets the X and Y values of this vector2.
x | The real that will have this vector's X member set to. |
y | The real that will have this vector's Y member set to. |
Definition at line 90 of file vector2.cpp.