GLC_lib
2.5.0
|
GLC_Vector2d is a 2 dimensions Vector. More...
#include <glc_vector2d.h>
Public Member Functions | |
Constructor / Destructor | |
GLC_Vector2d () | |
GLC_Vector2d (const double &dX, const double &dY) | |
GLC_Vector2d (const GLC_Vector2d &Vect) | |
Copy constructor. | |
QPointF | toQPointF () const |
Return the QPointF of this GLC_Vector. | |
Operator Overload | |
GLC_Vector2d | operator+ (const GLC_Vector2d &Vect) const |
GLC_Vector2d & | operator= (const GLC_Vector2d &Vect) |
GLC_Vector2d & | operator= (const GLC_Vector2df &Vect) |
GLC_Vector2d * | operator+= (const GLC_Vector2d &Vect) |
GLC_Vector2d | operator- (const GLC_Vector2d &Vect) const |
GLC_Vector2d * | operator-= (const GLC_Vector2d &Vect) |
double | operator^ (const GLC_Vector2d &Vect) const |
double | operator* (const GLC_Vector2d &Vect) const |
double | operator/ (const GLC_Vector2d &Vect) const |
GLC_Vector2d | operator* (double Scalaire) const |
GLC_Vector2d | operator/ (double Scalaire) const |
bool | operator== (const GLC_Vector2d &Vect) const |
bool | operator!= (const GLC_Vector2d &Vect) const |
Set Functions | |
GLC_Vector2d & | setX (const double &dX) |
GLC_Vector2d & | setY (const double &dY) |
GLC_Vector2d & | setVect (const double &dX, const double &dY) |
GLC_Vector2d & | setVect (const GLC_Vector2d &Vect) |
GLC_Vector2d & | setLength (double) |
Set vector lenght from the given scalar and return a reference of this vector. | |
GLC_Vector2d & | normalize () |
Normalize this vector and return a reference to it. | |
Get Functions | |
double | x (void) const |
double | y (void) const |
const double * | return_dVect (void) const |
bool | isNull (void) const |
QString | toString () const |
return the string representation of vector | |
GLC_Vector2d | perp () const |
Return a vector perpendicular to this. | |
double | length () const |
Return the length of this vector. | |
Private Attributes | |
double | m_Vector [2] |
Friends | |
class | GLC_Vector4d |
class | GLC_Vector3d |
GLC_Vector2d | operator- (const GLC_Vector2d &Vect) |
GLC_Vector2d is a 2 dimensions Vector.
GLC_Vector2d is used to represent 2D position and vectors.
Definition at line 47 of file glc_vector2d.h.
|
inline |
Default constructor Value is set to
X = 0.0
Y = 0.0
Definition at line 69 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
Standard constructor With x, y = 0.0
Definition at line 76 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
Copy constructor.
Definition at line 83 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Return true if the vector is null
Definition at line 259 of file glc_vector2d.h.
References glc::EPSILON, and GLC_Vector3d::m_Vector.
Referenced by GLC_TsrMover::move().
|
inline |
Return the length of this vector.
Definition at line 271 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
Normalize this vector and return a reference to it.
Definition at line 236 of file glc_vector2d.h.
References GLC_Vector3d::setLength().
|
inline |
Overload "!=" operator
Definition at line 190 of file glc_vector2d.h.
|
inline |
Overload scalar product "*" operator between 2 vector
Definition at line 157 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Overload scalar product "*" operator between 1 vector and one scalar
Definition at line 169 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
Overload binary "+" operator
Definition at line 101 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Overload "+=" operator
Definition at line 128 of file glc_vector2d.h.
|
inline |
Overload binary "-" operator
Definition at line 136 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Overload binary "-=" operator
Definition at line 144 of file glc_vector2d.h.
|
inline |
Overload scalar division "/" operator between 2 vector
Definition at line 163 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Overload scalar division "/" operator between 1 vector and one scalar
Definition at line 175 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
Overload "=" operator
Definition at line 109 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Overload "=" operator
Definition at line 118 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and GLC_Vector2df::vector.
|
inline |
Overload equality "==" operator
Definition at line 181 of file glc_vector2d.h.
References glc::EPSILON, GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Overload dot product "^" operator
Definition at line 151 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
Return a vector perpendicular to this.
Definition at line 267 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
retourne un pointeur constant vers le tableau du vecteur.
Definition at line 255 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
Set vector lenght from the given scalar and return a reference of this vector.
Definition at line 291 of file glc_vector2d.h.
References m_Vector.
|
inline |
All Composante
Definition at line 217 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
Referenced by GLC_Vector3d::toVector2d().
|
inline |
From another Vector
Definition at line 225 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector, and m_Vector.
|
inline |
X Composante
Definition at line 203 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
Referenced by glc::normalyzePolygon(), and GLC_Vector3d::toVector2d().
|
inline |
Y Composante
Definition at line 210 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
Referenced by GLC_Viewport::mapNormalyzeToOpenGLScreen(), glc::normalyzePolygon(), and GLC_Vector3d::toVector2d().
|
inline |
Return the QPointF of this GLC_Vector.
Definition at line 90 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
return the string representation of vector
Definition at line 263 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
|
inline |
X Component
Definition at line 247 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
Referenced by GLC_ExtrudedMesh::basedOutlineFacesTexels(), GLC_ExtrudedMesh::baseFaceTexels(), glc::compare(), GLC_ExtrudedMesh::createdFaceTexels(), GLC_ExtrudedMesh::createdOutlineFacesTexels(), GLC_RepFlyMover::createRepresentation(), glc::findIntersection(), GLC_Vector3d::GLC_Vector3d(), glc::isIntersected(), glc::isIntersectedRaySegment(), GLC_Viewport::mapToOpenGLScreen(), GLC_TsrMover::move(), glc::normalyzePolygon(), glc::perpVector(), glc::pointInPolygon(), and glc::round().
|
inline |
Y Component
Definition at line 251 of file glc_vector2d.h.
References GLC_Vector3d::m_Vector.
Referenced by GLC_ExtrudedMesh::basedOutlineFacesTexels(), GLC_ExtrudedMesh::baseFaceTexels(), glc::compare(), GLC_ExtrudedMesh::createdFaceTexels(), GLC_ExtrudedMesh::createdOutlineFacesTexels(), GLC_RepFlyMover::createRepresentation(), glc::findIntersection(), GLC_Vector3d::GLC_Vector3d(), glc::isIntersected(), glc::isIntersectedRaySegment(), GLC_Viewport::mapNormalyzeToOpenGLScreen(), GLC_Viewport::mapToOpenGLScreen(), GLC_TsrMover::move(), glc::normalyzePolygon(), glc::perpVector(), glc::pointInPolygon(), and glc::round().
|
friend |
Definition at line 50 of file glc_vector2d.h.
|
friend |
Definition at line 49 of file glc_vector2d.h.
|
friend |
Overload unary "-" operator
Definition at line 53 of file glc_vector2d.h.
|
private |
Vector array definition
vector[0] X
vector[1] Y
Definition at line 284 of file glc_vector2d.h.
Referenced by GLC_Vector2d(), GLC_Vector4d::GLC_Vector4d(), operator*(), operator+(), operator-(), operator/(), operator=(), GLC_Vector4d::operator=(), operator==(), operator^(), setLength(), and setVect().