HeightWinDialog Class Reference

#include <HeightWin.h>

Collaboration diagram for HeightWinDialog:

Collaboration graph
[legend]

List of all members.


Detailed Description

HeightMap window class.

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.
CGraphFontfnt
 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...

Member Enumeration Documentation

anonymous enum

Enumerator:
ID_CANVAS 

Definition at line 90 of file HeightWin.h.


Constructor & Destructor Documentation

HeightWinDialog::HeightWinDialog ( FXApp *  app,
FXWindow *  win,
CGraphFont ft 
)

Constructor.

Parameters:
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.


Member Function Documentation

long HeightWinDialog::onGLExpose ( FXObject *  sender,
FXSelector  ,
void *   
)

Sets up the GL window and draws it for the first time.

Parameters:
sender Object exposed that requires drawing.
Returns:
Returns 1 to show that the message was handled.

Definition at line 139 of file HeightWin.cpp.

References onGLRefresh().

Here is the call graph for this function:

long HeightWinDialog::onGLConfigure ( FXObject *  sender,
FXSelector  ,
void *   
)

Sets the viewport after the window is resized.

Parameters:
sender Object that requires resizing.
Returns:
Returns 1 to show that the message was handled.

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.

Parameters:
sender Object that sent the message.
ptr Mouse settings.
Returns:
Returns 1 to show that the message was handled.

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.

Here is the call graph for this function:

long HeightWinDialog::onGLMouseDown ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Sets the mouse state variables when buttons pushed down.

Parameters:
ptr Mouse settings.
Returns:
Returns 1 to show that the message was handled.

Definition at line 261 of file HeightWin.cpp.

References mouseData.

long HeightWinDialog::onGLMouseUp ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Resets mouse state on button up.

Parameters:
ptr Mouse settings.
Returns:
Returns 1 to show that the message was handled.

Definition at line 280 of file HeightWin.cpp.

References mouseData, and onGLRefresh().

Here is the call graph for this function:

long HeightWinDialog::onGLMouseWheel ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Changes field of view on mouse wheel.

Parameters:
ptr Mouse settings.
Returns:
Returns 1 to show that the message was handled.

Definition at line 293 of file HeightWin.cpp.

References canvasSettings, HeightWinDialog::canvassets::fov, and onGLRefresh().

Here is the call graph for this function:

unsigned char * HeightWinDialog::getImage ( int &  width,
int &  height 
)

Replots the graph then copies and returns the image for saving.

Parameters:
[out] width Width of the image.
[out] height Height of the image.
Returns:
The image as an array of unsigned chars of size 3*width*height.

Definition at line 1206 of file HeightWin.cpp.

References GLCanvas, and onGLRefresh().

Referenced by GreyLabWindow::cmdHMSave().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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().

struct HeightWinDialog::grid HeightWinDialog::zmin

Grid settings structure.

Grid parameters

Referenced by GreyLabWindow::cmdHMRedraw(), HeightWinDialog(), and onGLRefresh().

struct HeightWinDialog::datapoint * HeightWinDialog::hmdata

The heightmap data structure.

Heightmap data

Referenced by GreyLabWindow::cmdHMRecalc(), HeightWinDialog(), and onGLRefresh().


The documentation for this class was generated from the following files:
Generated on Mon Mar 10 13:55:46 2008 for GreyLab by  doxygen 1.5.3