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

Membres publics | |
| void | Reset (void) |
| void | BeforeDraw (void) |
| void | Draw (void) |
| void | Init (void) |
| ExCAction | InputCommand (ExCCommand Command) |
| ExCAction | InputAction (ExCAction Action) |
| void | SetAntialliasingState (bool state) |
| void | SetMotionBlurState (bool state) |
| bool | GetAntialliasingState (void) |
| bool | GetMotionBlurState (void) |
| void | MotionBlur (void) |
| void | CapturForMotionBlur (void) |
| void | Specialeffect (void) |
| void | SetSpecialEffect (int effect) |
| void | SetFlux (std::ostrstream *consol, ExCFluxAction *action) |
| bool | GetStatus (void) |
| void | SetStatus (bool status) |
| void | SetAskForCommand (bool status) |
| void | SetAskForExclusifCommand (bool status) |
| bool | AskForCommand (void) |
| bool | AskForExclusifCommand (void) |
| virtual void | Reload (void) |
Membres publics statiques | |
| ExManagerSpecialEffect * | CreateSingleton (void) |
Attributs Publics | |
| std::ostrstream * | Consol |
| ExCFluxAction * | FluxAction |
Attributs Protégés | |
| bool | m_Status |
| bool | m_AskForCommand |
| bool | m_Exclusif |
Membres privés | |
| ExManagerSpecialEffect (void) | |
| ~ExManagerSpecialEffect (void) | |
Attributs Privés | |
| bool | m_Antialliasing |
| bool | m_MotionBlur |
| bool | m_MotionBlurTexture |
| uint | TextureMotionBlur |
| int | m_effect |
| float | m_CouterEffect |
Attributs Privés Statiques | |
| bool | m_flag = false |
| ExManagerSpecialEffect * | m_instance = NULL |
|
|
Définition à la ligne 42 du fichier ExManagerSpecialEffect.cpp.
00043 {
00044 }
|
|
|
Définition à la ligne 46 du fichier ExManagerSpecialEffect.cpp.
00047 {
00048 }
|
|
|
Définition à la ligne 89 du fichier ExManager.h. Références ExManager::m_AskForCommand. Référencé par ExManagerCommand::InputCommand().
00089 {return m_AskForCommand;}
|
|
|
Définition à la ligne 90 du fichier ExManager.h. Références ExManager::m_Exclusif. Référencé par ExManagerCommand::InputCommand().
00090 {return m_Exclusif;}
|
|
|
Définition à la ligne 63 du fichier ExManagerSpecialEffect.cpp. Références m_effect, MOTION_BLUR, et MotionBlur(). Référencé par ExManagerOutput::DrawScene().
00064 {
00065 switch(m_effect)
00066 {
00067 case MOTION_BLUR:
00068 MotionBlur();
00069 break;
00070 }
00071 }
|
|
|
Définition à la ligne 174 du fichier ExManagerSpecialEffect.cpp. Références CapturForMotionBlur(), Guard, et UnGuard. Référencé par CapturForMotionBlur(), et Specialeffect().
00175 {
00176 Guard(void ExManagerSpecialEffect::CapturForMotionBlur(void))
00177 /* glEnable(GL_TEXTURE_2D);
00178 glBindTexture(GL_TEXTURE_2D,TextureMotionBlur);
00179 glReadBuffer(GL_FRONT);
00180 glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 256,256, 0);
00181 */
00182 unsigned char * imageData;
00183 imageData= (unsigned char*) malloc(ExNihilo::GetResolutionX()*ExNihilo::GetResolutionY()*3);
00184 memset(imageData,255, ExNihilo::GetResolutionX()* ExNihilo::GetResolutionY()* 3);
00185
00186 glReadBuffer(GL_FRONT);
00187 glReadPixels(0, 0, ExNihilo::GetResolutionX()- 1, ExNihilo::GetResolutionY()- 1, GL_RGB, GL_UNSIGNED_BYTE, imageData);
00188
00189 // Create the texture and store it on the video card
00190 glTexImage2D(GL_TEXTURE_2D, 0, 3, ExNihilo::GetResolutionX(), ExNihilo::GetResolutionY(), 0, GL_RGB, GL_UNSIGNED_BYTE, imageData);
00191
00192 // Set the texture quality
00193 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
00194 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
00195
00196
00197 UnGuard
00198 }
|
|
|
Définition à la ligne 28 du fichier ExManagerSpecialEffect.cpp. Références CreateSingleton(), Guard, m_flag, m_instance, et UnGuard. Référencé par CreateManager(), et CreateSingleton().
00028 {
00029 Guard(ExManagerSpecialEffect* ExManagerSpecialEffect::CreateSingleton(void))
00030 if(!m_flag)
00031 {
00032 m_flag = true; // We are creating the error log now, so set flag to true
00033 m_instance = new ExManagerSpecialEffect; // Create the error log
00034 }else
00035 {
00036 std::cout<<"Error singleton already created"<<std::endl;
00037 }
00038 return m_instance;
00039 UnGuard
00040 }
|
|
|
Définition à la ligne 58 du fichier ExManagerSpecialEffect.cpp. Références Specialeffect(). Référencé par ExManagerOutput::DrawScene().
00059 {
00060 Specialeffect();
00061 }
|
|
|
Définition à la ligne 106 du fichier ExManagerSpecialEffect.h. Références m_Antialliasing.
00106 {return m_Antialliasing;}
|
|
|
Définition à la ligne 107 du fichier ExManagerSpecialEffect.h. Références m_MotionBlur.
00107 {return m_MotionBlur;}
|
|
|
Définition à la ligne 85 du fichier ExManager.h. Références ExManager::m_Status. Référencé par ExManagerInterface::Draw(), ExManagerConsole::Draw(), et ExManagerOutput::DrawScene().
00085 {return m_Status;}
|
|
|
Redéfinie à partir de ExManager. Définition à la ligne 54 du fichier ExManagerSpecialEffect.cpp.
00055 {
00056 }
|
|
|
|
Redéfinie à partir de ExManager. Définition à la ligne 367 du fichier ExManagerSpecialEffect.cpp. Références Guard, InputCommand(), NOTHING, et UnGuard. Référencé par InputCommand().
00368 {
00369 Guard(ExCAction ExManagerSpecialEffect::InputCommand(ExCCommand Command))
00370 /* switch(Command.m_Command)
00371 {
00372 }*/
00373 return NOTHING;
00374 UnGuard
00375 } |
|
|
Définition à la ligne 92 du fichier ExManagerSpecialEffect.cpp. Références ExNihilo::EnterOrthoMode(), Guard, ExNihilo::LeaveOrthoMode(), m_MotionBlurTexture, MotionBlur(), TextureMotionBlur, et UnGuard. Référencé par BeforeDraw(), et MotionBlur().
00093 {
00094 Guard(void ExManagerSpecialEffect::MotionBlur(void))
00095 if(!m_MotionBlurTexture)
00096 {
00097 // Create a pointer to store the blank image data
00098 unsigned int *pTexture = NULL;
00099
00100 // Allocate and init memory for the image array and point to it from pTexture
00101 pTexture = new unsigned int [512 * 512 * 3];
00102 memset(pTexture, 0, 512 * 512 * 3 * sizeof(unsigned int));
00103
00104 // Register the texture with OpenGL and bind it to the texture ID
00105 glGenTextures(1, &TextureMotionBlur);
00106 glBindTexture(GL_TEXTURE_2D, TextureMotionBlur);
00107
00108 // Create the texture and store it on the video card
00109 glTexImage2D(GL_TEXTURE_2D, 0, 3, 512, 512, 0, GL_RGB, GL_UNSIGNED_INT, pTexture);
00110
00111 // Set the texture quality
00112 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
00113 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
00114
00115 // Since we stored the texture space with OpenGL, we can delete the image data
00116 delete [] pTexture;
00117 m_MotionBlurTexture=true;
00118 }
00119
00120 // Push on a new stack so that we do not interfere with the current matrix
00121 glPushMatrix();
00122
00123 // Turn off depth testing so that we can blend over the screen
00124 glDisable(GL_DEPTH_TEST);
00125
00126 // Set our blend method and enable blending
00127 //glBlendFunc(GL_SRC_ALPHA,GL_ONE);
00128 //glEnable(GL_BLEND);
00129
00130
00131 // Decrease the alpha value of the blend by %10 so it will fade nicely
00132 glColor4f(1, 1, 1, 0.9f);
00133
00134 // Switch to 2D mode (Ortho mode)
00135 ExNihilo::EnterOrthoMode();
00136
00137 // Display a 2D quad with our blended texture
00138 glEnable(GL_TEXTURE_2D);
00139 glBindTexture(GL_TEXTURE_2D,TextureMotionBlur);
00140 glBegin(GL_QUADS);
00141
00142
00143 // Display the top left point of the 2D image
00144 glTexCoord2f(0.0f, 1.0f); glVertex2f(100, 100);
00145
00146 // Display the bottom left point of the 2D image
00147 //glTexCoord2f(0.0f, 0.0f); glVertex2f(0, ExNihilo::GetResolutionY());
00148 glTexCoord2f(0.0f, 0.0f); glVertex2f(100, 180);
00149
00150 // Display the bottom right point of the 2D image
00151 //glTexCoord2f(1.0f, 0.0f); glVertex2f(ExNihilo::GetResolutionX(), ExNihilo::GetResolutionY());
00152 glTexCoord2f(1.0f, 0.0f); glVertex2f(180, 180);
00153
00154 // Display the top right point of the 2D image
00155 //glTexCoord2f(1.0f, 1.0f); glVertex2f(ExNihilo::GetResolutionX(), 0);
00156 glTexCoord2f(1.0f, 1.0f); glVertex2f(180, 100);
00157
00158 // Stop drawing
00159 glEnd();
00160 glDisable(GL_TEXTURE_2D);
00161 // Let's set our mode back to perspective 3D mode.
00162 ExNihilo::LeaveOrthoMode();
00163
00164 // Turn depth testing back on and texturing off. If you do NOT do these 2 lines of
00165 // code it produces a cool flash effect that might come in handy somewhere down the road.
00166 glEnable(GL_DEPTH_TEST);
00167 glDisable(GL_BLEND);
00168
00169 // Go back to our original matrix
00170 glPopMatrix();
00171 UnGuard
00172 }
|
|
|
|
Redéfinie à partir de ExManager. Définition à la ligne 50 du fichier ExManagerSpecialEffect.cpp.
00051 {
00052 }
|
|
|
Définition à la ligne 73 du fichier ExManagerSpecialEffect.cpp. Références Guard, m_Antialliasing, SetAntialliasingState(), et UnGuard. Référencé par SetAntialliasingState().
00074 {
00075 Guard(void ExManagerSpecialEffect::SetAntialliasingState(bool state))
00076 m_Antialliasing=state;
00077 if(m_Antialliasing)
00078 {
00079 glEnable(GL_LINE_SMOOTH);
00080 glEnable(GL_BLEND);
00081 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00082 glHint(GL_LINE_SMOOTH_HINT,GL_DONT_CARE);
00083 }else
00084 {
00085 glDisable(GL_LINE_SMOOTH);
00086 glDisable(GL_BLEND);
00087 }
00088 UnGuard
00089 }
|
|
|
Définition à la ligne 87 du fichier ExManager.h. Références ExManager::m_AskForCommand. Référencé par ExManagerConsole::ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), ExManagerConsole::InputAction(), ExManagerNetwork::InputCommand(), ExManagerLoad::LoadSetOfFile(), et ExManagerNetwork::Say().
00087 {m_AskForCommand=status;}
|
|
|
Définition à la ligne 88 du fichier ExManager.h. Références ExManager::m_Exclusif. Référencé par ExManagerConsole::ExManagerConsole(), ExManagerModel::ExManagerModel(), ExManagerObjectWindow::Init(), ExManagerNetwork::Init(), ExManagerConsole::InputAction(), ExManagerNetwork::InputCommand(), et ExManagerNetwork::Say().
00088 {m_Exclusif=status;}
|
|
||||||||||||
|
Définition à la ligne 35 du fichier ExManager.cpp. Références ExManager::Consol, et ExManager::FluxAction. Référencé par SetManagerLink().
00036 {
00037 Consol=consol;
00038 FluxAction=action;
00039 }
|
|
|
Définition à la ligne 105 du fichier ExManagerSpecialEffect.h. Références m_MotionBlur.
00105 {m_MotionBlur=state;}
|
|
|
Définition à la ligne 325 du fichier ExManagerSpecialEffect.cpp. Références BLACK_TO_FADE, FADE_TO_BLACK, FADE_TO_WHITE, m_CouterEffect, m_effect, et WITHE_TO_FADE. Référencé par InputAction().
00326 {
00327 //std::cout<<"changeefftect"<<std::endl;
00328 m_effect=effect;
00329 switch(m_effect)
00330 {
00331 case FADE_TO_WHITE:
00332 m_CouterEffect=0;
00333 break;
00334 case WITHE_TO_FADE:
00335 m_CouterEffect=256;
00336 break;
00337 case FADE_TO_BLACK:
00338 m_CouterEffect=0;
00339 break;
00340 case BLACK_TO_FADE:
00341 m_CouterEffect=256;
00342 break;
00343 }
00344 }
|
|
|
Définition à la ligne 86 du fichier ExManager.h. Références ExManager::m_Status. Référencé par ExManagerConsole::Draw(), ExManagerConsole::ExManagerConsole(), ExManagerObjectWindow::Init(), ExManagerInterface::Init(), ExManagerConsole::InputAction(), ExManagerLoad::LoadSetOfFile(), et ExManagerConsole::SetConsoleState().
00086 {m_Status=status;}
|
|
|
Définition à la ligne 200 du fichier ExManagerSpecialEffect.cpp. Références BLACK_TO_FADE, CapturForMotionBlur(), ExNihilo::EnterOrthoMode(), FADE_TO_BLACK, FADE_TO_WHITE, ExManager::FluxAction, ExNihilo::LeaveOrthoMode(), LOAD_EXEC_CONFIG_FILE, m_CouterEffect, m_effect, ExCAction::m_Param, MOTION_BLUR, ExCFluxAction::Push(), uchar, et WITHE_TO_FADE. Référencé par Draw().
00201 {
00202 switch(m_effect)
00203 {
00204 case FADE_TO_WHITE:
00205 glColor4ub(255,255,255, (uchar)m_CouterEffect);
00206 ExNihilo::EnterOrthoMode();
00207
00208 glEnable(GL_BLEND);
00209 glDisable(GL_DEPTH_TEST);
00210 glBlendFunc(GL_SRC_ALPHA,GL_ONE);
00211
00212 glBegin(GL_QUADS);
00213 glVertex2f(0, 0);
00214 glVertex2f(0, ExNihilo::GetResolutionY());
00215 glVertex2f(ExNihilo::GetResolutionX(), ExNihilo::GetResolutionY());
00216 glVertex2f(ExNihilo::GetResolutionX(), 0);
00217 glEnd();
00218
00219 glDisable(GL_BLEND);
00220 glEnable(GL_DEPTH_TEST);
00221
00222 ExNihilo::LeaveOrthoMode();
00223 m_CouterEffect++;
00224
00225 if(m_CouterEffect>255)
00226 {
00227 m_CouterEffect=0;
00228 m_effect=0;
00229 }
00230 break;
00231 case WITHE_TO_FADE:
00232 glColor4ub(255,255,255, m_CouterEffect);
00233 ExNihilo::EnterOrthoMode();
00234
00235 glEnable(GL_BLEND);
00236 glDisable(GL_DEPTH_TEST);
00237 glBlendFunc(GL_SRC_ALPHA,GL_ONE);
00238
00239 glBegin(GL_QUADS);
00240 glVertex2f(0, 0);
00241 glVertex2f(0, ExNihilo::GetResolutionY());
00242 glVertex2f(ExNihilo::GetResolutionX(), ExNihilo::GetResolutionY());
00243 glVertex2f(ExNihilo::GetResolutionX(), 0);
00244 glEnd();
00245
00246 glDisable(GL_BLEND);
00247 glEnable(GL_DEPTH_TEST);
00248
00249 ExNihilo::LeaveOrthoMode();
00250 m_CouterEffect--;
00251
00252 if(m_CouterEffect<1)
00253 {
00254 m_CouterEffect=255;
00255 m_effect=0;
00256 }
00257 break;
00258 case FADE_TO_BLACK:
00259 glColor4ub(0,0,0, m_CouterEffect);
00260 ExNihilo::EnterOrthoMode();
00261
00262 glEnable(GL_BLEND);
00263 glDisable(GL_DEPTH_TEST);
00264 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00265
00266 glBegin(GL_QUADS);
00267 glVertex2f(0, 0);
00268 glVertex2f(0, ExNihilo::GetResolutionY());
00269 glVertex2f(ExNihilo::GetResolutionX(), ExNihilo::GetResolutionY());
00270 glVertex2f(ExNihilo::GetResolutionX(), 0);
00271 glEnd();
00272
00273 glDisable(GL_BLEND);
00274 glEnable(GL_DEPTH_TEST);
00275
00276 ExNihilo::LeaveOrthoMode();
00277 m_CouterEffect++;
00278
00279 if(m_CouterEffect>255)
00280 {
00281 m_CouterEffect=0;
00282 m_effect=0;
00283 }
00284
00285 if(m_CouterEffect==230)
00286 {
00287 //return end action
00288 ExCAction Action(LOAD_EXEC_CONFIG_FILE);
00289 Action.m_Param=" lotr1.exec";
00290 FluxAction->Push(Action);
00291 }
00292 break;
00293 case BLACK_TO_FADE:
00294 glColor4ub(0,0,0, m_CouterEffect);
00295 ExNihilo::EnterOrthoMode();
00296
00297 glEnable(GL_BLEND);
00298 glDisable(GL_DEPTH_TEST);
00299 glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
00300
00301 glBegin(GL_QUADS);
00302 glVertex2f(0, 0);
00303 glVertex2f(0, ExNihilo::GetResolutionY());
00304 glVertex2f(ExNihilo::GetResolutionX(), ExNihilo::GetResolutionY());
00305 glVertex2f(ExNihilo::GetResolutionX(), 0);
00306 glEnd();
00307
00308 glDisable(GL_BLEND);
00309 glEnable(GL_DEPTH_TEST);
00310
00311 ExNihilo::LeaveOrthoMode();
00312 m_CouterEffect--;
00313
00314 if(m_CouterEffect<1)
00315 {
00316 m_CouterEffect=255;
00317 m_effect=0;
00318 }
00319 break;
00320 case MOTION_BLUR:
00321 CapturForMotionBlur();
00322 break;
00323 }
00324 }
|
|
|
|
Définition à la ligne 74 du fichier ExManager.h. Référencé par ExManagerWindow::Apply(), ExManagerCommand::ApplyAction(), ExManagerCommand::LoadExecFile(), ExManagerId::RecordObject(), ExManager::SetFlux(), et Specialeffect(). |
|
|
Définition à la ligne 79 du fichier ExManagerSpecialEffect.h. Référencé par GetAntialliasingState(), et SetAntialliasingState(). |
|
|
Définition à la ligne 70 du fichier ExManager.h. Référencé par ExManager::AskForCommand(), ExManagerConsole::ExManagerConsole(), et ExManager::SetAskForCommand(). |
|
|
Définition à la ligne 84 du fichier ExManagerSpecialEffect.h. Référencé par SetSpecialEffect(), et Specialeffect(). |
|
|
Définition à la ligne 83 du fichier ExManagerSpecialEffect.h. Référencé par BeforeDraw(), SetSpecialEffect(), et Specialeffect(). |
|
|
Définition à la ligne 71 du fichier ExManager.h. Référencé par ExManager::AskForExclusifCommand(), et ExManager::SetAskForExclusifCommand(). |
|
|
Définition à la ligne 25 du fichier ExManagerSpecialEffect.cpp. Référencé par CreateSingleton(). |
|
|
Définition à la ligne 26 du fichier ExManagerSpecialEffect.cpp. Référencé par CreateSingleton(). |
|
|
Définition à la ligne 80 du fichier ExManagerSpecialEffect.h. Référencé par GetMotionBlurState(), et SetMotionBlurState(). |
|
|
Définition à la ligne 81 du fichier ExManagerSpecialEffect.h. Référencé par MotionBlur(). |
|
|
Définition à la ligne 69 du fichier ExManager.h. Référencé par ExManager::GetStatus(), et ExManager::SetStatus(). |
|
|
Définition à la ligne 82 du fichier ExManagerSpecialEffect.h. Référencé par MotionBlur(). |
1.3.4