#include "graphics_relative.h"#include "../hydro_source/dataFillings.h"Include dependency graph for graphics_main.cpp:

Go to the source code of this file.
Functions | |
| GLvoid | BuildFont (GLvoid) |
| Create OSD font. | |
| GLvoid | KillFont (GLvoid) |
| Delete font list. | |
| GLvoid | glPrint (const char *fmt,...) |
| Custom GL "Print" Routine. | |
| GLvoid | ReSizeGLScene (GLsizei width, GLsizei height) |
| int | InitGL (GLvoid) |
| Initialize OpenGL stuff. | |
| int | DrawGLScene (datas *d) |
| Draws the scene (openGL). | |
| GLvoid | KillGLWindow (GLvoid) |
| BOOL | CreateGLWindow (char *title, int width, int height, int bits, bool fullscreenflag) |
| Sub-function for window closing stuffs. | |
| LRESULT CALLBACK | WndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
| Callback and keyboard management. | |
| int | draw_graphics_init (datas *d) |
| General graphic stuff initialisation. | |
| bool | draw_graphics (datas *d) |
| General graphic (scene) display and keyboard reading. | |
| int | draw_graphics_kill () |
| General graphic (scene/window) closing. | |
| void | pass_joy_parameters (joy_parameters *jP) |
| Copy joystick parameters from MATLAB struct. | |
Variables | |
| HGLRC | hRC = NULL |
| HDC | hDC = NULL |
| HWND | hWnd = NULL |
| HINSTANCE | hInstance |
| GLuint | base |
| bool | keys [256] |
| bool | active = TRUE |
| bool | fullscreen = TRUE |
| bool | light |
| GLfloat | viewAngle1 = 0.0 |
| horizontal camera view angle | |
| GLfloat | viewAngle2 = 0.3 |
| vertical camera view angle | |
| GLfloat | dviewAngle = 0.01 |
| GLfloat | viewDist = 50.0 |
| camera view distance | |
| GLfloat | dviewDist = 0.3 |
| GLfloat | LightAmbient [] = { 0.35f, 0.35f, 0.5f, 1.0f } |
| GLfloat | LightDiffuse [] = { 0.6f, 0.6f, 0.6f, 1.0f } |
| GLfloat | LightPosition [] = { -10.0f, 20.0f, 150.0f, 0.0f } |
| MSG | msg |
| BOOL | done = FALSE |
| int | joystick_exist |
| bool | doX = TRUE |
| bool | doY = TRUE |
| bool | doZ = TRUE |
| bool | doR = TRUE |
| bool | allowChangeDoX = TRUE |
| bool | allowChangeDoY = TRUE |
| bool | allowChangeDoZ = TRUE |
| bool | allowChangeDoR = TRUE |
| float | dirX = 1.0f |
| float | dirY = 1.0f |
| float | dirZ = 1.0f |
| float | dirR = 1.0f |
| bool | allowChangeDirX = TRUE |
| bool | allowChangeDirY = TRUE |
| bool | allowChangeDirZ = TRUE |
| bool | allowChangeDirR = TRUE |
| float | time_before = 0.0 |
| float | time_elapsed |
| float | fps = 0.0 |
Definition in file graphics_main.cpp.
|
|
Create OSD font. Creates font for OSD (On Screen Display), i.e. displaying various informations on the screen... (Windows dependent) Definition at line 74 of file graphics_main.cpp. Referenced by InitGL(). |
|
||||||||||||||||||||||||
|
Sub-function for window closing stuffs.
Definition at line 331 of file graphics_main.cpp. References fullscreen, hDC, hInstance, hRC, hWnd, InitGL(), KillGLWindow(), ReSizeGLScene(), and WndProc(). Referenced by draw_graphics(), and draw_graphics_init(). |
|
|
|
General graphic stuff initialisation. Ask for full-screen or not, creates window and try to initialize the joystick.
Definition at line 568 of file graphics_main.cpp. References CreateGLWindow(), fullscreen, joystick_exist, and joystick_init(). Referenced by mexFunction(). |
|
|
General graphic (scene/window) closing. Closes window and joystick
Definition at line 774 of file graphics_main.cpp. References done, joystick_close(), KillGLWindow(), and msg. Referenced by mexFunction(). |
|
|
Draws the scene (openGL). Draws the scene by appling all necessary geometrical (spacial) transformations and by calling the different element drawing functions (for the boat, the sea, the instruments...). This is not the highest function for drwaing the current scene, see draw_graphics(). Definition at line 189 of file graphics_main.cpp. References angles_update(), Boat_draw(), dirR, dirX, dirY, dirZ, doR, doX, doY, doZ, Draw_sea(), datas::dx, datas::dy, f(), fps, Girouette_draw(), glPrint(), HSlider_draw(), datas::Hslider_x, joystick_exist, joystick_getXYZR(), LightPosition, datas::phi, datas::psi, RelativeWind_draw(), Sail_create_and_draw(), Target_draw(), datas::target_x, datas::target_y, datas::theta, time_elapsed, viewAngle1, viewAngle2, viewDist, VSlider_draw(), datas::Vslider_x, wave_z_compute(), datas::Wind, datas::Wind_x, datas::Wind_y, datas::x, datas::y, and datas::z. Referenced by draw_graphics(). |
|
||||||||||||
|
Custom GL "Print" Routine. A function that can be used like fprint(), but for writing on the OpenGL window Definition at line 116 of file graphics_main.cpp. References base. Referenced by DrawGLScene(). |
|
|
Initialize OpenGL stuff. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Definition at line 159 of file graphics_main.cpp. References BuildFont(), f(), LightAmbient, LightDiffuse, and LightPosition. Referenced by CreateGLWindow(). |
|
|
Delete font list. Delete the font list created by BuildFont() Definition at line 107 of file graphics_main.cpp. References base. |
|
|
Definition at line 287 of file graphics_main.cpp. References fullscreen, hDC, hInstance, hRC, and hWnd. Referenced by CreateGLWindow(), draw_graphics(), and draw_graphics_kill(). |
|
|
Copy joystick parameters from MATLAB struct. Copy the joystick parameters (doX, doY ,doZ ,doR and dirX ,dirY ,diZ ,dirR) from the MATLAB struct *jP to the local joystick parameters variables.
Definition at line 788 of file graphics_main.cpp. References dirR, joy_parameters::dirR, dirX, joy_parameters::dirX, dirY, joy_parameters::dirY, dirZ, joy_parameters::dirZ, doR, joy_parameters::doR, doX, joy_parameters::doX, doY, joy_parameters::doY, doZ, and joy_parameters::doZ. Referenced by mexFunction(). |
|
||||||||||||
|
Definition at line 138 of file graphics_main.cpp. References f(). Referenced by CreateGLWindow(), and WndProc(). |
|
||||||||||||||||||||
|
Callback and keyboard management.
Definition at line 510 of file graphics_main.cpp. References active, keys, and ReSizeGLScene(). Referenced by CreateGLWindow(). |
|
|
Definition at line 23 of file graphics_main.cpp. Referenced by draw_graphics(), and WndProc(). |
|
|
Definition at line 62 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 59 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 60 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 61 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 54 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 51 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 52 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 53 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 19 of file graphics_main.cpp. Referenced by BuildFont(), glPrint(), and KillFont(). |
|
|
Definition at line 58 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 55 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 56 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 57 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 43 of file graphics_main.cpp. Referenced by draw_graphics(), and draw_graphics_kill(). |
|
|
Definition at line 50 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 47 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 48 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 49 of file graphics_main.cpp. Referenced by draw_graphics(), DrawGLScene(), and pass_joy_parameters(). |
|
|
Definition at line 32 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 34 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 65 of file graphics_main.cpp. Referenced by DrawGLScene(). |
|
|
Definition at line 24 of file graphics_main.cpp. Referenced by CreateGLWindow(), draw_graphics(), draw_graphics_init(), and KillGLWindow(). |
|
|
Definition at line 15 of file graphics_main.cpp. Referenced by BuildFont(), CreateGLWindow(), draw_graphics(), and KillGLWindow(). |
|
|
Definition at line 17 of file graphics_main.cpp. Referenced by CreateGLWindow(), and KillGLWindow(). |
|
|
Definition at line 14 of file graphics_main.cpp. Referenced by CreateGLWindow(), and KillGLWindow(). |
|
|
Definition at line 16 of file graphics_main.cpp. Referenced by CreateGLWindow(), and KillGLWindow(). |
|
|
Definition at line 46 of file graphics_main.cpp. Referenced by draw_graphics_init(), and DrawGLScene(). |
|
|
Definition at line 22 of file graphics_main.cpp. Referenced by draw_graphics(), and WndProc(). |
|
|
Definition at line 26 of file graphics_main.cpp. |
|
|
Definition at line 37 of file graphics_main.cpp. Referenced by InitGL(). |
|
|
Definition at line 38 of file graphics_main.cpp. Referenced by InitGL(). |
|
|
Definition at line 39 of file graphics_main.cpp. Referenced by DrawGLScene(), and InitGL(). |
|
|
Definition at line 42 of file graphics_main.cpp. Referenced by draw_graphics(), and draw_graphics_kill(). |
|
|
Definition at line 63 of file graphics_main.cpp. Referenced by draw_graphics(). |
|
|
Definition at line 64 of file graphics_main.cpp. Referenced by draw_graphics(), and DrawGLScene(). |
|
|
horizontal camera view angle
Definition at line 30 of file graphics_main.cpp. Referenced by draw_graphics(), and DrawGLScene(). |
|
|
vertical camera view angle
Definition at line 31 of file graphics_main.cpp. Referenced by draw_graphics(), and DrawGLScene(). |
|
|
camera view distance
Definition at line 33 of file graphics_main.cpp. Referenced by draw_graphics(), and DrawGLScene(). |
1.4.6-NO