GLC_Vector2df is a 2 dimensions Vector. More...
#include <glc_vector2df.h>
Public Member Functions | |
Constructor / Destructor | |
| GLC_Vector2df () | |
| GLC_Vector2df (const float &dX, const float &dY) | |
| Standard constructor With x, y = 0.0. | |
| GLC_Vector2df (const GLC_Vector2df &Vect) | |
Set Functions | |
| GLC_Vector2df & | setX (const float &dX) |
| X Compound. | |
| GLC_Vector2df & | setY (const float &dY) |
| Y Compound. | |
| GLC_Vector2df & | setVect (const float &dX, const float &dY) |
| All Compound. | |
| GLC_Vector2df & | setVect (const GLC_Vector2df &Vect) |
| From another Vector. | |
Get Functions | |
| float | X (void) const |
| Return X Compound. | |
| float | Y (void) const |
| Return Y Compound. | |
| const float * | return_dVect (void) const |
| Return a pointer to vector data. | |
| bool | isNull (void) const |
| Return true if the vector is null. | |
Private Attributes | |
| float | vector [2] |
Friends | |
| class | GLC_Vector2d |
GLC_Vector2df is a 2 dimensions Vector.
GLC_Vector2df is used to represent 2D position and vectors.
Definition at line 44 of file glc_vector2df.h.
| GLC_Vector2df::GLC_Vector2df | ( | ) | [inline] |
Default constructor Value is set to
X = 0.0
Y = 0.0
Definition at line 57 of file glc_vector2df.h.
| GLC_Vector2df::GLC_Vector2df | ( | const float & | dX, | |
| const float & | dY | |||
| ) | [inline] |
Standard constructor With x, y = 0.0.
Definition at line 64 of file glc_vector2df.h.
| GLC_Vector2df::GLC_Vector2df | ( | const GLC_Vector2df & | Vect | ) | [inline] |
Copy constructor Sample use
NewVect = new GLC_Vector2d(OldVect);
Definition at line 76 of file glc_vector2df.h.
References vector.
| bool GLC_Vector2df::isNull | ( | void | ) | const [inline] |
Return true if the vector is null.
Definition at line 141 of file glc_vector2df.h.
| const float* GLC_Vector2df::return_dVect | ( | void | ) | const [inline] |
Return a pointer to vector data.
Definition at line 136 of file glc_vector2df.h.
| GLC_Vector2df& GLC_Vector2df::setVect | ( | const GLC_Vector2df & | Vect | ) | [inline] |
| GLC_Vector2df& GLC_Vector2df::setVect | ( | const float & | dX, | |
| const float & | dY | |||
| ) | [inline] |
All Compound.
Definition at line 103 of file glc_vector2df.h.
| GLC_Vector2df& GLC_Vector2df::setX | ( | const float & | dX | ) | [inline] |
X Compound.
Definition at line 89 of file glc_vector2df.h.
| GLC_Vector2df& GLC_Vector2df::setY | ( | const float & | dY | ) | [inline] |
Y Compound.
Definition at line 96 of file glc_vector2df.h.
| float GLC_Vector2df::X | ( | void | ) | const [inline] |
Return X Compound.
Definition at line 126 of file glc_vector2df.h.
| float GLC_Vector2df::Y | ( | void | ) | const [inline] |
Return Y Compound.
Definition at line 131 of file glc_vector2df.h.
friend class GLC_Vector2d [friend] |
Definition at line 46 of file glc_vector2df.h.
float GLC_Vector2df::vector[2] [private] |
Vector array definition
vector[0] X
vector[1] Y
Definition at line 156 of file glc_vector2df.h.
Referenced by GLC_Vector2df(), GLC_Vector2d::operator=(), and setVect().