Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

ControlEngine Class Reference

Gestion du moteur de rendu des controls. More...

#include <controlEngine.h>

List of all members.

Public Member Functions

 ControlEngine ()
 ~ControlEngine ()
void Start (HINSTANCE hInstance)
void Stop ()
void Loop ()
void InitViewPort (int deltaX, int deltaY)
void Setup (int deltaX, int deltaY)
void Refresh (BOOL setSize)
void SetTimerRefresh (int value)
int OnRefresh (Timer *timer)
BOOL Push (Control *control)
ControlPop ()
ControlPeek ()
void InitMonitor ()
 Init des moniteurs.

BOOL InitFont ()
void InitTextures ()
void InitLights ()
void EndFont ()
void Draw ()
BOOL DrawBackGround ()
void DrawScene (BOOL isPicking)
void DrawLight ()
void DrawCursors ()
void DrawCursor (Point2D< int > pos, Color color, BOOL isDrawInertia)
void Draw2DText (int xCenter, int yCenter, int x, int y, char *text, Color *color=NULL)
BOOL DrawOrigineRepere ()
BOOL DrawFPS ()
void MajLights ()
float GiveFPS ()
void SetPerspective (float xJitter, float yJiiter)
void ApplyScaleView ()
BOOL RegionAdd (double x, double y)
BOOL RegionGet (double x, double y, Point3D< double > *pt)
LRESULT Proc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
void ScreenShot (TypeScreenShot type)
double ComputeRealZ (double logicZ)
BOOL ProjectWindowToObject (Point3D< GLdouble > &windowPos, Point3D< GLdouble > *objectPos)
BOOL ProjectWindowToObject (GLdouble windowPosX, GLdouble windowPosY, GLdouble windowPosZ, GLdouble *objectPosX, GLdouble *objectPosY, GLdouble *objectPosZ)
BOOL ProjectObjectToWindow (Point3D< GLdouble > &objectPos, Point3D< GLdouble > *windowPos)
BOOL ProjectObjectToWindow (GLdouble objectPosX, GLdouble objectPosY, GLdouble objectPosZ, GLdouble *windowPosX, GLdouble *windowPosY, GLdouble *windowPosZ)

Public Attributes

PerfMonitor monitor
 test de performance

Primitive primitive
 primitive graphic 3D

MyTree< Facetrash
 les primitive qui ne sont pas a afficher

Fog fog
 gestion du brouillard

Light lights [4]
 gestion des lumiere

BOOL enableAntiAliasing
 utilisation de l'antialiasing

int antiAliasingQuality
 qualité de l'antialiasing

BOOL enableCursor
 affiche le curseur (curseur OpenGL par window)

BOOL enableRepere
 affiche un repere 3D (x,y,z)

BOOL enableLightView
 affiche des boite representant les lumieres

BOOL enableFPS
 affiche les "Frams Par Secondes"

TiptipFPS
 control d'affichage de la tool tip

Cursor cursor
 gestrion de l'affichage du curseur de la souris

BOOL enableInertia
 utilise l'inertie

BOOL enableViewInertia
 affiche le vecteur directeur de l'inertie

PolygonMode polygonMode
 type de calcul sur les poylgone Fill,Line,Point

Box3D boxLights [3]
 boite d'affichage des lumieres

GLdouble aspect
 ratio hauteur/lageur

Screen screenMain
 Gestion de la fenetre d'affichage.

Screen screenSystray
 Gestion du systray.

Screen screenConfig
 Gestion des config.

HINSTANCE hInst
 HINSTANCE de l'application.

double dxWin
 taille x de la fenetre a l'initialisation

double dyWin
 taille y de la fenetre a l'initialisation

int cpuLimit
 limit du CPU utilisable par le moteur de 3D

GLdouble projMatrix [16]
 matrice de projection

GLdouble modelMatrix [16]
 matrice modele

GLint viewPort [4]
 point de vue

int refreshTime
 taux de rafraichisement l'affichage ==> FPS

BOOL enablePicking
 picking activée ?

BOOL enableDelta
 deplacement par delta

BOOL enableBackGround
 affiche un fond

GLdouble depth
 distance z du point de vue

BOOL lightsMove [4]
 les lumieres bouge t'elle ?

Timer timerRefresh
 evenement de rafraichissement

Universunivers
 control par defaut

TaskWindowtaskWindow
 gestion des task en cours ou minimisé

MasterContainermasterContainer
 contien les desktop

StateKey key
 etat de touche

Picking pickingCursor
 ce a quoi reference le curseur (control,souris)

Picking pickingInertia
 ce a quoi reference l'inertie en cours (control,souris)

int usingInertia
 donne le nombre d'inertie en cours

EventInertia eventInertia [3]
 gestion de linertie pour le bouton gauche,centre et droit de la souris

FTFont * fontPixmap
 fonte pour text droit

FTFont * fontTexture
 fonte pour text ordinaire, rapide & antialiasé

FTFont * fontExtrude
 fonte pour text avec volume

FTFont * fontOutline
 fonte pour text non remplie, rapide

FTFont * fontPolygon
 fonte en resolution polygon, lente & non antialiasé

FTFont * fontBitmap
 fonte par bitmap

Textures texture
 les texture static


Detailed Description

Gestion du moteur de rendu des controls.

Genere l'affichage et lance les calculs des faces en integrant les messages des controls internes

Definition at line 131 of file controlEngine.h.


Constructor & Destructor Documentation

ControlEngine::ControlEngine  ) 
 

Constructeur:

  • Chargement de la config via la registry (HKCU controls)
  • Creation de l'univers

Arboresence de la resitry: HKCU controls

  • : configuration des lumieres
    • move0 (BOOL) [FALSE] si actif rotation sur les Y de l'univers
    • move1 (BOOL) [FALSE] si actif rotation sur les X de l'univers
    • move2 (BOOL) [FALSE] si actif deplacement par rapport a la souris (effet highlight)
    • enable0 (BOOL) [FALSE]
    • enable1 (BOOL) [FALSE]
    • enable2 (BOOL) [TRUE]
  • : configuration du brouillard
    • enable (BOOL) [FALSE]
    • start (float) [4.5]
    • end (float) [6]
    • density (float) [0.3];
    • mode (FogMode) [linear];
  • enableAntiAliasing (BOOL) [FALSE]
  • enableRepere (BOOL) [FALSE]
  • enableLightView (BOOL) [FALSE]
  • enablePicking (BOOL) [TRUE]
  • enableDelta (BOOL) [FALSE]
  • enableBackGround (BOOL) [TRUE]
  • enableFPS (BOOL) [FALSE]
  • enableInertia (BOOL) [FALSE]
  • enableMonitor (BOOL) [FALSE]
  • enableViewInertia (BOOL) [TRUE]
  • enableFullScreen (BOOL) [TRUE]
  • enableTitle (BOOL) [FALSE]
  • enableRegion (BOOL) [FALSE]
  • polygonModeFront () [fill]
  • polygonModeBack",() [fill]
  • dxWin (double) [500]
  • dyWin (double) [400]
  • timerRefresh (int) [30]
  • cpuLimit (int) [100%]

Todo:
Gestion multi univers (equivalent 2d: multi desktop), fair une class infinte ?

Definition at line 68 of file controlEngine.cpp.

References MyTree< Face >::Add(), antiAliasingQuality, aspect, PolygonMode::back, Fog::color, cpuLimit, TaskWindow::Create(), Univers::Create(), MasterContainer::Create(), DEFAULT_ANTIALIASING, DEFAULT_ANTIALIASING_QUALITY, DEFAULT_CPU_LIMIT, DEFAULT_DELTA, DEFAULT_FOG_DENSITY, DEFAULT_FOG_ENABLE, DEFAULT_FOG_END, DEFAULT_FOG_MODE, DEFAULT_FOG_START, DEFAULT_FULLSCREEN, DEFAULT_INERTIA, DEFAULT_LIGHT_ENABLE0, DEFAULT_LIGHT_ENABLE1, DEFAULT_LIGHT_ENABLE2, DEFAULT_LIGHT_MOVE0, DEFAULT_LIGHT_MOVE1, DEFAULT_LIGHT_MOVE2, DEFAULT_MONITOR, DEFAULT_PICKING, DEFAULT_POLYGON_BACK, DEFAULT_POLYGON_FRONT, DEFAULT_TIMER_REFRESH, DEFAULT_TITLED, DEFAULT_VIEW_BACKGROUND, DEFAULT_VIEW_FPS, DEFAULT_VIEW_INERTIA, DEFAULT_VIEW_LIGHT, DEFAULT_VIEW_REGION, DEFAULT_VIEW_REPERE, DEFAULT_XSIZE, DEFAULT_YSIZE, MyRegistry::DeleteKey(), Fog::density, depth, dxWin, dyWin, Region::enable, enableAntiAliasing, enableBackGround, enableCursor, enableDelta, enableFPS, Screen::enableFullScreen, enableInertia, enableLightView, enablePicking, enableRepere, Screen::enableTitle, enableViewInertia, Fog::end, eventInertia, f, fog, PolygonMode::front, MyRegistry::GetValue(), hInst, EventInertia::Init(), InitFont(), InitMonitor(), Fog::isEnable, lights, lightsMove, masterContainer, Fog::mode, monitor, Face::name, polygonMode, Pop(), Push(), refreshTime, Screen::region, screenMain, Color::Set(), Fog::start, taskWindow, MyRegistry::TestKey(), tipFPS, trash, univers, usingInertia, and VERSION.

ControlEngine::~ControlEngine  ) 
 

Destructeur:

  • Ecrit la registry ==> sauvegarde de la config
  • Detruit la fenetre

Definition at line 170 of file controlEngine.cpp.

References antiAliasingQuality, PolygonMode::back, cpuLimit, Fog::density, Screen::dxNormal, Screen::dyNormal, Region::enable, enableAntiAliasing, enableBackGround, enableDelta, enableFPS, Screen::enableFullScreen, enableInertia, enableLightView, enablePicking, enableRepere, Screen::enableTitle, enableViewInertia, Fog::end, EndFont(), fog, PolygonMode::front, Fog::isEnable, lights, lightsMove, Fog::mode, monitor, polygonMode, refreshTime, Screen::region, screenMain, MyRegistry::SetValue(), Fog::start, Stop(), taskWindow, univers, and VERSION.


Member Function Documentation

void ControlEngine::ApplyScaleView  ) 
 

Le scaling permet de se placer dans un univers borné a la resolution de la fenetre englobante trouver l'equation permetant de calculer la constante du scaling (permetra de faire varié de depth) en effet la constante est liée au depth pour : (empiriquement) depth=15 => 12.4 depth=10 => 8.28

Definition at line 647 of file controlEngine.cpp.

References dyWin.

Referenced by Draw(), and Primitive::GetCorners().

double ControlEngine::ComputeRealZ double  logicZ  ) 
 

Calcul du zReel par rapport a un zLogic

  1. rendre lineaire la distance zBuffer de zDistOfSelected 1/(2-zDistOfSelected) grosse bidouille de la mort, qui rend lineaire de 10-100 !attention <2 plus du tout lineaire
  2. equation de la droite par interpolation lineaire

Parameters:
logicZ: valeur obtenu par le picking d'OpenGL
Returns:
valeur du zReel

Definition at line 1016 of file controlEngine.cpp.

References alpha.

Referenced by Control::ScreenMove(), and Control::ScreenMoveTo().

void ControlEngine::Draw  ) 
 

Affichage du rendu graphics

Definition at line 800 of file controlEngine.cpp.

References antiAliasingQuality, ApplyScaleView(), Recorder::BeginRecord(), BOOL(), depth, DrawBackGround(), DrawCursors(), DrawFPS(), DrawLight(), DrawOrigineRepere(), DrawScene(), enableAntiAliasing, enablePicking, Recorder::EndRecord(), f, GL_MULTISAMPLE_ARB, modelMatrix, monitor, pickingCursor, pickingInertia, Recorder::Play(), projMatrix, SetPerspective(), Picking::Test(), and usingInertia.

Referenced by Proc().

void ControlEngine::Draw2DText int  xCenter,
int  yCenter,
int  x,
int  y,
char *  text,
Color color = NULL
 

Affiche un text au coordonnée d'ecrant

Parameters:
xCenter: positioneement de base en X {-1=gauche,0=xcentré,1=droite)
yCenter: positioneement de base en Y {-1=haut,0=ycentré,1=base)
x,y: position du text par rapport a la fenetre (2D)
text: le text a afficher
color: couleur du test a afficher (emission)

Definition at line 515 of file controlEngine.cpp.

References deltaXwin, deltaYwin, Material::emission, f, fontTexture, Point3D< T >::glTranslated(), modelMatrix, projMatrix, Color::SetFull(), Material::Use(), viewPort, Point3D< T >::x, Point3D< T >::y, and Point3D< T >::z.

BOOL ControlEngine::DrawBackGround  ) 
 

Affiche un fond a l'univers

Returns:
l'affichage a il ete effectué ?

Definition at line 888 of file controlEngine.cpp.

References BOOL(), MyTreeNode< T >::elem, Material::emission, enableBackGround, Control::faceNode, Color::Set(), Color::SetNull(), Material::SetNull(), texture, univers, and Material::Use().

Referenced by Draw().

void ControlEngine::DrawCursor Point2D< int >  mousePos,
Color  color,
BOOL  isDrawInertia
 

Affiche un curseur positionné a Z=15

Parameters:
mousePos: position de la souris 2D
color: couleur du curseur (permet a inertia d'etre en bleu par ex.)
isDrawInertia: affiche-ton le vecteur directeur d'inertia ?

Definition at line 499 of file controlEngine.cpp.

References cursor, Cursor::curType, Cursor::Draw(), MyTreeNode< T >::elem, Control::faceNode, Cursor::GetHotSpot(), Cursor::Rotate(), univers, Point2D< T >::x, and Point2D< T >::y.

Referenced by DrawCursors().

void ControlEngine::DrawCursors  ) 
 

Affiche le curseur de souris (en attendant une classe de gestions complete)

Definition at line 475 of file controlEngine.cpp.

References DrawCursor(), enableCursor, modelMatrix, Picking::mouse, pickingCursor, pickingInertia, StateMouse::pos, projMatrix, Color::Set(), Color::SetFull(), and usingInertia.

Referenced by Draw().

BOOL ControlEngine::DrawFPS  ) 
 

Affiche les FPS (Frame Par Seconde)

Returns:
l'affichage c'est il fait ?

Definition at line 565 of file controlEngine.cpp.

References BOOL(), ce, Tip::Create(), enableFPS, MyString::Format(), GiveFPS(), masterContainer, Pop(), Push(), Tip::SetText(), tipFPS, Control::XDockLeft(), and Control::YDockTop().

Referenced by Draw().

void ControlEngine::DrawLight  ) 
 

Materialise par des boite (Box3D) les lumieres activée

Definition at line 941 of file controlEngine.cpp.

References boxLights, Box3D::CenterIt(), Box3D::coor, count, deltaXwin, deltaYwin, depth, Light::direction, Box3D::Draw(), enableLightView, Light::IsEnabled(), lights, lightsMove, MajLights(), Picking::mouse, pickingCursor, StateMouse::pos, Light::position, Coordonate< GLfloat >::Set(), Point2D< int >::x, Coordonate< GLfloat >::x, Point2D< int >::y, Coordonate< GLfloat >::y, and Coordonate< GLfloat >::z.

Referenced by Draw().

BOOL ControlEngine::DrawOrigineRepere  ) 
 

Affiche une repere X,Y,Z a l'origine de l'univers

Definition at line 554 of file controlEngine.cpp.

References BOOL(), Object3D::DrawRepere(), and enableRepere.

Referenced by Draw().

void ControlEngine::DrawScene BOOL  isPicking  ) 
 

Affiche la scene

Definition at line 932 of file controlEngine.cpp.

References Primitive::Draw(), and primitive.

Referenced by Draw(), and Picking::Test().

void ControlEngine::EndFont  ) 
 

Detruit les fontes globale

Definition at line 298 of file controlEngine.cpp.

References fontBitmap, fontExtrude, fontOutline, fontPixmap, fontPolygon, and fontTexture.

Referenced by ~ControlEngine().

float ControlEngine::GiveFPS  ) 
 

Calcul le nombre deframe par secondes (doit etre appeler a chaque rafraichissement)

System par moyenage de SIZE_LIST element (pour eviter les valeurs instantannée)

Definition at line 608 of file controlEngine.cpp.

References MyStack< T >::FrontPop(), MyList< T >::GetNbElem(), MyStack< T >::Push(), SIZE_LIST, and TIME_TO_VIEW.

Referenced by DrawFPS().

BOOL ControlEngine::InitFont  ) 
 

Initialisation des fontes globale

But: optimisation, car evite de charger et decharger sans cesse des fontes

Definition at line 269 of file controlEngine.cpp.

References BOOL(), FONT_FILE, fontBitmap, fontExtrude, fontOutline, fontPixmap, fontPolygon, and fontTexture.

Referenced by ControlEngine().

void ControlEngine::InitLights  ) 
 

Configuration des lumieres

  • lumiere 0 a 2 lumiere ponctuel
  • lumiere 3, lumiere ambiante non ponctuel

Definition at line 701 of file controlEngine.cpp.

References BOOL(), Light::cutoff, depth, Light::exponent, Light::isEnable, lights, MajLights(), Light::material, Light::position, Coordonate< GLfloat >::Set(), Material::SetDS(), and Light::SetLighting().

Referenced by Start().

void ControlEngine::InitMonitor  ) 
 

Init des moniteurs.

Definition at line 310 of file controlEngine.cpp.

References monitor.

Referenced by ControlEngine().

void ControlEngine::InitTextures  ) 
 

Chargemenet des textures de base (pour bouton standart etc ...)

  • Bouton fermer
  • Bouton minimiser
  • Bouton maximisé

Definition at line 737 of file controlEngine.cpp.

References texture.

Referenced by Start().

void ControlEngine::InitViewPort int  deltaX,
int  deltaY
 

Initialise la taille & perspective de la fenetre OpenGL

Parameters:
deltaX: taille X de la fenetre
deltaY: taille Y de la fenetre

Definition at line 401 of file controlEngine.cpp.

References aspect, SetPerspective(), and viewPort.

Referenced by Setup().

void ControlEngine::Loop  ) 
 

Absobstion dela boucle de message

Definition at line 386 of file controlEngine.cpp.

Referenced by WinMain().

void ControlEngine::MajLights  ) 
 

Mise a jout des lumieres: utilisation de leur preselection , et affichage

Definition at line 781 of file controlEngine.cpp.

References boxLights, Box3D::coor, Box3D::delta, Material::emission, lights, Light::material, Box3D::material, Coordonate< GLfloat >::Set(), Material::specular, Light::Use(), and Coordonate< GLfloat >::z.

Referenced by ApplyParamObj(), DrawLight(), and InitLights().

int ControlEngine::OnRefresh Timer timer  ) 
 

A chaque timer ==> refresh graphics

Parameters:
timer: source TimerEvent d'origine

Definition at line 1032 of file controlEngine.cpp.

References Screen::hWnd, and screenMain.

Referenced by SetTimerRefresh().

Control * ControlEngine::Peek  ) 
 

Definition at line 1380 of file controlEngine.cpp.

References MyList< Control * >::GetNbElem(), and MyStack< Control * >::Peek().

Referenced by Control::SetParent().

Control * ControlEngine::Pop  ) 
 

Definition at line 1372 of file controlEngine.cpp.

References MyList< Control * >::GetNbElem(), Primitive::Pop(), MyStack< Control * >::Pop(), and primitive.

Referenced by TaskWindow::Add(), Tutorial::ApplicationDemo::ApplicationDemo(), Tutorial::BaseDemo::BaseDemo(), ControlEngine(), Window::Create(), Title::Create(), TaskWindow::Create(), Slider::Create(), MsgBox::Create(), Calculator::Create(), Tutorial::Create(), Tutorial::LayoutDemo::CreateTreeButton(), Demo::Demo(), TreeView::Draw(), DrawFPS(), Univers::ExitQuestion(), Tutorial::FaceDemo::FaceDemo(), Tutorial::LayoutDemo::LayoutDemo(), ResizingAndRotateControl::OnHover(), Univers::OnKeyUp(), and Tutorial::UniversDemo::UniversDemo().

LRESULT ControlEngine::Proc HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam
 

Gestion de la fenetre d'affichage OpenGL

Definition at line 1136 of file controlEngine.cpp.

References BOOL(), Timer::Call(), StateKey::code, Picking::controlContainer, Picking::controlHover, DEFAULT_DOUBLE_CLICK, Draw(), dxWin, dyWin, Region::enable, enableCursor, Picking::faceContainer, Picking::faceHover, GET_WHEEL_DELTA_WPARAM, Timer::GetDeltaTime(), Picking::isMoving, StateKey::isPush, StateMouse::leftBtn, StateKey::letter, StateMouse::midBtn, Picking::mouse, Control::OnKeyDouble(), Control::OnKeyDown(), Control::OnKeyUp(), Control::OnLButtonDouble(), Control::OnLButtonDown(), Control::OnLButtonUp(), Control::OnMButtonDouble(), Control::OnMButtonDown(), Control::OnMButtonUp(), Control::OnMouseMove(), Control::OnMouseWheel(), Control::OnRButtonDouble(), Control::OnRButtonDown(), Control::OnRButtonUp(), Control::OverIn(), pickingCursor, pickingInertia, Refresh(), Screen::region, Screen::RegionReset(), Screen::RegionUse(), StateMouse::rightBtn, screenMain, MyDebug::SendEvent(), Picking::SetDeltaWheel(), Picking::SetMousePos(), ShowMouse(), Stop(), Screen::SwapBuffers(), and univers.

Referenced by ControlEngineProc().

BOOL ControlEngine::ProjectObjectToWindow GLdouble  objectPosX,
GLdouble  objectPosY,
GLdouble  objectPosZ,
GLdouble *  windowPosX,
GLdouble *  windowPosY,
GLdouble *  windowPosZ
 

Definition at line 685 of file controlEngine.cpp.

References BOOL(), deltaYwin, modelMatrix, projMatrix, and viewPort.

BOOL ControlEngine::ProjectObjectToWindow Point3D< GLdouble > &  objectPos,
Point3D< GLdouble > *  windowPos
 

Definition at line 678 of file controlEngine.cpp.

References BOOL(), deltaYwin, modelMatrix, projMatrix, viewPort, Point3D< T >::x, Point3D< T >::y, and Point3D< T >::z.

BOOL ControlEngine::ProjectWindowToObject GLdouble  windowPosX,
GLdouble  windowPosY,
GLdouble  windowPosZ,
GLdouble *  objectPosX,
GLdouble *  objectPosY,
GLdouble *  objectPosZ
 

Definition at line 669 of file controlEngine.cpp.

References BOOL(), deltaYwin, modelMatrix, projMatrix, and viewPort.

BOOL ControlEngine::ProjectWindowToObject Point3D< GLdouble > &  windowPos,
Point3D< GLdouble > *  objectPos
 

Definition at line 664 of file controlEngine.cpp.

References BOOL(), deltaYwin, modelMatrix, projMatrix, viewPort, Point3D< T >::x, Point3D< T >::y, and Point3D< T >::z.

BOOL ControlEngine::Push Control control  ) 
 

Definition at line 1363 of file controlEngine.cpp.

References BOOL(), Control::faceNode, Primitive::GoTo(), primitive, Primitive::Push(), and MyStack< Control * >::Push().

Referenced by TaskWindow::Add(), Tutorial::ApplicationDemo::ApplicationDemo(), Tutorial::BaseDemo::BaseDemo(), ControlEngine(), Window::Create(), Title::Create(), TaskWindow::Create(), Slider::Create(), MsgBox::Create(), Calculator::Create(), Tutorial::Create(), Tutorial::LayoutDemo::CreateTreeButton(), Demo::Demo(), TreeView::Draw(), DrawFPS(), Univers::ExitQuestion(), Tutorial::FaceDemo::FaceDemo(), Tutorial::LayoutDemo::LayoutDemo(), ResizingAndRotateControl::OnHover(), Univers::OnKeyUp(), Tutorial::UniversDemo::UniversDemo(), and Tutorial::WindowDemo::WindowDemo().

void ControlEngine::Refresh BOOL  setSize  ) 
 

Definition at line 451 of file controlEngine.cpp.

References dxWin, dyWin, screenMain, Screen::SetSize(), Setup(), Screen::Show(), and Screen::Update().

Referenced by Proc().

BOOL ControlEngine::RegionAdd double  x,
double  y
 

Ajout d'un element de region

Parameters:
x,y: coordonnée d'un point d'un region d'un quadrilatere
Returns:
l'element a t'il ete bien ajouté ?

Definition at line 1340 of file controlEngine.cpp.

References Region::AddElem(), BOOL(), projMatrix, Screen::region, screenMain, and viewPort.

Referenced by Face::Draw().

BOOL ControlEngine::RegionGet double  x,
double  y,
Point3D< double > *  pt
 

Calcul d'un element de region

Parameters:
x,y: coordonnée d'un point d'un region d'un quadrilatere
Returns:
si reusite (return TRUE) le pt dois est mis-a-jour

Definition at line 1354 of file controlEngine.cpp.

References BOOL(), Region::Compute(), projMatrix, Screen::region, screenMain, and viewPort.

Referenced by Face::GetCorners().

void ControlEngine::ScreenShot TypeScreenShot  type  ) 
 

Definition at line 1072 of file controlEngine.cpp.

References Color::b, BOOL(), dxWin, dyWin, Color::g, GLint(), HDC(), hInst, IDI_DCONTROLS, Color::r, ScreenShotProc(), ssBlending, ssDepth, ssLuminance, ssRGB, type, Point3D< T >::x, Point3D< T >::y, and Point3D< T >::z.

Referenced by Univers::OnKeyUp().

void ControlEngine::SetPerspective float  xJitter,
float  yJitter
 

Type de perspective

Definition at line 656 of file controlEngine.cpp.

References accPerspective(), and aspect.

Referenced by Draw(), InitViewPort(), and Picking::Test().

void ControlEngine::SetTimerRefresh int  value  ) 
 

Donne la vitesse de rafraishissement

Parameters:
value: valeur du rafraichissement
  • 10 au plus rapide
  • 60 ==> 15Frm/s
  • 40 ==> 21Frm/s
  • 30 ==> 30Frm/s (valeur par defaut)

Definition at line 467 of file controlEngine.cpp.

References BindTimer, OnRefresh(), and timerRefresh.

Referenced by Start().

void ControlEngine::Setup int  deltaX,
int  deltaY
 

Configuration du rendu du moteur

Parameters:
deltaX: taille X de la fenetre
deltaY: taille Y de la fenetre

Definition at line 417 of file controlEngine.cpp.

References depth, f, fog, InitViewPort(), polygonMode, Fog::Use(), and PolygonMode::Use().

Referenced by Refresh(), and Start().

void ControlEngine::Start HINSTANCE  hInstance  ) 
 

Lancement du moteur:

  • Creation de la fenetre

Parameters:
hInstance: hInstance du process courent

Definition at line 322 of file controlEngine.cpp.

References Screen::BindOpenGL(), ControlEngineProc(), Cursor::Create(), Screen::Create(), cursor, dxWin, dyWin, Screen::hDC, hDC, hInst, Screen::hWnd, Light::id, IDI_DCONTROLS, IDI_ICON_SYSTRAY, Timer::Init(), InitLights(), InitTextures(), lights, refreshTime, screenMain, screenSystray, Screen::SetSize(), Screen::SetStyle(), SetTimerRefresh(), Setup(), Screen::Setup(), Screen::Show(), Inertia::Start(), and SysTrayProc().

Referenced by WinMain().

void ControlEngine::Stop  ) 
 

Destruction du fenetrage

Definition at line 376 of file controlEngine.cpp.

References Screen::Destroy(), screenMain, and screenSystray.

Referenced by Proc(), and ~ControlEngine().


Member Data Documentation

int ControlEngine::antiAliasingQuality
 

qualité de l'antialiasing

Definition at line 143 of file controlEngine.h.

Referenced by ControlEngine(), Draw(), ValueEditors::MakeRenderStruct(), and ~ControlEngine().

GLdouble ControlEngine::aspect
 

ratio hauteur/lageur

Definition at line 154 of file controlEngine.h.

Referenced by ControlEngine(), InitViewPort(), and SetPerspective().

Box3D ControlEngine::boxLights[3]
 

boite d'affichage des lumieres

Definition at line 153 of file controlEngine.h.

Referenced by DrawLight(), and MajLights().

int ControlEngine::cpuLimit
 

limit du CPU utilisable par le moteur de 3D

Todo:
implementation du cpuLimit

Definition at line 163 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), and ~ControlEngine().

Cursor ControlEngine::cursor
 

gestrion de l'affichage du curseur de la souris

Definition at line 149 of file controlEngine.h.

Referenced by DrawCursor(), Univers::OnLButtonDown(), Title::OnLButtonDown(), TextBox::OnLButtonDown(), Univers::OnLButtonUp(), TextBox::OnLButtonUp(), Title::OnLMButtonUp(), Univers::OnMButtonDown(), Title::OnMButtonDown(), Univers::OnMButtonUp(), Univers::OnOverIn(), Title::OnOverIn(), TextBox::OnOverIn(), Button::OnOverIn(), Button::OnPushDown(), Button::OnPushUp(), and Start().

GLdouble ControlEngine::depth
 

distance z du point de vue

Definition at line 175 of file controlEngine.h.

Referenced by Primitive::GetCorners().

double ControlEngine::dxWin
 

taille x de la fenetre a l'initialisation

Definition at line 161 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), MasterContainer::Create(), Proc(), Refresh(), ScreenShot(), and Start().

double ControlEngine::dyWin
 

taille y de la fenetre a l'initialisation

Definition at line 162 of file controlEngine.h.

Referenced by ApplyScaleView(), ConfigProc(), ControlEngine(), MasterContainer::Create(), Proc(), Refresh(), ScreenShot(), Start(), and Picking::Test().

BOOL ControlEngine::enableAntiAliasing
 

utilisation de l'antialiasing

Definition at line 142 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), Draw(), ValueEditors::MakeRenderStruct(), Univers::OnKeyDown(), and ~ControlEngine().

BOOL ControlEngine::enableBackGround
 

affiche un fond

Definition at line 174 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), DrawBackGround(), ValueEditors::MakeRenderStruct(), Univers::OnKeyDown(), and ~ControlEngine().

BOOL ControlEngine::enableCursor
 

affiche le curseur (curseur OpenGL par window)

Definition at line 144 of file controlEngine.h.

Referenced by ControlEngine(), DrawCursors(), ValueEditors::MakeRenderStruct(), and Proc().

BOOL ControlEngine::enableDelta
 

deplacement par delta

Definition at line 173 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), and ~ControlEngine().

BOOL ControlEngine::enableFPS
 

affiche les "Frams Par Secondes"

Definition at line 147 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), DrawFPS(), Univers::OnKeyDown(), and ~ControlEngine().

BOOL ControlEngine::enableInertia
 

utilise l'inertie

Definition at line 150 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), ValueEditors::MakeRenderStruct(), Control::OnMouseMove(), and ~ControlEngine().

BOOL ControlEngine::enableLightView
 

affiche des boite representant les lumieres

Definition at line 146 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), DrawLight(), ValueEditors::MakeRenderStruct(), Univers::OnKeyDown(), and ~ControlEngine().

BOOL ControlEngine::enablePicking
 

picking activée ?

Definition at line 172 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), Draw(), Univers::OnKeyDown(), Picking::Test(), and ~ControlEngine().

BOOL ControlEngine::enableRepere
 

affiche un repere 3D (x,y,z)

Definition at line 145 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), DrawOrigineRepere(), ValueEditors::MakeRenderStruct(), Univers::OnKeyDown(), and ~ControlEngine().

BOOL ControlEngine::enableViewInertia
 

affiche le vecteur directeur de l'inertie

Definition at line 151 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), ValueEditors::MakeRenderStruct(), and ~ControlEngine().

EventInertia ControlEngine::eventInertia[3]
 

gestion de linertie pour le bouton gauche,centre et droit de la souris

Definition at line 185 of file controlEngine.h.

Referenced by ControlEngine().

Fog ControlEngine::fog
 

gestion du brouillard

Definition at line 140 of file controlEngine.h.

Referenced by ApplyParamObj(), ConfigProc(), ControlEngine(), Face::Draw(), ValueEditors::MakeRenderStruct(), Setup(), and ~ControlEngine().

FTFont* ControlEngine::fontBitmap
 

fonte par bitmap

Definition at line 193 of file controlEngine.h.

Referenced by EndFont(), InitFont(), and ValueEditors::MakeFontsStruct().

FTFont* ControlEngine::fontExtrude
 

fonte pour text avec volume

Definition at line 190 of file controlEngine.h.

Referenced by EndFont(), InitFont(), and ValueEditors::MakeFontsStruct().

FTFont* ControlEngine::fontOutline
 

fonte pour text non remplie, rapide

Definition at line 191 of file controlEngine.h.

Referenced by EndFont(), InitFont(), and ValueEditors::MakeFontsStruct().

FTFont* ControlEngine::fontPixmap
 

fonte pour text droit

Definition at line 188 of file controlEngine.h.

Referenced by EndFont(), InitFont(), and ValueEditors::MakeFontsStruct().

FTFont* ControlEngine::fontPolygon
 

fonte en resolution polygon, lente & non antialiasé

Definition at line 192 of file controlEngine.h.

Referenced by EndFont(), InitFont(), and ValueEditors::MakeFontsStruct().

FTFont* ControlEngine::fontTexture
 

fonte pour text ordinaire, rapide & antialiasé

Definition at line 189 of file controlEngine.h.

Referenced by Tutorial::BaseDemo::BaseDemo(), Button::Button(), Tutorial::LayoutDemo::ConfigTextFace(), Draw2DText(), EndFont(), Tutorial::FaceDemo::FaceDemo(), InitFont(), ValueEditors::MakeFontsStruct(), Tutorial::UniversDemo::SetFace(), TextBox::TextBox(), Tip::Tip(), Title::Title(), and Tutorial::WindowDemo::WindowDemo().

HINSTANCE ControlEngine::hInst
 

HINSTANCE de l'application.

Definition at line 160 of file controlEngine.h.

Referenced by ControlEngine(), DebugStructProc(), Univers::OnKeyDown(), ScreenShot(), Start(), and SysTrayProc().

StateKey ControlEngine::key
 

etat de touche

Definition at line 181 of file controlEngine.h.

Light ControlEngine::lights[4]
 

gestion des lumiere

Definition at line 141 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), DrawLight(), InitLights(), MajLights(), ValueEditors::MakeLightsStruct(), Start(), and ~ControlEngine().

BOOL ControlEngine::lightsMove[4]
 

les lumieres bouge t'elle ?

Definition at line 176 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), DrawLight(), ValueEditors::MakeLightsStruct(), and ~ControlEngine().

MasterContainer* ControlEngine::masterContainer
 

contien les desktop

Definition at line 180 of file controlEngine.h.

Referenced by Config(), ControlEngine(), Tutorial::Create(), DebugStructProc(), Demo::Demo(), DrawFPS(), Univers::ExitQuestion(), Picking::FindContainer(), and Univers::OnKeyUp().

GLdouble ControlEngine::modelMatrix[16]
 

matrice modele

Definition at line 167 of file controlEngine.h.

Referenced by Draw(), Draw2DText(), DrawCursors(), ProjectObjectToWindow(), and ProjectWindowToObject().

PerfMonitor ControlEngine::monitor
 

test de performance

Definition at line 137 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), Text3D::Draw(), BasicText3D::Draw(), Draw(), InitMonitor(), ValueEditors::MakeRenderStruct(), Picking::Test(), and ~ControlEngine().

Picking ControlEngine::pickingCursor
 

ce a quoi reference le curseur (control,souris)

Definition at line 182 of file controlEngine.h.

Referenced by Draw(), DrawCursors(), DrawLight(), TreeView::OnClick(), Control::OnMouseMove(), TreeView::OnNextFrame(), Proc(), Control::ScreenMove(), Control::ScreenMoveTo(), and EventInertia::Start().

Picking ControlEngine::pickingInertia
 

ce a quoi reference l'inertie en cours (control,souris)

Definition at line 183 of file controlEngine.h.

Referenced by Draw(), DrawCursors(), EventInertia::OnInertia(), Proc(), Control::ScreenMove(), EventInertia::Start(), and EventInertia::Stop().

PolygonMode ControlEngine::polygonMode
 

type de calcul sur les poylgone Fill,Line,Point

Definition at line 152 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), Univers::OnKeyDown(), Setup(), and ~ControlEngine().

Primitive ControlEngine::primitive
 

primitive graphic 3D

Definition at line 138 of file controlEngine.h.

Referenced by TaskWindow::Add(), Tutorial::BaseDemo::BaseDemo(), Window::Create(), Univers::Create(), TreeView::Create(), TrackButton::Create(), Title::Create(), Tip::Create(), TextBox::Create(), TaskWindow::Create(), Slider::Create(), MsgBox::Create(), MasterContainer::Create(), Container::Create(), Calculator::Create(), Button::Create(), Tutorial::Create(), Tutorial::LayoutDemo::CreateTreeButton(), DebugStructProc(), TreeView::Draw(), DrawScene(), Tutorial::FaceDemo::FaceDemo(), Control::GetCorners(), Control::GetLocalPos(), Tutorial::LayoutDemo::LayoutDemo(), ValueEditors::MakeDebugControlStruct(), ValueEditors::MakeDebugFaceStruct(), ResizingAndRotateControl::OnHover(), Univers::OnKeyDown(), Title::OnMax(), Pop(), Push(), Slider::Refresh(), Tutorial::UniversDemo::SetFace(), Control::SetParent(), Tutorial::UniversDemo::UniversDemo(), and Tutorial::WindowDemo::WindowDemo().

GLdouble ControlEngine::projMatrix[16]
 

matrice de projection

Definition at line 166 of file controlEngine.h.

Referenced by Draw(), Draw2DText(), DrawCursors(), ProjectObjectToWindow(), ProjectWindowToObject(), RegionAdd(), and RegionGet().

int ControlEngine::refreshTime
 

taux de rafraichisement l'affichage ==> FPS

Definition at line 169 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), Start(), and ~ControlEngine().

Screen ControlEngine::screenConfig
 

Gestion des config.

Definition at line 159 of file controlEngine.h.

Referenced by ConfigProc(), and Picking::Test().

Screen ControlEngine::screenMain
 

Gestion de la fenetre d'affichage.

Definition at line 157 of file controlEngine.h.

Referenced by ConfigProc(), ControlEngine(), Face::Draw(), ValueEditors::MakeRenderStruct(), Univers::OnKeyDown(), OnRefresh(), Proc(), Refresh(), RegionAdd(), RegionGet(), Start(), Stop(), and ~ControlEngine().

Screen ControlEngine::screenSystray
 

Gestion du systray.

Definition at line 158 of file controlEngine.h.

Referenced by Start(), and Stop().

TaskWindow* ControlEngine::taskWindow
 

gestion des task en cours ou minimisé

Definition at line 179 of file controlEngine.h.

Referenced by Tutorial::ApplicationDemo::ApplicationDemo(), Tutorial::BaseDemo::BaseDemo(), ControlEngine(), Demo::Demo(), Tutorial::ApplicationDemo::OnEnd(), Tutorial::WindowDemo::OnEnd(), Tutorial::BaseDemo::OnEnd(), Title::OnMin(), Title::OnOriginal(), Tutorial::Tutorial(), Tutorial::WindowDemo::WindowDemo(), ~ControlEngine(), and Tutorial::~Tutorial().

Textures ControlEngine::texture
 

les texture static

Definition at line 195 of file controlEngine.h.

Referenced by Cursor::ApplyType(), Tutorial::BaseDemo::BaseDemo(), TreeView::ConfigFacesPlus(), Title::Create(), Slider::Create(), Tutorial::FaceDemo::FaceDemo(), Title::GotFocus(), Title::LostFocus(), Title::OnMax(), Title::OnOriginal(), Tutorial::ApplicationDemo::OnSelectBkg(), and Tutorial::UniversDemo::SetFace().

Timer ControlEngine::timerRefresh
 

evenement de rafraichissement

Definition at line 177 of file controlEngine.h.

Referenced by ConfigProc(), TreeDirectory::OnClickDirectory(), Univers::OnExit(), ResizingAndRotateControl::OnHover(), Univers::OnOverIn(), Title::OnOverIn(), Univers::OnOverOut(), Title::OnOverOut(), TaskWindow::Restore(), SetTimerRefresh(), EffectApparition::Start(), EffectApparition::Stop(), Title::~Title(), and Univers::~Univers().

Tip* ControlEngine::tipFPS
 

control d'affichage de la tool tip

Definition at line 148 of file controlEngine.h.

Referenced by ControlEngine(), and DrawFPS().

MyTree<Face> ControlEngine::trash
 

les primitive qui ne sont pas a afficher

Definition at line 139 of file controlEngine.h.

Referenced by ControlEngine(), ValueEditors::MakeDebugControlStruct(), ValueEditors::MakeDebugFaceStruct(), and Title::OnMin().

Univers* ControlEngine::univers
 

control par defaut

Definition at line 178 of file controlEngine.h.

Referenced by Tutorial::ApplicationDemo::ApplicationDemo(), Tutorial::BaseDemo::BaseDemo(), ControlEngine(), Calculator::Create(), Demo::Demo(), Tutorial::Demo::Demo(), DrawBackGround(), DrawCursor(), Tutorial::FaceDemo::FaceDemo(), Picking::FindContainer(), Tutorial::LayoutDemo::LayoutDemo(), Tutorial::OnEnd(), Demo::OnTimer(), Proc(), Picking::Test(), Tutorial::UniversDemo::UniversDemo(), Tutorial::WindowDemo::WindowDemo(), and ~ControlEngine().

int ControlEngine::usingInertia
 

donne le nombre d'inertie en cours

Definition at line 184 of file controlEngine.h.

Referenced by ControlEngine(), Draw(), DrawCursors(), Control::ScreenMove(), and EventInertia::Stop().

GLint ControlEngine::viewPort[4]
 

point de vue

Definition at line 168 of file controlEngine.h.

Referenced by Draw2DText(), InitViewPort(), ProjectObjectToWindow(), ProjectWindowToObject(), RegionAdd(), RegionGet(), and Picking::Test().


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 19:21:03 2004 for 3d Controls by doxygen 1.3.6