Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

ExCVec3D Class Reference

#include <ExCVec3D.h>


Public Methods

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

Data Fields

float m_Vector [3]

Friends

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


Constructor & Destructor Documentation

ExCVec3D  
 

Definition at line 28 of file ExCVec3D.cpp.

References SetValue().

Referenced by operator *(), operator+(), operator-(), and operator/().

00029 {
00030         SetValue(0,0,0);
00031 }

ExCVec3D float    x,
float    y,
float    z
 

Definition at line 33 of file ExCVec3D.cpp.

References SetValue().

00034 {
00035         SetValue(x,y,z);
00036 }

ExCVec3D float    x,
float    y
 

Definition at line 38 of file ExCVec3D.cpp.

References SetValue().

00039 {
00040         SetValue(x,y,0);
00041 }

ExCVec3D float    x
 

Definition at line 43 of file ExCVec3D.cpp.

References SetValue().

00044 {
00045         SetValue(x,0,0);
00046 }

ExCVec3D const ExCVec3D &    vec
 

Definition at line 48 of file ExCVec3D.cpp.

References m_Vector, and SetValue().

00049 {
00050         SetValue(vec.m_Vector[0],vec.m_Vector[1],vec.m_Vector[2]);
00051 }

~ExCVec3D  
 

Definition at line 53 of file ExCVec3D.cpp.

00054 {
00055 
00056 }


Member Function Documentation

ExCVec3D GetVecNormale void   
 

Definition at line 64 of file ExCVec3D.cpp.

References GetVectorLenght().

00065 {
00066         ExCVec3D VecNorm;
00067         VecNorm=*this;
00068         VecNorm=*this/this->GetVectorLenght();
00069         return VecNorm;
00070 }

float GetVectorLenght void   
 

Definition at line 60 of file ExCVec3D.cpp.

References m_Vector.

Referenced by GetAxisFromQuaternion(), GetVecNormale(), and GetVecNormale().

00061 {
00062         return sqrt((m_Vector[0]*m_Vector[0])+(m_Vector[1]*m_Vector[1])+(m_Vector[2]*m_Vector[2]));
00063 }

float GetX void    [inline]
 

Definition at line 57 of file ExCVec3D.h.

References m_Vector.

Referenced by ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModel::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCLight::GetPositionY(), ExCLight::GetTargetY(), ExCSystemeParticule::SetEmitterMaxAccelerationY(), ExCSystemeParticule::SetEmitterMaxGravityY(), ExCSystemeParticule::SetEmitterMaxVelocityY(), ExCSystemeParticule::SetEmitterMinAccelerationY(), ExCSystemeParticule::SetEmitterMinGravityY(), ExCSystemeParticule::SetEmitterMinVelocityY(), ExCSystemeParticule::SetEmitterP1Y(), ExCSystemeParticule::SetEmitterP2Y(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), ExCLight::SetTargetZ(), and ExCObject3D::ShowInfo().

00057 {return m_Vector[0];}

float GetY void    [inline]
 

Definition at line 58 of file ExCVec3D.h.

References m_Vector.

Referenced by ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModel::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCLight::GetPositionZ(), ExCLight::GetTargetZ(), ExCSystemeParticule::SetEmitterMaxAccelerationZ(), ExCSystemeParticule::SetEmitterMaxGravityZ(), ExCSystemeParticule::SetEmitterMaxVelocityZ(), ExCSystemeParticule::SetEmitterMinAccelerationZ(), ExCSystemeParticule::SetEmitterMinGravityZ(), ExCSystemeParticule::SetEmitterMinVelocityZ(), ExCSystemeParticule::SetEmitterP1Z(), ExCSystemeParticule::SetEmitterP2Z(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), ExCLight::SetTargetZ(), and ExCObject3D::ShowInfo().

00058 {return m_Vector[1];}

float GetZ void    [inline]
 

Definition at line 59 of file ExCVec3D.h.

References m_Vector.

Referenced by ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModel::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCCameraTarget::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCLight::IncPositionX(), ExCLight::IncTargetX(), ExCLight::SetPosition(), ExCLight::SetPositionX(), ExCLight::SetPositionY(), ExCLight::SetPositionZ(), ExCLight::SetTarget(), ExCLight::SetTargetX(), ExCLight::SetTargetY(), ExCLight::SetTargetZ(), and ExCObject3D::ShowInfo().

00059 {return m_Vector[2];}

ExCVec3D operator * float    scalar
 

Definition at line 105 of file ExCVec3D.cpp.

References ExCVec3D(), and m_Vector.

00106 {
00107         return ExCVec3D(m_Vector[0]*scalar,m_Vector[1]*scalar,m_Vector[2]*scalar);
00108 }

ExCVec3D operator * const ExCVec3D &    Vec
 

Definition at line 100 of file ExCVec3D.cpp.

References ExCVec3D(), and m_Vector.

00101 {
00102         return ExCVec3D(m_Vector[0]*Vec.m_Vector[0],m_Vector[1]*Vec.m_Vector[1],m_Vector[2]*Vec.m_Vector[2]);
00103 }

ExCVec3D operator+ const ExCVec3D &    Vec
 

Definition at line 90 of file ExCVec3D.cpp.

References ExCVec3D(), and m_Vector.

00091 {
00092         return ExCVec3D(m_Vector[0]+Vec.m_Vector[0],m_Vector[1]+Vec.m_Vector[1],m_Vector[2]+Vec.m_Vector[2]);
00093 }

ExCVec3D operator++ int   
 

Definition at line 125 of file ExCVec3D.cpp.

References m_Vector.

00126 {
00127         m_Vector[0]++;m_Vector[1]++;m_Vector[2]++;
00128         return *this;
00129 }

ExCVec3D operator++  
 

Definition at line 120 of file ExCVec3D.cpp.

References m_Vector.

00121 {
00122         m_Vector[0]++;m_Vector[1]++;m_Vector[2]++;
00123         return *this;
00124 }

ExCVec3D operator- const ExCVec3D &    Vec
 

Definition at line 95 of file ExCVec3D.cpp.

References ExCVec3D(), and m_Vector.

00096 {
00097         return ExCVec3D(m_Vector[0]-Vec.m_Vector[0],m_Vector[1]-Vec.m_Vector[1],m_Vector[2]-Vec.m_Vector[2]);
00098 }

ExCVec3D operator-- int   
 

Definition at line 135 of file ExCVec3D.cpp.

References m_Vector.

00136 {
00137         m_Vector[0]--;m_Vector[1]--;m_Vector[2]--;
00138         return *this;
00139 }

ExCVec3D operator--  
 

Definition at line 130 of file ExCVec3D.cpp.

References m_Vector.

00131 {
00132         m_Vector[0]--;m_Vector[1]--;m_Vector[2]--;
00133         return *this;
00134 }

ExCVec3D operator/ float    scalar
 

Definition at line 115 of file ExCVec3D.cpp.

References ExCVec3D(), and m_Vector.

00116 {
00117         return ExCVec3D(m_Vector[0]/scalar,m_Vector[1]/scalar,m_Vector[2]/scalar);
00118 }

ExCVec3D operator/ const ExCVec3D &    Vec
 

Definition at line 110 of file ExCVec3D.cpp.

References ExCVec3D(), and m_Vector.

00111 {
00112         return ExCVec3D(m_Vector[0]/Vec.m_Vector[0],m_Vector[1]/Vec.m_Vector[1],m_Vector[2]/Vec.m_Vector[2]);
00113 }

ExCVec3D & operator= const ExCVec3D &    Vec
 

Definition at line 79 of file ExCVec3D.cpp.

References m_Vector, and SetValue().

00080 {
00081         SetValue(Vec.m_Vector[0],Vec.m_Vector[1],Vec.m_Vector[2]);
00082         return *this;
00083 }

bool operator== const ExCVec3D &    Vec
 

Definition at line 84 of file ExCVec3D.cpp.

References m_Vector.

00085 {
00086         if(m_Vector[0]==Vec.m_Vector[0]||m_Vector[1]==Vec.m_Vector[1]||m_Vector[2]==Vec.m_Vector[2]) return true;
00087         else return false;
00088 }

void SetValue float    x,
float    y,
float    z
 

Definition at line 71 of file ExCVec3D.cpp.

References m_Vector.

Referenced by ExCSystemeParticule::CalculateEmitPosition(), ExCParticule::Draw(), ExCObject3D::ExCObject3D(), ExCParticule::ExCParticule(), ExCSDKParticule::ExCSDKParticule(), ExCSDKParticuleSyteme::ExCSDKParticuleSyteme(), ExCSystemeParticule::ExCSystemeParticule(), ExCVec3D(), GetAxisFromQuaternion(), ExCModelMD2::Load(), operator=(), and ExCModelASC::ProcessLine().

00072 {
00073         m_Vector[0]=x;
00074         m_Vector[1]=y;
00075         m_Vector[2]=z;
00076 }

void SetX float    val [inline]
 

Definition at line 54 of file ExCVec3D.h.

References m_Vector, and val.

Referenced by ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModel::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCModelMD2::ExCModelMD2(), ExCSystemeParticule::GetEmitterMaxAccelerationX(), ExCSystemeParticule::GetEmitterMaxGravityX(), ExCSystemeParticule::GetEmitterMaxVelocityX(), ExCSystemeParticule::GetEmitterMinAccelerationX(), ExCSystemeParticule::GetEmitterMinGravityX(), ExCSystemeParticule::GetEmitterMinVelocityX(), ExCSystemeParticule::GetEmitterP1X(), ExCSystemeParticule::GetEmitterP2X(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCSystemeParticule::Load(), ExCModelMD2::Load(), ExCModelASC::LoadFile(), ExCModel3DS::ReadVertices(), ExCLight::Reset(), ExCLight::SetPositionX(), and ExCLight::SetTargetX().

00054 {m_Vector[0]=val;}

void SetY float    val [inline]
 

Definition at line 55 of file ExCVec3D.h.

References m_Vector, and val.

Referenced by ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModel::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCSystemeParticule::GetEmitterMaxAccelerationY(), ExCSystemeParticule::GetEmitterMaxGravityY(), ExCSystemeParticule::GetEmitterMaxVelocityY(), ExCSystemeParticule::GetEmitterMinAccelerationY(), ExCSystemeParticule::GetEmitterMinGravityY(), ExCSystemeParticule::GetEmitterMinVelocityY(), ExCSystemeParticule::GetEmitterP1Y(), ExCSystemeParticule::GetEmitterP2Y(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCSystemeParticule::Load(), ExCModelMD2::Load(), ExCModelASC::LoadFile(), ExCModel3DS::ReadVertices(), ExCLight::Reset(), ExCLight::SetPositionY(), and ExCLight::SetTargetY().

00055 {m_Vector[1]=val;}

void SetZ float    val [inline]
 

Definition at line 56 of file ExCVec3D.h.

References m_Vector, and val.

Referenced by ExCModel3DS::BuildList(), ExCModelMD2::Draw(), ExCModel::Draw(), ExCCameraChase::Draw(), ExCCamera::Draw(), ExCSystemeParticule::GetEmitterMaxAccelerationZ(), ExCSystemeParticule::GetEmitterMaxGravityZ(), ExCSystemeParticule::GetEmitterMaxVelocityZ(), ExCSystemeParticule::GetEmitterMinAccelerationZ(), ExCSystemeParticule::GetEmitterMinGravityZ(), ExCSystemeParticule::GetEmitterMinVelocityZ(), ExCSystemeParticule::GetEmitterP1Z(), ExCSystemeParticule::GetEmitterP2Z(), ExManagerModel::InputAction(), ExManagerCamera::InputAction(), ExCSystemeParticule::Load(), ExCModelMD2::Load(), ExCModelASC::LoadFile(), ExCModel3DS::ReadVertices(), ExCLight::Reset(), ExCLight::SetPositionZ(), and ExCLight::SetTargetZ().

00056 {m_Vector[2]=val;}


Friends And Related Function Documentation

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

Definition at line 150 of file ExCVec3D.cpp.

00151 {
00152         s<<"X:"<<(float)vec.m_Vector[0]<<" Y:"<<(float)vec.m_Vector[1]<<" Z:"<<(float)vec.m_Vector[2];
00153         return s;
00154 }

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

Definition at line 145 of file ExCVec3D.cpp.

00146 {
00147         s<<"X:"<<(float)vec.m_Vector[0]<<" Y:"<<(float)vec.m_Vector[1]<<" Z:"<<(float)vec.m_Vector[2];
00148         return s;
00149 }


Field Documentation

float m_Vector[3]
 

Definition at line 38 of file ExCVec3D.h.

Referenced by ExCModel3DS::BuildList(), ExCSystemeParticule::CalculateEmitPosition(), ExCSystemeParticule::CreateNewParticle(), ExCParticule::Draw(), ExCEntite::Draw(), ExCComposed::Draw(), ExCVec3D(), GetCrossProduct(), GetDotProduct(), GetNewVecFromEuler(), GetVectorLenght(), GetX(), GetY(), GetZ(), operator *(), operator+(), operator++(), operator-(), operator--(), operator/(), operator<<(), operator=(), operator==(), ExCSDKParticule::PrecalculeParticuleTrajectory(), ExCParticule::PrecalculeParticuleTrajectory(), SetValue(), SetX(), SetY(), and SetZ().


The documentation for this class was generated from the following files:
Generated on Tue Dec 10 18:20:33 2002 for ExNihilo by doxygen1.3-rc1