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

Référence de la classe ExCVec3D

#include <ExCVec3D.h>


Membres publics

 ExCVec3D ()
 ExCVec3D (float x, float y, float z)
 ~ExCVec3D ()
float GetVectorLenght (void)
void SetValue (float x, float y, float z)
void SetX (double val)
void SetY (double val)
void SetZ (double val)
double GetX (void)
double GetY (void)
double GetZ (void)
void Draw (void)
ExCVec3D & operator= (const ExCVec3D &Vec)
bool operator== (const ExCVec3D &Vec)
ExCVec3D operator+ (const ExCVec3D &Vec)
ExCVec3D operator- (const ExCVec3D &Vec)
ExCVec3D operator * (const ExCVec3D &Vec)
ExCVec3D operator * (float scalar)
ExCVec3D operator/ (const ExCVec3D &Vec)
ExCVec3D operator/ (float scalar)

Attributs Publics

float m_Vector [3]
ExCVec3D GetVecNormale (void)

Amis (friends)

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


Documentation des contructeurs et destructeurs

ExCVec3D  
 

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

Références m_Vector.

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

ExCVec3D float    x,
float    y,
float    z
 

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

Références m_Vector.

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

~ExCVec3D  
 

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

00039 {
00040 
00041 }


Documentation des méthodes

void Draw void   
 

Définition à la ligne 63 du fichier ExCVec3D.cpp.

Références m_Vector, et SetValue().

00064 {
00065         ExCVec3D vx,vy,vz;
00066         ExCVec3D source;
00067 
00068         source.SetValue(0.0f,0.0f,0.0f);
00069 
00070         
00071 
00072         vx.m_Vector[0]=this->m_Vector[0]+1.0f;
00073         vy.m_Vector[1]=this->m_Vector[1]+1.0f;
00074         vz.m_Vector[2]=this->m_Vector[2]+1.0f;
00075 
00076 
00077         glBegin(GL_TRIANGLES);
00078                 glColor3ub(255,255,255);
00079                 glVertex3f(0.0f,0.0f,0.0f);
00080                 glVertex3f(1.0f,1.0f,1.0f);
00081                 glVertex3f(-1.0f,-1.0f,-1.0f);
00082         glEnd();
00083 
00084         glBegin(GL_LINE);
00085                 glColor3ub(255,0,0);
00086                         glVertex3fv(source.m_Vector);
00087                         glVertex3fv(vx.m_Vector);
00088                 glColor3ub(0,255,0);
00089                         glVertex3fv(source.m_Vector);
00090                         glVertex3fv(vy.m_Vector);
00091                 glColor3ub(0,0,255);
00092                         glVertex3fv(source.m_Vector);
00093                         glVertex3fv(vz.m_Vector);
00094         glEnd();
00095 }

float GetVectorLenght void   
 

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

Références m_Vector.

Référencé par ExCCamera::Draw(), GetAxisFromQuaternion(), et GetVecNormale().

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

double GetX void    [inline]
 

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

Références m_Vector.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCamera::Draw(), ExCLight::GetPositionX(), ExCLight::GetTargetX(), ExCCamera::GoToView(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), ExCLight::SetTargetZ(), et ExCObject::ShowInfo().

00054 {return m_Vector[0];}

double GetY void    [inline]
 

Définition à la ligne 55 du fichier ExCVec3D.h.

Références m_Vector.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCamera::Draw(), ExCLight::GetPositionY(), ExCLight::GetTargetY(), ExCCamera::GoToView(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), ExCLight::SetTargetZ(), et ExCObject::ShowInfo().

00055 {return m_Vector[1];}

double GetZ void    [inline]
 

Définition à la ligne 56 du fichier ExCVec3D.h.

Références m_Vector.

Référencé par ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCamera::Draw(), ExCLight::GetPositionZ(), ExCLight::GetTargetZ(), ExCCamera::GoToView(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), ExCLight::SetTargetZ(), et ExCObject::ShowInfo().

00056 {return m_Vector[2];}

ExCVec3D operator * float    scalar
 

Définition à la ligne 136 du fichier ExCVec3D.cpp.

Références m_Vector.

00137 {
00138         ExCVec3D RetVec;
00139         RetVec.m_Vector[0]=m_Vector[0]*scalar;
00140         RetVec.m_Vector[1]=m_Vector[1]*scalar;
00141         RetVec.m_Vector[2]=m_Vector[2]*scalar;
00142         return RetVec;
00143 }

ExCVec3D operator * const ExCVec3D &    Vec
 

Définition à la ligne 128 du fichier ExCVec3D.cpp.

Références m_Vector.

00129 {
00130         ExCVec3D RetVec;
00131         RetVec.m_Vector[0]=m_Vector[0]*Vec.m_Vector[0];
00132         RetVec.m_Vector[1]=m_Vector[1]*Vec.m_Vector[1];
00133         RetVec.m_Vector[2]=m_Vector[2]*Vec.m_Vector[2];
00134         return RetVec;
00135 }

ExCVec3D operator+ const ExCVec3D &    Vec
 

Définition à la ligne 111 du fichier ExCVec3D.cpp.

Références m_Vector.

00112 {
00113         ExCVec3D RetVec;
00114         RetVec.m_Vector[0]=m_Vector[0]+Vec.m_Vector[0];
00115         RetVec.m_Vector[1]=m_Vector[1]+Vec.m_Vector[1];
00116         RetVec.m_Vector[2]=m_Vector[2]+Vec.m_Vector[2];
00117         return RetVec;
00118 }

ExCVec3D operator- const ExCVec3D &    Vec
 

Définition à la ligne 120 du fichier ExCVec3D.cpp.

Références m_Vector.

00121 {
00122         ExCVec3D RetVec;
00123         RetVec.m_Vector[0]=m_Vector[0]-Vec.m_Vector[0];
00124         RetVec.m_Vector[1]=m_Vector[1]-Vec.m_Vector[1];
00125         RetVec.m_Vector[2]=m_Vector[2]-Vec.m_Vector[2];
00126         return RetVec;
00127 }

ExCVec3D operator/ float    scalar
 

Définition à la ligne 152 du fichier ExCVec3D.cpp.

Références m_Vector.

00153 {
00154         ExCVec3D RetVec;
00155         RetVec.m_Vector[0]=m_Vector[0]/scalar;
00156         RetVec.m_Vector[1]=m_Vector[1]/scalar;
00157         RetVec.m_Vector[2]=m_Vector[2]/scalar;
00158         return RetVec;
00159 }

ExCVec3D operator/ const ExCVec3D &    Vec
 

Définition à la ligne 144 du fichier ExCVec3D.cpp.

Références m_Vector.

00145 {
00146         ExCVec3D RetVec;
00147         RetVec.m_Vector[0]=m_Vector[0]/Vec.m_Vector[0];
00148         RetVec.m_Vector[1]=m_Vector[1]/Vec.m_Vector[1];
00149         RetVec.m_Vector[2]=m_Vector[2]/Vec.m_Vector[2];
00150         return RetVec;
00151 }

ExCVec3D & operator= const ExCVec3D &    Vec
 

Définition à la ligne 98 du fichier ExCVec3D.cpp.

Références m_Vector.

00099 {
00100         m_Vector[0]=Vec.m_Vector[0];
00101         m_Vector[1]=Vec.m_Vector[1];
00102         m_Vector[2]=Vec.m_Vector[2];
00103         return *this;
00104 }

bool operator== const ExCVec3D &    Vec
 

Définition à la ligne 105 du fichier ExCVec3D.cpp.

Références m_Vector.

00106 {
00107         if(m_Vector[0]==Vec.m_Vector[0]||m_Vector[1]==Vec.m_Vector[1]||m_Vector[2]==Vec.m_Vector[2]) return true;
00108         else return false;
00109 }

void SetValue float    x,
float    y,
float    z
 

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

Références m_Vector.

Référencé par Draw(), ExCSystemeParticule::Draw(), ExCParticule::Draw(), ExCCamera::ExCCamera(), ExCObject::ExCObject(), ExCParticule::ExCParticule(), ExCSystemeParticule::ExCSystemeParticule(), GetAxisFromQuaternion(), et ExCSystemeParticule::LoadParticuleSysteme().

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

void SetX double    val [inline]
 

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

Références m_Vector.

Référencé par ExCCamera::Draw(), ExCCamera::GoToView(), ExCLight::Reset(), ExCLight::SetPositionX(), et ExCLight::SetTargetX().

00051 {m_Vector[0]=val;}

void SetY double    val [inline]
 

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

Références m_Vector.

Référencé par ExCCamera::Draw(), ExCCamera::GoToView(), ExCLight::Reset(), ExCLight::SetPositionY(), et ExCLight::SetTargetY().

00052 {m_Vector[1]=val;}

void SetZ double    val [inline]
 

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

Références m_Vector.

Référencé par ExCCamera::Draw(), ExCCamera::GoToView(), ExCLight::Reset(), ExCLight::SetPositionZ(), et ExCLight::SetTargetZ().

00053 {m_Vector[2]=val;}


Documentation des fonctions amies et associées

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

Définition à la ligne 162 du fichier ExCVec3D.cpp.

00163 {
00164         s<<"X:"<<(float)vec.m_Vector[0]<<" Y:"<<(float)vec.m_Vector[1]<<" Z:"<<(float)vec.m_Vector[2];
00165         return s;
00166 }


Documentation des données imbriquées

ExCVec3D GetVecNormale
 

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

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

float m_Vector[3]
 

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

Référencé par Draw(), ExCSystemeParticule::Draw(), ExCParticule::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCCamera::Draw(), ExCVec3D(), GetCrossProduct(), GetDotProduct(), GetNewVecFromEuler(), GetVectorLenght(), GetX(), GetY(), GetZ(), ExCCamera::MoveCamera(), operator *(), operator+(), operator-(), operator/(), operator<<(), operator=(), operator==(), ExCParticule::PrecalculeParticuleTrajectory(), ExCCamera::RotateView(), SetValue(), SetX(), SetY(), et SetZ().


La documentation associée à cette classe a été générée à partir des fichiers suivants :
Généré le Tue Aug 6 20:25:40 2002 pour ExNihilo par doxygen1.2.17