30 void setXY(
float new_x,
float new_y);
int serialize(std::stringstream *p_ss) const
Serialize attributes to stream.
float m_x
Horizontal component.
Definition: Vector.h:15
float m_y
Vertical component.
Definition: Vector.h:16
bool operator!() const
Test if (0,0).
float getY() const
Get vertical component.
float getMagnitude() const
Return magnitude.
bool operator!=(const Vector &other) const
Compare Vector.
Vector operator-(const Vector &other) const
Subtract Vector.
void setX(float new_x)
Set horizontal component.
bool operator==(const Vector &other) const
Compare Vector.
void setY(float new_y)
Set vertical component.
Vector & operator+=(const Vector &other)
Add other Vector to this one.
std::string toString() const
Return attributes as string.
void scale(float s)
Scale vector.
void setXY(float new_x, float new_y)
Set horizizontal & vertical.
Vector(float init_x, float init_y)
Create Vector with (x,y).
float getX() const
Get horizontal component.
Vector()
Default is (0,0).
int deserialize(std::stringstream *p_ss)
Deserialize attributes from stream.
void normalize()
Normalize vector.
Vector operator+(const Vector &other) const
Add Vector.
An animation for a sprite.
Definition: Animation.h:15