Page principale   Liste des namespaces   Hiérarchie des classes   Liste par ordre alphabétique   Liste des composants   Liste des fichiers   Membres des namespaces   Composants   Déclarations  

Référence de la classe ExCVec2D

#include <ExCVec2D.h>


Membres publics

 ExCVec2D ()
 ExCVec2D (float x, float y)
 ~ExCVec2D ()
float GetVectorLenght (void)
ExCVec2D GetVecNormale (void)
void SetValue (float x, float y)
void SetX (double val)
void SetY (double val)
double GetX (void)
double GetY (void)
ExCVec2D & operator= (const ExCVec2D &Vec)
bool operator== (const ExCVec2D &Vec)
ExCVec2D operator+ (const ExCVec2D &Vec)
ExCVec2D operator- (const ExCVec2D &Vec)
ExCVec2D operator * (const ExCVec2D &Vec)
ExCVec2D operator * (float scalar)
ExCVec2D operator/ (const ExCVec2D &Vec)
ExCVec2D operator/ (float scalar)

Attributs Publics

float m_Vector [2]

Amis (friends)

std::ostream & operator<< (std::ostream &s, const ExCVec2D &vec)


Documentation des contructeurs et destructeurs

ExCVec2D  
 

Définition à la ligne 28 du fichier ExCVec2D.cpp.

Références m_Vector.

00029 {
00030         m_Vector[0]=0;m_Vector[1]=0;
00031 }

ExCVec2D float    x,
float    y
 

Définition à la ligne 33 du fichier ExCVec2D.cpp.

Références m_Vector.

00034 {
00035         m_Vector[0]=x;m_Vector[1]=y;
00036 }

~ExCVec2D  
 

Définition à la ligne 38 du fichier ExCVec2D.cpp.

00039 {
00040 
00041 }


Documentation des méthodes

ExCVec2D GetVecNormale void   
 

Définition à la ligne 49 du fichier ExCVec2D.cpp.

Références GetVectorLenght().

00050 {
00051         ExCVec2D VecNorm;
00052         VecNorm=*this;
00053         VecNorm=*this/this->GetVectorLenght();
00054         return VecNorm;
00055 }

float GetVectorLenght void   
 

Définition à la ligne 45 du fichier ExCVec2D.cpp.

Références m_Vector.

Référencé par GetVecNormale().

00046 {
00047         return sqrt((m_Vector[0]*m_Vector[0])+(m_Vector[1]*m_Vector[1]));
00048 }

double GetX void    [inline]
 

Définition à la ligne 53 du fichier ExCVec2D.h.

Références m_Vector.

Référencé par ExCModel3DS::BuildList(), et ExCModelMD2::Draw().

00053 {return m_Vector[0];}

double GetY void    [inline]
 

Définition à la ligne 54 du fichier ExCVec2D.h.

Références m_Vector.

Référencé par ExCModel3DS::BuildList(), et ExCModelMD2::Draw().

00054 {return m_Vector[1];}

ExCVec2D operator * float    scalar
 

Définition à la ligne 99 du fichier ExCVec2D.cpp.

Références m_Vector.

00100 {
00101         ExCVec2D RetVec;
00102         RetVec.m_Vector[0]=m_Vector[0]*scalar;
00103         RetVec.m_Vector[1]=m_Vector[1]*scalar;
00104         return RetVec;
00105 }

ExCVec2D operator * const ExCVec2D &    Vec
 

Définition à la ligne 92 du fichier ExCVec2D.cpp.

Références m_Vector.

00093 {
00094         ExCVec2D RetVec;
00095         RetVec.m_Vector[0]=m_Vector[0]*Vec.m_Vector[0];
00096         RetVec.m_Vector[1]=m_Vector[1]*Vec.m_Vector[1];
00097         return RetVec;
00098 }

ExCVec2D operator+ const ExCVec2D &    Vec
 

Définition à la ligne 77 du fichier ExCVec2D.cpp.

Références m_Vector.

00078 {
00079         ExCVec2D RetVec;
00080         RetVec.m_Vector[0]=m_Vector[0]+Vec.m_Vector[0];
00081         RetVec.m_Vector[1]=m_Vector[1]+Vec.m_Vector[1];
00082         return RetVec;
00083 }

ExCVec2D operator- const ExCVec2D &    Vec
 

Définition à la ligne 85 du fichier ExCVec2D.cpp.

Références m_Vector.

00086 {
00087         ExCVec2D RetVec;
00088         RetVec.m_Vector[0]=m_Vector[0]-Vec.m_Vector[0];
00089         RetVec.m_Vector[1]=m_Vector[1]-Vec.m_Vector[1];
00090         return RetVec;
00091 }

ExCVec2D operator/ float    scalar
 

Définition à la ligne 113 du fichier ExCVec2D.cpp.

Références m_Vector.

00114 {
00115         ExCVec2D RetVec;
00116         RetVec.m_Vector[0]=m_Vector[0]/scalar;
00117         RetVec.m_Vector[1]=m_Vector[1]/scalar;
00118         return RetVec;
00119 }

ExCVec2D operator/ const ExCVec2D &    Vec
 

Définition à la ligne 106 du fichier ExCVec2D.cpp.

Références m_Vector.

00107 {
00108         ExCVec2D RetVec;
00109         RetVec.m_Vector[0]=m_Vector[0]/Vec.m_Vector[0];
00110         RetVec.m_Vector[1]=m_Vector[1]/Vec.m_Vector[1];
00111         return RetVec;
00112 }

ExCVec2D & operator= const ExCVec2D &    Vec
 

Définition à la ligne 65 du fichier ExCVec2D.cpp.

Références m_Vector.

00066 {
00067         m_Vector[0]=Vec.m_Vector[0];
00068         m_Vector[1]=Vec.m_Vector[1];
00069         return *this;
00070 }

bool operator== const ExCVec2D &    Vec
 

Définition à la ligne 71 du fichier ExCVec2D.cpp.

Références m_Vector.

00072 {
00073         if(m_Vector[0]==Vec.m_Vector[0]||m_Vector[1]==Vec.m_Vector[1]) return true;
00074         else return false;
00075 }

void SetValue float    x,
float    y
 

Définition à la ligne 56 du fichier ExCVec2D.cpp.

Références m_Vector.

00057 {
00058         m_Vector[0]=x;
00059         m_Vector[1]=y;
00060         
00061 }

void SetX double    val [inline]
 

Définition à la ligne 51 du fichier ExCVec2D.h.

Références m_Vector, et val.

Référencé par ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModelMD2::Load(), ExCModelASC::LoadFile(), et ExCModel3DS::ReadUVCoordinates().

00051 {m_Vector[0]=val;}

void SetY double    val [inline]
 

Définition à la ligne 52 du fichier ExCVec2D.h.

Références m_Vector, et val.

Référencé par ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModelMD2::Load(), ExCModelASC::LoadFile(), et ExCModel3DS::ReadUVCoordinates().

00052 {m_Vector[1]=val;}


Documentation des fonctions amies et associées

std::ostream& operator<< std::ostream &    s,
const ExCVec2D &    vec
[friend]
 

Définition à la ligne 122 du fichier ExCVec2D.cpp.

00123 {
00124         s<<"X:"<<(float)vec.m_Vector[0]<<" Y:"<<(float)vec.m_Vector[1];
00125         return s;
00126 }


Documentation des données imbriquées

float m_Vector[2]
 

Définition à la ligne 38 du fichier ExCVec2D.h.

Référencé par ExCVec2D(), GetVectorLenght(), GetX(), GetY(), operator *(), operator+(), operator-(), operator/(), operator<<(), operator=(), operator==(), SetValue(), SetX(), et SetY().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Dec 10 18:18:36 2002 pour ExNihilo par doxygen1.3-rc1