#include <HeightWin.h>

Manages the heightmap window and renders the graph.
Definition at line 47 of file HeightWin.h.
Public Types | |
| enum | { ID_CANVAS = FXMainWindow::ID_LAST } |
Public Member Functions | |
| long | onGLExpose (FXObject *, FXSelector, void *) |
| Sets up the GL window and draws it for the first time. | |
| long | onGLConfigure (FXObject *, FXSelector, void *) |
| Sets the viewport after the window is resized. | |
| long | onGLSelect (FXObject *, FXSelector, void *) |
| long | onGLMouseMotion (FXObject *, FXSelector, void *) |
| Changes the viewpoint or light position when the mouse moves. | |
| long | onGLMouseDown (FXObject *, FXSelector, void *) |
| Sets the mouse state variables when buttons pushed down. | |
| long | onGLMouseUp (FXObject *, FXSelector, void *) |
| Resets mouse state on button up. | |
| long | onGLMouseWheel (FXObject *, FXSelector, void *) |
| Changes field of view on mouse wheel. | |
| void | onGLRefresh () |
| Draws the heightmap graph. | |
| unsigned char * | getImage (int &width, int &height) |
| Replots the graph then copies and returns the image for saving. | |
| HeightWinDialog (FXApp *app, FXWindow *win, CGraphFont *ft) | |
| Constructor. | |
Public Attributes | |
| bool | drawlabels |
| Draw axis labels? | |
| bool | perspective |
| Draw with perspective correction? | |
| int | box |
| Draw surrouding box (style). | |
| bool | plate |
| Draw ground plate. | |
| unsigned char | boxcolour [3] |
| Box colour. | |
| unsigned char | platecolour [3] |
| Plate colour. | |
| float | diffusecolour [4] |
| Light diffuse colour. | |
| float | specularcolour [4] |
| Light specular colour. | |
| float | lightpos [4] |
| Light position. | |
| float | shininess |
| Surface shininess. | |
| bool | motiontype |
| Camera or light motion. | |
| int | drawmode |
| Draw triangles/lines/points. | |
| bool | switchdir |
| Switch rendering direction (x to y). | |
| bool | zbackgrid |
| Draw z axis grid behind data? | |
|
struct HeightWinDialog::grid | xmaj |
| Grid settings structure. | |
|
struct HeightWinDialog::grid | xmin |
| Grid settings structure. | |
|
struct HeightWinDialog::grid | ymaj |
| Grid settings structure. | |
|
struct HeightWinDialog::grid | ymin |
| Grid settings structure. | |
|
struct HeightWinDialog::grid | zmaj |
| Grid settings structure. | |
| struct HeightWinDialog::grid | zmin |
| Grid settings structure. | |
| FXString | labels [5] |
| Labels: title, sub-title, x, y, z. | |
| FXString | axes [6] |
| Axis limit strings: xmin, xmax, ymin, ymax, zmin, zmax. | |
| int | txtpos [4] |
| Positions of axes labels (title, x, y, z). | |
| struct HeightWinDialog::datapoint * | hmdata |
| The heightmap data structure. | |
| unsigned int | xdatapts |
| Number of x datapoints. | |
| unsigned int | ydatapts |
| Number of y datapoints. | |
| unsigned int | xdatadisplay |
| Number of points to display (to allow speeding up). | |
| bool | state |
| Button status. | |
| int | x |
| x position | |
| int | y |
| y position | |
Protected Attributes | |
| FXGLVisual * | GLVisual |
| OpenGL visual target. | |
| FXGLCanvas * | GLCanvas |
| OpenGL canvas. | |
Private Member Functions | |
| HeightWinDialog () | |
Private Attributes | |
| struct HeightWinDialog::canvassets | canvasSettings |
| Canvas camera settings structure. | |
| FXCursor * | crosshair |
| Cursor crosshair icon. | |
| CGraphFont * | fnt |
| Font object. | |
| GLUquadricObj * | sphereQuadric |
| Sphere for light positioning. | |
| struct { | |
| bool state | |
| Button status. | |
| int x | |
| x position | |
| int y | |
| y position | |
| } | mouseData [3] |
| Mouse state structure. | |
Classes | |
| struct | canvassets |
| Canvas camera settings structure. More... | |
| struct | datapoint |
| The heightmap data structure. More... | |
| struct | grid |
| Grid settings structure. More... | |
| anonymous enum |
| HeightWinDialog::HeightWinDialog | ( | FXApp * | app, | |
| FXWindow * | win, | |||
| CGraphFont * | ft | |||
| ) |
Constructor.
| app | Application object. | |
| win | Parent window. | |
| ft | Pointer the to the font class instance. |
Definition at line 78 of file HeightWin.cpp.
References box, boxcolour, canvasSettings, crosshair, diffusecolour, drawmode, HeightWinDialog::canvassets::eye, fnt, HeightWinDialog::canvassets::fov, GLCanvas, GLVisual, hmdata, ic_hm16, ic_hm32, ID_CANVAS, lightpos, HeightWinDialog::canvassets::look, motiontype, mouseData, HeightWinDialog::grid::on, perspective, plate, platecolour, specularcolour, sphereQuadric, switchdir, HeightWinDialog::canvassets::up, HeightWinDialog::canvassets::vp, xdatapts, xmaj, xmin, ydatapts, ymaj, ymin, zbackgrid, zmaj, and zmin.
| long HeightWinDialog::onGLExpose | ( | FXObject * | sender, | |
| FXSelector | , | |||
| void * | ||||
| ) |
Sets up the GL window and draws it for the first time.
| sender | Object exposed that requires drawing. |
Definition at line 139 of file HeightWin.cpp.
References onGLRefresh().

| long HeightWinDialog::onGLConfigure | ( | FXObject * | sender, | |
| FXSelector | , | |||
| void * | ||||
| ) |
Sets the viewport after the window is resized.
| sender | Object that requires resizing. |
Definition at line 170 of file HeightWin.cpp.
| long HeightWinDialog::onGLMouseMotion | ( | FXObject * | sender, | |
| FXSelector | , | |||
| void * | ptr | |||
| ) |
Changes the viewpoint or light position when the mouse moves.
| sender | Object that sent the message. | |
| ptr | Mouse settings. |
Definition at line 193 of file HeightWin.cpp.
References canvasSettings, HeightWinDialog::canvassets::eye, GLCanvas, lightpos, HeightWinDialog::canvassets::look, motiontype, mouseData, onGLRefresh(), state, and HeightWinDialog::canvassets::up.

| long HeightWinDialog::onGLMouseDown | ( | FXObject * | , | |
| FXSelector | , | |||
| void * | ptr | |||
| ) |
Sets the mouse state variables when buttons pushed down.
| ptr | Mouse settings. |
Definition at line 261 of file HeightWin.cpp.
References mouseData.
| long HeightWinDialog::onGLMouseUp | ( | FXObject * | , | |
| FXSelector | , | |||
| void * | ptr | |||
| ) |
Resets mouse state on button up.
| ptr | Mouse settings. |
Definition at line 280 of file HeightWin.cpp.
References mouseData, and onGLRefresh().

| long HeightWinDialog::onGLMouseWheel | ( | FXObject * | , | |
| FXSelector | , | |||
| void * | ptr | |||
| ) |
Changes field of view on mouse wheel.
| ptr | Mouse settings. |
Definition at line 293 of file HeightWin.cpp.
References canvasSettings, HeightWinDialog::canvassets::fov, and onGLRefresh().

| unsigned char * HeightWinDialog::getImage | ( | int & | width, | |
| int & | height | |||
| ) |
Replots the graph then copies and returns the image for saving.
| [out] | width | Width of the image. |
| [out] | height | Height of the image. |
Definition at line 1206 of file HeightWin.cpp.
References GLCanvas, and onGLRefresh().
Referenced by GreyLabWindow::cmdHMSave().


struct HeightWinDialog::canvassets HeightWinDialog::canvasSettings [private] |
Canvas camera settings structure.
Canvas camera settings
Referenced by HeightWinDialog(), onGLMouseMotion(), onGLMouseWheel(), and onGLRefresh().
struct { ... } HeightWinDialog::mouseData[3] [private] |
Mouse state structure.
Mouse state
Referenced by HeightWinDialog(), onGLMouseDown(), onGLMouseMotion(), onGLMouseUp(), and onGLRefresh().
Grid settings structure.
Grid parameters
Referenced by GreyLabWindow::cmdHMRedraw(), HeightWinDialog(), and onGLRefresh().
The heightmap data structure.
Heightmap data
Referenced by GreyLabWindow::cmdHMRecalc(), HeightWinDialog(), and onGLRefresh().
1.5.3