![]() |
Vis 2 Demo
1.0
Technical illustration type real-time rendering of geometry
|
Go to the source code of this file.
Macros | |
| #define | WINDOW_WIDTH 1000 |
| #define | WINDOW_HEIGHT 750 |
Functions | |
| HWND | FindConsoleHandle () |
| Function for finding the handle to the opened console of this application. More... | |
| LRESULT CALLBACK | DlgProc (HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam) |
| Callback function for the dialog at the start of the application. More... | |
| void GLFWCALL | myMousePosCallBack (int _x, int _y) |
| Callback function for the mouse movement. More... | |
| void GLFWCALL | myMouseButtonCallBack (int _button, int _action) |
| Callback function for the mouse buttons. More... | |
| void GLFWCALL | myMouseWheelCallBack (int _pos) |
| Callback function for the mouse wheel. More... | |
| void | vis2_opengl_window_Init () |
| Function for initializing OpenGL. More... | |
| void | vis2_Init () |
| Function for initializing the scene to be displayed by the application. More... | |
| void | adjustCamera () |
| Function for updating the camera position according to mouse input. More... | |
| void | vis2_Update () |
| Main update function. More... | |
| void | vis2_Draw () |
| Main draw function. More... | |
| void | vis2_Cleanup () |
| Function for releasing resources. More... | |
| int | main () |
| MAIN. More... | |
Variables | |
| double | d_DELTA_TIME |
| duration of last frame in seconds More... | |
| glm::vec4 | mouse_data = glm::vec4(0.0f) |
| vector containing pos_x, pos_y, velocity_x, velocity_y for the mouse More... | |
| glm::vec2 | mouse_data_prev = glm::vec2(0.0f) |
| vector storing the previous mouse position More... | |
| int | mouse_wheel_pos = 0 |
| position of the mouse wheel More... | |
| int | mouse_wheel_pos_prev = 0 |
| previous position of the mouse wheel More... | |
| float | zoom_dist_total = 0.0f |
| the zoom distance measured form the initial viewer position More... | |
| glm::vec2 | zoom_limits |
| bool | mouse_right_click = false |
| has the value TRUE if the user cklicked the right mouse button, FALSE otherwise More... | |
| unsigned int | nr_steps = 16 |
| the number of frames a rotation or pan takes if the last frame had the duration of 10 ms More... | |
| float | delta_rotX |
| float | delta_rotY |
| rotation angles around the X and Y axes as a result of user input More... | |
| float | step_rotX |
| float | step_rotY |
| rotation increments per frame around the X and Y axes More... | |
| float | delta_panX |
| float | delta_panY |
| pan distances along the X and Y axes as a result of user input More... | |
| float | step_panX |
| float | step_panY |
| pan increments per frame along the X and Y axes More... | |
| glm::vec4 | axis_X |
| the X axis in homogenous coordinates, calculated from the viewe position and target supplied by the loader_scene_Ptr More... | |
| glm::vec4 | axis_Y |
| the Y axis in homogenous coordinates, calculated from the viewe position and target supplied by the loader_scene_Ptr More... | |
| glm::vec4 | axis_Z |
| the Z axis in homogenous coordinates, calculated from the viewe position and target supplied by the loader_scene_Ptr More... | |
| glm::mat4 | transformAccum |
| the matrix that holds all transformations since the start of the application More... | |
| char * | scene_path |
| the path to the scene descrition file More... | |
| vis2::LoaderScene * | loader_scene_Ptr |
| is the pointer to the scene loader for this application More... | |
| vis2::Shader * | shader_axes_Ptr |
| is the shader for the objects visualizing the world axes More... | |
| glm::mat4 | mM_VP |
| is the initial model matrix for the object visualizing the position of the viewer More... | |
| glm::mat4 | mM_VD |
| is the initial model matrix for the object visualizing the target of the viewer More... | |
| vis2::SpinningCube * | cube_VP |
| is the object visualizing the view position (for DEBUGGING) More... | |
| vis2::SpinningCube * | cube_VD |
| is the object visualizing the view direction (for DEBUGGING) More... | |
| void adjustCamera | ( | ) |
| LRESULT CALLBACK DlgProc | ( | HWND | hWndDlg, |
| UINT | Msg, | ||
| WPARAM | wParam, | ||
| LPARAM | lParam | ||
| ) |
Callback function for the dialog at the start of the application.
| [in] | hWndDlg | is the handle to the opened dialog window, |
| [in] | Msg | is the type of the message sent by the dialog, |
| [in] | wParam | is the command called on the dialog, |
| [in] | lParam | is additional message-specific infoemation. |
| HWND FindConsoleHandle | ( | ) |
| int main | ( | ) |
| void GLFWCALL myMouseButtonCallBack | ( | int | _button, |
| int | _action | ||
| ) |
| void GLFWCALL myMousePosCallBack | ( | int | _x, |
| int | _y | ||
| ) |
Callback function for the mouse movement.
Calculates the relative position and velocity of the mouse.
Also flips the origin of the screen from the upper-left to to the lower-left corner.
| [in] | _x | is the horizontal position of the mouse (0 is left, WINDOW_WIDTH is right) |
| [in] | _y | is the vertical position of the mouse (0 is top, WINDOW_HEIGHT is bottom) |
| void GLFWCALL myMouseWheelCallBack | ( | int | _pos | ) |
| void vis2_Cleanup | ( | ) |
| void vis2_Draw | ( | ) |
| void vis2_Init | ( | ) |
| void vis2_opengl_window_Init | ( | ) |
| void vis2_Update | ( | ) |
| glm::vec4 axis_X |
the X axis in homogenous coordinates, calculated from the viewe position and target supplied by the loader_scene_Ptr
| glm::vec4 axis_Y |
the Y axis in homogenous coordinates, calculated from the viewe position and target supplied by the loader_scene_Ptr
| glm::vec4 axis_Z |
the Z axis in homogenous coordinates, calculated from the viewe position and target supplied by the loader_scene_Ptr
| vis2::SpinningCube* cube_VD |
| vis2::SpinningCube* cube_VP |
| float delta_panY |
| float delta_rotY |
| vis2::LoaderScene* loader_scene_Ptr |
| glm::mat4 mM_VD |
| glm::mat4 mM_VP |
| glm::vec4 mouse_data = glm::vec4(0.0f) |
| glm::vec2 mouse_data_prev = glm::vec2(0.0f) |
| bool mouse_right_click = false |
| int mouse_wheel_pos_prev = 0 |
| unsigned int nr_steps = 16 |
| vis2::Shader* shader_axes_Ptr |
| float step_panY |
| float step_rotY |
| glm::mat4 transformAccum |
| float zoom_dist_total = 0.0f |
1.8.3.1