#include <ExCCamera.h>
Graphe d'héritage de la classe ExCCamera
Membres publics | |
ExCCamera (void) | |
~ExCCamera (void) | |
void | Draw (void) |
void | ZoomIn (void) |
void | ZoomOut (void) |
void | ResetZoom (void) |
void | ZoomIn (float zoom) |
void | ZoomOut (float zoom) |
void | SetZoom (float zoom) |
void | SetZoomMax (float zoom) |
void | SetZoomMin (float zoom) |
void | SetZoomDefault (float zoom) |
void | SetClipFar (float clip) |
void | SetClipNear (float clip) |
float | GetZoomMax (void) |
float | GetZoomMin (void) |
float | GetZoom (void) |
float | GetZoomDefault (void) |
float | GetClipFar (void) |
float | GetClipNear (void) |
void | GoToView (bool state) |
void | RotateView (float X, float Y, float Z) |
void | StrafeCamera (float speed) |
void | MoveCamera (float speed) |
Attributs Publics | |
int | m_speed |
Attributs Protégés | |
bool | m_Actif |
float | m_Zoom |
float | m_ClipFar |
float | m_ClipNear |
float | m_ZoomDefault |
float | m_ZoomMax |
float | m_ZoomMin |
ExCVec3D | VecX |
ExCVec3D | VecY |
ExCVec3D | VecZ |
ExCVec3D | VecDir |
ExCVec3D | m_vPosition |
ExCVec3D | m_vView |
ExCVec3D | m_vUpVector |
|
Définition à la ligne 27 du fichier ExCCamera.cpp. Références ExCCamera(), Guard, ExCObject::m_AngleX, ExCObject::m_AngleY, ExCObject::m_AngleZ, m_ClipFar, m_ClipNear, m_speed, m_vPosition, m_vUpVector, m_vView, m_Zoom, m_ZoomDefault, m_ZoomMax, m_ZoomMin, ExCVec3D::SetValue(), et UnGuard. Référencé par ExCCamera(), et ~ExCCamera().
00028 { 00029 Guard(ExCCamera::ExCCamera(void)) 00030 m_AngleX=0; 00031 m_AngleY=0; 00032 m_AngleZ=0; 00033 m_speed=0; 00034 m_ZoomDefault=40; 00035 m_Zoom=m_ZoomDefault; 00036 m_ZoomMin=1; 00037 m_ZoomMax=100; 00038 m_ClipFar=2000; 00039 m_ClipNear=1; 00040 00041 m_vPosition.SetValue(0.0,0.0,1.0); 00042 m_vView.SetValue(0.0,1.0,0.5); 00043 m_vUpVector.SetValue(0.0,0.0,1.0); 00044 UnGuard 00045 } |
|
Définition à la ligne 47 du fichier ExCCamera.cpp. Références ExCCamera(), Guard, et UnGuard.
|
|
Redéfinie à partir de ExCObject. Redéfinie dans ExCCameraTarget. Définition à la ligne 53 du fichier ExCCamera.cpp. Références Draw(), GetMatrixFromQuaternion(), ExCVec3D::GetVectorLenght(), ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), GoToView(), Guard, ExCObject::m_AngleX, ExCObject::m_AngleY, ExCObject::m_AngleZ, ExCMatrix4x4::m_Matrix, ExCObject::m_Position, m_speed, ExCObject::m_Target, ExCVec3D::m_Vector, ExQuaternion::SetEuler(), ExCVec3D::SetX(), ExCVec3D::SetY(), ExCVec3D::SetZ(), UnGuard, VecDir, VecX, VecY, et VecZ. Référencé par ExManagerCam::Draw(), Draw(), et ExManagerOutput::Reshape().
00054 { 00055 Guard(ExCCamera::Draw(void)) 00056 //cout<<"Draw "<<m_ObjectName<<" ID:"<<m_ObjectId<<endl; 00057 00058 if(m_AngleX<0)m_AngleX=359; 00059 if(m_AngleX>359)m_AngleX=0; 00060 if(m_AngleY<0)m_AngleY=359; 00061 if(m_AngleY>359)m_AngleY=0; 00062 if(m_AngleZ<0)m_AngleZ=359; 00063 if(m_AngleZ>359)m_AngleZ=0; 00064 00065 ExCMatrix4x4 Matrice,Matr; 00066 //ExCVec3D VecX,VecY,VecZ,VecDir; 00067 00068 ExQuaternion Quat; 00069 00070 00071 Quat.SetEuler(m_AngleX,m_AngleY,m_AngleZ); 00072 Matr=GetMatrixFromQuaternion(Quat); 00073 00074 //Matr=GetMatrixFromEuler(m_AngleX,m_AngleY,m_AngleZ); 00075 00076 00077 //glLoadMatrixf(Matr.m_Matrix); 00078 00079 /*glRotatef(m_AngleX,1.0,0.0,0.0); 00080 glRotatef(m_AngleY,0.0,1.0,0.0); 00081 glLoadIdentity(); 00082 glLoadMatrixf(Matr.m_Matrix); 00083 cout<<Matr; 00084 cout<<Quat;*/ 00085 00086 VecX.m_Vector[0]=Matr.m_Matrix[0]; 00087 VecX.m_Vector[1]=Matr.m_Matrix[1]; 00088 VecX.m_Vector[2]=Matr.m_Matrix[2]; 00089 VecY.m_Vector[0]=Matr.m_Matrix[4]; 00090 VecY.m_Vector[1]=Matr.m_Matrix[5]; 00091 VecY.m_Vector[2]=Matr.m_Matrix[6]; 00092 VecZ.m_Vector[0]=Matr.m_Matrix[8]; 00093 VecZ.m_Vector[1]=Matr.m_Matrix[9]; 00094 VecZ.m_Vector[2]=Matr.m_Matrix[10]; 00095 00096 VecDir.m_Vector[0]=VecX.GetVectorLenght(); 00097 VecDir.m_Vector[1]=VecY.GetVectorLenght(); 00098 VecDir.m_Vector[2]=VecZ.GetVectorLenght(); 00099 00100 //cout<<VecDir<<endl; 00101 //glGetFloatv(GL_MODELVIEW_MATRIX, 00102 00103 //glTranslatef(m_Position.GetX(),m_Position.GetY(),m_Position.GetZ()); 00104 if(m_speed!=0) 00105 { 00106 for(int i=0;i<m_speed;i++) 00107 { 00108 GoToView(true); 00109 } 00110 }else 00111 { 00112 m_Target.SetX((Cos[(int)m_AngleY]+m_Position.GetX())); 00113 m_Target.SetZ((Sin[(int)m_AngleY]+m_Position.GetZ())); 00114 m_Target.SetY((Sin[(int)m_AngleX]+m_Position.GetY())); 00115 } 00116 //glRotatef(m_AngleZ,0.0,0.0,1.0); 00117 gluLookAt(m_Position.GetX(),m_Position.GetY(),m_Position.GetZ() 00118 ,m_Target.GetX(),m_Target.GetY(),m_Target.GetZ() 00119 ,0.0,1.0,0.0); 00120 00121 UnGuard 00122 } |
|
Définition à la ligne 79 du fichier ExCCamera.h. Références m_ClipFar. Référencé par ExManagerOutput::Reshape().
00079 {return m_ClipFar;} |
|
Définition à la ligne 80 du fichier ExCCamera.h. Références m_ClipNear. Référencé par ExManagerOutput::Reshape().
00080 {return m_ClipNear;} |
|
Définition à la ligne 77 du fichier ExCCamera.h. Références m_Zoom. Référencé par ExManagerOutput::Reshape().
00077 {return m_Zoom;} |
|
Définition à la ligne 78 du fichier ExCCamera.h. Références m_ZoomDefault.
00078 {return m_ZoomDefault;} |
|
Définition à la ligne 75 du fichier ExCCamera.h. Références m_ZoomMax.
00075 {return m_ZoomMax;} |
|
Définition à la ligne 76 du fichier ExCCamera.h. Références m_ZoomMin.
00076 {return m_ZoomMin;} |
|
Définition à la ligne 124 du fichier ExCCamera.cpp. Références ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), GoToView(), Guard, ExCObject::m_AngleX, ExCObject::m_AngleY, ExCObject::m_Position, ExCObject::m_Target, ExCVec3D::SetX(), ExCVec3D::SetY(), ExCVec3D::SetZ(), et UnGuard. Référencé par Draw(), GoToView(), et ExManagerCommand::ProcessAction().
00125 { 00126 Guard(void ExCCamera::GoToView(void)) 00127 //bool GoodY=true; // not used 00128 m_Position=m_Target; 00129 m_Target.SetX((Cos[(int)m_AngleY]+m_Position.GetX())); 00130 m_Target.SetZ((Sin[(int)m_AngleY]+m_Position.GetZ())); 00131 m_Target.SetY((Sin[(int)m_AngleX]+m_Position.GetY())); 00132 00133 UnGuard 00134 } |
|
Définition à la ligne 253 du fichier ExCCamera.cpp. Références Guard, ExCVec3D::m_Vector, m_vPosition, m_vView, MoveCamera(), et UnGuard. Référencé par MoveCamera().
00254 { 00255 Guard(void ExCCamera::MoveCamera(float speed)) 00256 ExCVec3D vVector; // Init a vVector for our view 00257 00258 // Get our view vVector (The direciton we are facing) 00259 vVector.m_Vector[0] = m_vView.m_Vector[0] - m_vPosition.m_Vector[0]; // This gets the direction of the X 00260 vVector.m_Vector[1] = m_vView.m_Vector[1] - m_vPosition.m_Vector[1]; // This gets the direction of the Y 00261 vVector.m_Vector[2] = m_vView.m_Vector[2] - m_vPosition.m_Vector[2]; // This gets the direction of the Z 00262 00263 m_vPosition.m_Vector[0] += vVector.m_Vector[0] * speed; // Add our acceleration to our position's X 00264 m_vPosition.m_Vector[2] += vVector.m_Vector[2] * speed; // Add our acceleration to our position's Z 00265 m_vView.m_Vector[0] += vVector.m_Vector[0] * speed; // Add our acceleration to our view's X 00266 m_vView.m_Vector[2] += vVector.m_Vector[2] * speed; // Add our acceleration to our view's Z 00267 UnGuard 00268 } |
|
Définition à la ligne 136 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomDefault, ResetZoom(), et UnGuard. Référencé par ResetZoom().
00137 { 00138 Guard(void ExCCamera::ResetZoom(void)) 00139 m_Zoom=m_ZoomDefault; 00140 UnGuard 00141 } |
|
Définition à la ligne 217 du fichier ExCCamera.cpp. Références Guard, ExCVec3D::m_Vector, m_vPosition, m_vView, RotateView(), et UnGuard. Référencé par RotateView().
00218 { 00219 Guard(void ExCCamera::RotateView(float X, float Y, float Z)) 00220 ExCVec3D vVector; // Vector for the position/view. 00221 00222 // Get our view vVector (The direction we are facing) 00223 vVector.m_Vector[0] = m_vView.m_Vector[0] - m_vPosition.m_Vector[0]; // This gets the direction of the X 00224 vVector.m_Vector[1] = m_vView.m_Vector[1] - m_vPosition.m_Vector[1]; // This gets the direction of the Y 00225 vVector.m_Vector[2]= m_vView.m_Vector[2] - m_vPosition.m_Vector[2]; // This gets the direction of the Z 00226 00227 // If we pass in a negative X Y or Z, it will rotate the opposite way, 00228 // so we only need one function for a left and right , up or down rotation. 00229 // I suppose we could have one move function too, but I decided not too. 00230 00231 if(X) { 00232 m_vView.m_Vector[2] = (float)(m_vPosition.m_Vector[2] + sin(X)*vVector.m_Vector[1] + cos(X)*vVector.m_Vector[2]); 00233 m_vView.m_Vector[1] = (float)(m_vPosition.m_Vector[1] + cos(X)*vVector.m_Vector[1] - sin(X)*vVector.m_Vector[2]); 00234 } 00235 if(Y) { 00236 m_vView.m_Vector[2] = (float)(m_vPosition.m_Vector[2] + sin(Y)*vVector.m_Vector[0] + cos(Y)*vVector.m_Vector[2]); 00237 m_vView.m_Vector[0] = (float)(m_vPosition.m_Vector[0] + cos(Y)*vVector.m_Vector[0] - sin(Y)*vVector.m_Vector[2]); 00238 } 00239 if(Z) { 00240 m_vView.m_Vector[0] = (float)(m_vPosition.m_Vector[0] + sin(Z)*vVector.m_Vector[1] + cos(Z)*vVector.m_Vector[0]); 00241 m_vView.m_Vector[1] = (float)(m_vPosition.m_Vector[1] + cos(Z)*vVector.m_Vector[1] - sin(Z)*vVector.m_Vector[0]); 00242 } 00243 UnGuard 00244 } |
|
Définition à la ligne 201 du fichier ExCCamera.cpp. Références Guard, m_ClipFar, m_ClipNear, SetClipFar(), et UnGuard. Référencé par SetClipFar().
00202 { 00203 Guard(void ExCCamera::SetClipFar(float clip)) 00204 m_ClipFar=clip; 00205 if(m_ClipFar<m_ClipNear)m_ClipFar=m_ClipNear+1; 00206 UnGuard 00207 } |
|
Définition à la ligne 209 du fichier ExCCamera.cpp. Références Guard, m_ClipFar, m_ClipNear, SetClipNear(), et UnGuard. Référencé par SetClipNear().
00210 { 00211 Guard(void ExCCamera::SetClipNear(float clip)) 00212 m_ClipNear=clip; 00213 if(m_ClipNear>m_ClipFar)m_ClipNear=m_ClipFar-1; 00214 UnGuard 00215 } |
|
Définition à la ligne 183 du fichier ExCCamera.cpp. Références Guard, SetZoom(), et UnGuard. Référencé par SetZoom().
00184 { 00185 Guard(void ExCCamera::SetZoom(float zoom)) 00186 UnGuard 00187 } |
|
Définition à la ligne 143 du fichier ExCCamera.cpp. Références Guard, m_ZoomDefault, m_ZoomMin, et UnGuard.
00144 { 00145 Guard(void ExCCamera:: SetZoomDefault(float zoom)) 00146 if(zoom<m_ZoomMax&&zoom>m_ZoomMin) 00147 m_ZoomDefault=zoom; 00148 UnGuard 00149 } |
|
Définition à la ligne 189 du fichier ExCCamera.cpp. Références Guard, SetZoomMax(), et UnGuard. Référencé par SetZoomMax().
00190 { 00191 Guard(void ExCCamera::SetZoomMax(float zoom)) 00192 UnGuard 00193 } |
|
Définition à la ligne 195 du fichier ExCCamera.cpp. Références Guard, SetZoomMin(), et UnGuard. Référencé par SetZoomMin().
00196 { 00197 Guard(void ExCCamera::SetZoomMin(float zoom)) 00198 UnGuard 00199 } |
|
Définition à la ligne 246 du fichier ExCCamera.cpp. Références Guard, StrafeCamera(), et UnGuard. Référencé par StrafeCamera().
00247 { 00248 Guard(void ExCCamera::StrafeCamera(float speed)) 00249 00250 UnGuard 00251 } |
|
Définition à la ligne 167 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMin, UnGuard, et ZoomIn().
|
|
Définition à la ligne 151 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMin, UnGuard, et ZoomIn(). Référencé par ZoomIn().
|
|
Définition à la ligne 175 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMax, UnGuard, et ZoomOut().
|
|
Définition à la ligne 159 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMax, UnGuard, et ZoomOut(). Référencé par ZoomOut().
|
|
Définition à la ligne 41 du fichier ExCCamera.h. |
|
Définition à la ligne 43 du fichier ExCCamera.h. Référencé par ExCCamera(), GetClipFar(), SetClipFar(), et SetClipNear(). |
|
Définition à la ligne 44 du fichier ExCCamera.h. Référencé par ExCCamera(), GetClipNear(), SetClipFar(), et SetClipNear(). |
|
Définition à la ligne 51 du fichier ExCCamera.h. Référencé par Draw(), ExCCamera(), et ExManagerCommand::ProcessAction(). |
|
Définition à la ligne 49 du fichier ExCCamera.h. Référencé par ExCCamera(), MoveCamera(), et RotateView(). |
|
Définition à la ligne 49 du fichier ExCCamera.h. Référencé par ExCCamera(). |
|
Définition à la ligne 49 du fichier ExCCamera.h. Référencé par ExCCamera(), MoveCamera(), et RotateView(). |
|
Définition à la ligne 42 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoom(), ResetZoom(), ZoomIn(), et ZoomOut(). |
|
Définition à la ligne 45 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoomDefault(), ResetZoom(), et SetZoomDefault(). |
|
Définition à la ligne 46 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoomMax(), et ZoomOut(). |
|
Définition à la ligne 47 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoomMin(), SetZoomDefault(), et ZoomIn(). |
|
Définition à la ligne 48 du fichier ExCCamera.h. Référencé par Draw(). |
|
Définition à la ligne 48 du fichier ExCCamera.h. Référencé par Draw(). |
|
Définition à la ligne 48 du fichier ExCCamera.h. Référencé par Draw(). |
|
Définition à la ligne 48 du fichier ExCCamera.h. Référencé par Draw(). |