SmartFoxServer 2X C++ API
|
The Vec3D object represents a position in a 2D or 3D space. More...
#include <Vec3D.h>
Public Member Functions | |
Vec3D (long int px, long int py, long int pz) | |
Creates a new Vec3D instance for a 3D coordinates system with integer values. More... | |
Vec3D (long int px, long int py) | |
Creates a new Vec3D instance for a 2D coordinates system with integer values. More... | |
Vec3D (float px, float py, float pz) | |
Creates a new Vec3D instance for a 3D coordinates system with float values. More... | |
Vec3D (float px, float py) | |
Creates a new Vec3D instance for a 2D coordinates system with float values. More... | |
bool | IsFloat () |
Indicates whether the position is expressed using floating point values or not. More... | |
float | FloatX () |
Returns the position along the X axis as a float value. More... | |
float | FloatY () |
Returns the position along the Y axis as a float value. More... | |
float | FloatZ () |
Returns the position along the Z axis as a float value. More... | |
long int | IntX () |
Returns the position along the X axis as an integer value. More... | |
long int | IntY () |
Returns the position along the Y axis as an integer value. More... | |
long int | IntZ () |
Returns the position along the Z axis as an integer value. More... | |
boost::shared_ptr< vector< long int > > | ToIntArray () |
<exclude> | |
boost::shared_ptr< vector< float > > | ToFloatArray () |
<exclude> | |
boost::shared_ptr< string > | ToString () |
<exclude> | |
Static Public Member Functions | |
static boost::shared_ptr< Vec3D > | fromArray (long int tp, boost::shared_ptr< void > array) |
<exclude> | |
The Vec3D object represents a position in a 2D or 3D space.
This class is used to express a position inside a virtual environment with no specific unit of measure (could be pixels, feet, meters, etc).
Positions along the X,Y,Z axes can be expressed as Integers or Floats, based on the game's coordinate system requirements.
Sfs2X::Entities::Data::Vec3D::Vec3D | ( | long int | px, |
long int | py, | ||
long int | pz | ||
) |
Creates a new Vec3D instance for a 3D coordinates system with integer values.
px | The position along the X axis. |
py | The position along the Y axis. |
pz | The position along the Z axis. |
Sfs2X::Entities::Data::Vec3D::Vec3D | ( | long int | px, |
long int | py | ||
) |
Creates a new Vec3D instance for a 2D coordinates system with integer values.
px | The position along the X axis. |
py | The position along the Y axis. |
Sfs2X::Entities::Data::Vec3D::Vec3D | ( | float | px, |
float | py, | ||
float | pz | ||
) |
Creates a new Vec3D instance for a 3D coordinates system with float values.
px | The position along the X axis. |
py | The position along the Y axis. |
pz | The position along the Z axis. |
Sfs2X::Entities::Data::Vec3D::Vec3D | ( | float | px, |
float | py | ||
) |
Creates a new Vec3D instance for a 2D coordinates system with float values.
px | The position along the X axis. |
py | The position along the Y axis. |
float Sfs2X::Entities::Data::Vec3D::FloatX | ( | ) |
Returns the position along the X axis as a float value.
float Sfs2X::Entities::Data::Vec3D::FloatY | ( | ) |
Returns the position along the Y axis as a float value.
float Sfs2X::Entities::Data::Vec3D::FloatZ | ( | ) |
Returns the position along the Z axis as a float value.
long int Sfs2X::Entities::Data::Vec3D::IntX | ( | ) |
Returns the position along the X axis as an integer value.
long int Sfs2X::Entities::Data::Vec3D::IntY | ( | ) |
Returns the position along the Y axis as an integer value.
long int Sfs2X::Entities::Data::Vec3D::IntZ | ( | ) |
Returns the position along the Z axis as an integer value.
bool Sfs2X::Entities::Data::Vec3D::IsFloat | ( | ) |
Indicates whether the position is expressed using floating point values or not.
true
if the position is expressed using floating point values.