28 Position(
float x,
float y,
float z = 0);
279 std::ostream &operator<<(std::ostream &,
const Position &);
289 bool operator <(
Position const &position,
float value);
309 bool operator >(
Position const &position,
float value);
3 dimension Position class (x, y, z)
Definition: Position.hpp:19
Position()
Construct a new Position object from default values.
Definition: Position.cpp:20
Position operator*(float value)
Overload the * operator.
Definition: Position.cpp:92
Position operator+(float value)
Overload the + operator.
Definition: Position.cpp:60
float getX() const
get x value
Definition: Position.cpp:223
Position & operator+=(Position const &position)
Add to x, y, z respectively the x, y, z of the Position object sent as parameter.
Definition: Position.cpp:108
float getZ() const
get z value
Definition: Position.cpp:233
Vector2 getVector2() const
Get the Vector2 object from Position values.
Definition: Position.cpp:243
void reset()
reset x, y, z to 0
Definition: Position.cpp:211
Position operator-(float value)
Overload the - operator.
Definition: Position.cpp:76
void setY(float y)
set y value
Definition: Position.cpp:201
Position & operator/=(Position const &position)
divide to x, y, z respectively the x, y, z of the Position object sent as parameter
Definition: Position.cpp:156
Vector3 getVector3() const
Get the Vector3 object from Position values.
Definition: Position.cpp:238
Position & setFromArray(std::array< float, 3 > const &position)
Set x, y, z from other float array.
Definition: Position.cpp:36
void setZ(float z)
set z value
Definition: Position.cpp:206
void setX(float x)
set x value
Definition: Position.cpp:196
void setPosition(float x, float y)
Set the position.
Definition: Position.cpp:176
std::array< float, 3 > getPosition() const
Get x, y, z position in an array.
Definition: Position.cpp:218
Position & operator*=(Position const &position)
multiply to x, y, z respectively the x, y, z of the Position object sent as parameter
Definition: Position.cpp:140
Position & operator-=(Position const &position)
Substract to x, y, z respectively the x, y, z of the Position object sent as parameter.
Definition: Position.cpp:124
Position & operator=(Position const &position)
Set x, y, z from other Postition object.
Definition: Position.cpp:44
bool operator==(Position const &position)
Check if all positions are the same (x, y z)
Definition: Position.cpp:29
float getY() const
get y value
Definition: Position.cpp:228
~Position()
Destroy the Position object.
Definition: Position.cpp:25