#include <ExCCamera.h>
Graphe d'héritage de la classe ExCCamera

Membres publics | |
| ExCCamera (void) | |
| ~ExCCamera (void) | |
| virtual 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) |
| float | GetZoomMax (void) |
| float | GetZoomMin (void) |
| float | GetZoom (void) |
| float | GetZoomDefault (void) |
| void | SetClipFar (float clip) |
| void | SetClipNear (float clip) |
| float | GetClipFar (void) |
| float | GetClipNear (void) |
| void | StartAction (int Action) |
| void | StopAction (int Action) |
| void | Process (void) |
Attributs Publics | |
| int | m_CurrentAction |
| std::vector< int > | m_VecAction |
| std::vector< int >::iterator | m_ItVecAction |
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 |
|
|
Définition à la ligne 27 du fichier ExCCamera.cpp. Références ExCCamera(), Guard, ExCObject3D::m_AngleX, ExCObject3D::m_AngleY, ExCObject3D::m_AngleZ, m_ClipFar, m_ClipNear, ExCObject3D::m_speed, m_Zoom, m_ZoomDefault, m_ZoomMax, m_ZoomMin, ExCObject::SetName(), et ExCObject::SetType(). 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=100000000;
00039 m_ClipNear=1;
00040 SetName("ExCCamera");
00041 SetType(typeid(this).name());
00042 UnGuard
00043 }
|
|
|
Définition à la ligne 45 du fichier ExCCamera.cpp. Références ExCCamera(), et Guard.
|
|
|
Redéfinie à partir de ExCObject. Redéfinie dans ExCCameraChase, et ExCCameraTarget. Définition à la ligne 51 du fichier ExCCamera.cpp. Références DegreesToRadians(), Draw(), ExCVec3D::GetX(), ExCVec3D::GetY(), ExCVec3D::GetZ(), Guard, ExCObject3D::m_AngleX, ExCObject3D::m_AngleY, ExCObject3D::m_AngleZ, ExCObject3D::m_Position, ExCObject3D::m_speed, ExCObject3D::m_Target, ExCObject3D::m_Up, Process(), ExCVec3D::SetX(), ExCVec3D::SetY(), et ExCVec3D::SetZ(). Référencé par ExManagerCamera::Draw(), ExManagerCam::Draw(), Draw(), et ExManagerOutput::Reshape().
00052 {
00053 Guard(ExCCamera::Draw(void))
00054 //cout<<"Draw "<<m_ObjectName<<" ID:"<<m_ObjectId<<endl;
00055 Process();
00056
00057 if(m_AngleX<0)m_AngleX=359;
00058 if(m_AngleX>359)m_AngleX=0;
00059 if(m_AngleY<0)m_AngleY=359;
00060 if(m_AngleY>359)m_AngleY=0;
00061 if(m_AngleZ<0)m_AngleZ=359;
00062 if(m_AngleZ>359)m_AngleZ=0;
00063
00064 float cosY,cosP,cosR;
00065 float sinY,sinP,sinR;
00066
00067 cosY=cosf(DegreesToRadians(m_AngleY));
00068 cosP=cosf(DegreesToRadians(m_AngleX));
00069 cosR=cosf(DegreesToRadians(m_AngleZ));
00070
00071 sinY=sinf(DegreesToRadians(m_AngleY));
00072 sinP=sinf(DegreesToRadians(m_AngleX));
00073 sinR=sinf(DegreesToRadians(m_AngleZ));
00074
00075 ExCVec3D fwd,side;
00076
00077 fwd.SetX(sinY*cosP);
00078 fwd.SetY(sinP);
00079 fwd.SetZ(cosP*-cosY);
00080
00081 m_Target=fwd+m_Position;
00082
00083
00084 m_Up.SetX((-cosY*sinR)-(sinY*sinP*cosR));
00085 m_Up.SetY(cosP*cosR);
00086 m_Up.SetZ((-sinY*sinR)-(sinP*cosR*-cosY));
00087
00088 /* char buff[255];
00089 memset(buff,0,255);
00090 sprintf(buff,"Camera position X:%f Y:%f Z:%f",m_Position.GetX(),m_Position.GetY(),m_Position.GetZ());
00091 ExNihilo::WriteToScreen(30,540,buff);
00092 memset(buff,0,255);
00093 sprintf(buff,"Camera fwd X:%f Y:%f Z:%f",fwd.GetX(),fwd.GetY(),fwd.GetZ());
00094 ExNihilo::WriteToScreen(30,560,buff);
00095 memset(buff,0,255);
00096 sprintf(buff,"Camera target X:%f Y:%f Z:%f",m_Target.GetX(),m_Target.GetY(),m_Target.GetZ());
00097 ExNihilo::WriteToScreen(30,580,buff);
00098 memset(buff,0,255);
00099 sprintf(buff,"Camera angle X:%f Y:%f Z:%f",m_AngleX,m_AngleY,m_AngleZ);
00100 ExNihilo::WriteToScreen(30,600,buff);
00101 */
00102 gluLookAt(m_Position.GetX(),m_Position.GetY(),m_Position.GetZ()
00103 ,m_Target.GetX(),m_Target.GetY(),m_Target.GetZ()
00104 ,m_Up.GetX(),m_Up.GetY(),m_Up.GetZ());
00105
00106 m_Position=m_Position+((m_Target-m_Position)*m_speed);
00107
00108 UnGuard
00109 }
|
|
|
Définition à la ligne 77 du fichier ExCCamera.h. Référencé par ExManagerOutput::Reshape().
00078 {return m_ClipFar;}
|
|
|
Définition à la ligne 78 du fichier ExCCamera.h. Références m_ClipFar. Référencé par ExManagerOutput::Reshape().
00078 {return m_ClipFar;}
|
|
|
Définition à la ligne 72 du fichier ExCCamera.h. Références m_ZoomMin. Référencé par ExManagerOutput::Reshape().
00072 {return m_ZoomMin;}
|
|
|
Définition à la ligne 73 du fichier ExCCamera.h. Références m_Zoom.
00073 {return m_Zoom;}
|
|
|
Définition à la ligne 70 du fichier ExCCamera.h.
00071 {return m_ZoomMax;}
|
|
|
Définition à la ligne 71 du fichier ExCCamera.h. Références m_ZoomMax.
00071 {return m_ZoomMax;}
|
|
|
Définition à la ligne 192 du fichier ExCCamera.cpp. Références Guard, ExCObject3D::m_AngleX, ExCObject3D::m_AngleY, ExCObject3D::m_AngleZ, m_VecAction, Process(), ROTATE_X_DOWN, ROTATE_X_UP, ROTATE_Y_DOWN, ROTATE_Y_UP, ROTATE_Z_DOWN, ROTATE_Z_UP, SPEED_DOWN, SPEED_UP, ZOOM_DOWN, ZOOM_UP, ZoomIn(), et ZoomOut(). Référencé par Draw(), et Process().
00193 {
00194 Guard(void ExCCamera::Process(void))
00195 for(unsigned i=0;i<m_VecAction.size();i++)
00196 {
00197 switch(m_VecAction.at(i))
00198 {
00199 case ROTATE_Z_UP:m_AngleZ++;break;
00200 case ROTATE_Y_UP:m_AngleY++;break;
00201 case ROTATE_X_UP:m_AngleX++;break;
00202 case ROTATE_Z_DOWN:m_AngleZ--;break;
00203 case ROTATE_Y_DOWN:m_AngleY--;break;
00204 case ROTATE_X_DOWN:m_AngleX--;break;
00205 case ZOOM_UP:ZoomOut();break;
00206 case ZOOM_DOWN:ZoomIn();break;
00207 case SPEED_UP:break;
00208 case SPEED_DOWN:break;
00209 }
00210 }
00211 UnGuard
00212 }
|
|
|
Définition à la ligne 111 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomDefault, et ResetZoom(). Référencé par ResetZoom().
00112 {
00113 Guard(void ExCCamera::ResetZoom(void))
00114 m_Zoom=m_ZoomDefault;
00115 UnGuard
00116 }
|
|
|
Définition à la ligne 176 du fichier ExCCamera.cpp. Références Guard, m_ClipFar, m_ClipNear, et SetClipFar(). Référencé par SetClipFar().
00177 {
00178 Guard(void ExCCamera::SetClipFar(float clip))
00179 m_ClipFar=clip;
00180 if(m_ClipFar<m_ClipNear)m_ClipFar=m_ClipNear+1;
00181 UnGuard
00182 }
|
|
|
Définition à la ligne 184 du fichier ExCCamera.cpp. Références Guard, m_ClipFar, m_ClipNear, et SetClipNear(). Référencé par SetClipNear().
00185 {
00186 Guard(void ExCCamera::SetClipNear(float clip))
00187 m_ClipNear=clip;
00188 if(m_ClipNear>m_ClipFar)m_ClipNear=m_ClipFar-1;
00189 UnGuard
00190 }
|
|
|
Définition à la ligne 158 du fichier ExCCamera.cpp. Références Guard, et SetZoom(). Référencé par SetZoom().
00159 {
00160 Guard(void ExCCamera::SetZoom(float zoom))
00161 UnGuard
00162 }
|
|
|
Définition à la ligne 118 du fichier ExCCamera.cpp. Références Guard, m_ZoomDefault, et m_ZoomMin.
00119 {
00120 Guard(void ExCCamera:: SetZoomDefault(float zoom))
00121 if(zoom<m_ZoomMax&&zoom>m_ZoomMin)
00122 m_ZoomDefault=zoom;
00123 UnGuard
00124 }
|
|
|
Définition à la ligne 164 du fichier ExCCamera.cpp. Références Guard, et SetZoomMax(). Référencé par SetZoomMax().
00165 {
00166 Guard(void ExCCamera::SetZoomMax(float zoom))
00167 UnGuard
00168 }
|
|
|
Définition à la ligne 170 du fichier ExCCamera.cpp. Références Guard, et SetZoomMin(). Référencé par SetZoomMin().
00171 {
00172 Guard(void ExCCamera::SetZoomMin(float zoom))
00173 UnGuard
00174 }
|
|
|
Définition à la ligne 214 du fichier ExCCamera.cpp. Références Guard, m_VecAction, et StartAction(). Référencé par ExManagerCamera::InputAction(), et StartAction().
00215 {
00216 Guard(void ExCCamera::StartAction(int Action))
00217 m_VecAction.push_back(Action);
00218 UnGuard
00219 }
|
|
|
Définition à la ligne 221 du fichier ExCCamera.cpp. Références Guard, m_ItVecAction, m_VecAction, et StopAction(). Référencé par ExManagerCamera::InputAction(), et StopAction().
00222 {
00223 Guard(void ExCCamera::StopAction(int Action))
00224 for(m_ItVecAction=m_VecAction.begin();m_ItVecAction!=m_VecAction.end();m_ItVecAction++)
00225 {
00226 if(*m_ItVecAction==Action){m_VecAction.erase(m_ItVecAction);return;}
00227 }
00228 UnGuard
00229 }
|
|
|
Définition à la ligne 142 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMin, et ZoomIn().
|
|
|
Définition à la ligne 126 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMin, et ZoomIn(). Référencé par ExManagerCamera::InputAction(), Process(), et ZoomIn().
|
|
|
Définition à la ligne 150 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMax, et ZoomOut().
|
|
|
Définition à la ligne 134 du fichier ExCCamera.cpp. Références Guard, m_Zoom, m_ZoomMax, et ZoomOut(). Référencé par ExManagerCamera::InputAction(), Process(), et ZoomOut().
|
|
|
Définition à la ligne 41 du fichier ExCCamera.h. |
|
|
Définition à la ligne 43 du fichier ExCCamera.h. Référencé par ExCCamera(), GetClipNear(), SetClipFar(), et SetClipNear(). |
|
|
Définition à la ligne 44 du fichier ExCCamera.h. Référencé par ExCCamera(), SetClipFar(), et SetClipNear(). |
|
|
Définition à la ligne 80 du fichier ExCCamera.h. |
|
|
Définition à la ligne 82 du fichier ExCCamera.h. Référencé par StopAction(). |
|
|
Définition à la ligne 81 du fichier ExCCamera.h. Référencé par Process(), StartAction(), et StopAction(). |
|
|
Définition à la ligne 42 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoomDefault(), ResetZoom(), ZoomIn(), et ZoomOut(). |
|
|
Définition à la ligne 45 du fichier ExCCamera.h. Référencé par ExCCamera(), ResetZoom(), et SetZoomDefault(). |
|
|
Définition à la ligne 46 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoomMin(), et ZoomOut(). |
|
|
Définition à la ligne 47 du fichier ExCCamera.h. Référencé par ExCCamera(), GetZoom(), SetZoomDefault(), et ZoomIn(). |
1.3-rc1