#include "Volumizer.h"
Go to the source code of this file.
Data Structures | |
struct | GLstruct |
structure for tracking stuff for the three side views More... | |
Defines | |
#define | TOOL_HEIGHT 36 |
Functions | |
ATOM | RegisterOrthoClass (HINSTANCE hInstance) |
void | InitOrtho (HWND hWnd, GLstruct &cur) |
void | DeInitOrtho (HWND hWnd, GLstruct &cur) |
void | DrawOrtho (HWND hWnd) |
void | BuildOrthoSlice (HWND hWnd) |
int | GropeForHandle (HWND hWnd) |
void | MoveHandle (HWND hWnd, int handle) |
void | ShiftSlice (HWND hWnd, int amt) |
LRESULT CALLBACK | OrthoProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
Variables | |
GLstruct | GLfront |
GLstruct | GLleft |
GLstruct | GLtop |
int | xslice |
three windows, three tracking structures | |
int | yslice |
int | zslice |
float * | frontslice |
current x, y and z slice being displayed | |
float * | leftslice |
float * | topslice |
#define TOOL_HEIGHT 36 |
void BuildOrthoSlice | ( | HWND | hWnd | ) |
Build the GL texture for a given x, y or z slice.
This just copies the values from voldat into a texture and binds it for the correct context, nothing else.
Definition at line 362 of file OrthoWnd.cpp.
References frontslice, GLstruct::hdc, GLstruct::hglrc, leftslice, topslice, voldat, volx, voly, volz, wnd_front, wnd_left, wnd_top, xslice, yslice, and zslice.
Referenced by MoveHandle(), ShiftSlice(), and ShovelData().
void DeInitOrtho | ( | HWND | hWnd, | |
GLstruct & | cur | |||
) |
Kill GL for the ortho view again.
Definition at line 129 of file OrthoWnd.cpp.
References GLstruct::hdc, and GLstruct::hglrc.
Referenced by OrthoProc().
void DrawOrtho | ( | HWND | hWnd | ) |
Draw the ortho view.
only proceed if there's something to display
first, draw the information text in the corner
next, paint a textured quad into the background
finally, overlay the x, y and z slice handles (the thick colored lines)
Definition at line 153 of file OrthoWnd.cpp.
References GLstruct::hdc, GLstruct::hglrc, GLstruct::hHandleMax, GLstruct::hHandleMin, GLstruct::hQuadExt, GLstruct::vHandleMax, GLstruct::vHandleMin, voldat, volx, voly, volz, GLstruct::vQuadExt, wnd_front, wnd_left, wnd_top, xslice, yslice, and zslice.
Referenced by MoveHandle(), OrthoProc(), ShiftSlice(), and ShovelData().
int GropeForHandle | ( | HWND | hWnd | ) |
Try to find the handle the cursor currently is over.
Definition at line 489 of file OrthoWnd.cpp.
References GLstruct::hdc, GLstruct::hglrc, GLstruct::hHandleMax, GLstruct::hHandleMin, GLstruct::vHandleMax, GLstruct::vHandleMin, wnd_front, wnd_left, and wnd_top.
void InitOrtho | ( | HWND | hWnd, | |
GLstruct & | cur | |||
) |
Initialize GL for our ortho view
Definition at line 50 of file OrthoWnd.cpp.
References GLstruct::hdc, and GLstruct::hglrc.
Referenced by OrthoProc().
void MoveHandle | ( | HWND | hWnd, | |
int | handle | |||
) |
Move the handle(s) we have grabbed.
Definition at line 587 of file OrthoWnd.cpp.
References BuildOrthoSlice(), DrawOrtho(), GLstruct::hdc, GLstruct::hglrc, GLstruct::hQuadExt, volx, voly, volz, GLstruct::vQuadExt, wnd_front, wnd_left, wnd_top, xslice, yslice, and zslice.
LRESULT CALLBACK OrthoProc | ( | HWND | hWnd, | |
UINT | message, | |||
WPARAM | wParam, | |||
LPARAM | lParam | |||
) |
Window procedure for the orthographic views.
there are exactly three orthogonal view windows
grab a handle (if we're above one)
move a handle
no handle, we grabbed the window background in this case, shift the slice itself
just find out if we are over a handle, and change the cursor
wheeling does the same as dragging in the window background - shift the slice
Definition at line 780 of file OrthoWnd.cpp.
References DeInitOrtho(), DrawOrtho(), GropeForHandle(), InitOrtho(), MoveHandle(), ShiftSlice(), voldat, wnd_front, wnd_left, and wnd_top.
Referenced by RegisterOrthoClass().
ATOM RegisterOrthoClass | ( | HINSTANCE | hInstance | ) |
Implements the orthographic side views Standard window class registering.
Definition at line 12 of file OrthoWnd.cpp.
References OrthoProc().
Referenced by _tWinMain().
void ShiftSlice | ( | HWND | hWnd, | |
int | amt | |||
) |
If a handle has moved, now actually rebuild the slice texture for the corresponding axis, and display it.
Definition at line 740 of file OrthoWnd.cpp.
References BuildOrthoSlice(), DrawOrtho(), volx, voly, volz, wnd_front, wnd_left, wnd_top, xslice, yslice, and zslice.
Referenced by OrthoProc().
float* frontslice |
current x, y and z slice being displayed
Definition at line 45 of file OrthoWnd.cpp.
Referenced by BuildOrthoSlice().
Definition at line 42 of file OrthoWnd.cpp.
Definition at line 42 of file OrthoWnd.cpp.
Definition at line 42 of file OrthoWnd.cpp.
float * leftslice |
float * topslice |
int xslice |
three windows, three tracking structures
Definition at line 44 of file OrthoWnd.cpp.
Referenced by BuildOrthoSlice(), DrawOrtho(), LoadDataFile(), MoveHandle(), and ShiftSlice().
int yslice |
Definition at line 44 of file OrthoWnd.cpp.
Referenced by BuildOrthoSlice(), DrawOrtho(), LoadDataFile(), MoveHandle(), and ShiftSlice().
int zslice |
Definition at line 44 of file OrthoWnd.cpp.
Referenced by BuildOrthoSlice(), DrawOrtho(), LoadDataFile(), MoveHandle(), and ShiftSlice().