Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuPreviewWin Class Reference

Creates a little subwindow showing a box from a certain perspective. More...

#include <vuPreviewWin.h>

Inheritance diagram for vuPreviewWin:

Inheritance graph
[legend]
Collaboration diagram for vuPreviewWin:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuPreviewWin (vuBasicUtility *parent, int size_x, int size_y)
 constructor
 ~vuPreviewWin ()
 destructor
void attachCamera (vuCamera *cam)
 attaches a vuCamera that should be controled by the vuPreviewWin
void setCubeSize (int sx, int sy, int sz)
 set the size of the cube that has to be shown
void render ()
 implementation of the virtual render function
bool glInit ()
 our own init function
void glOnMouse (wxMouseEvent &ev)
 mouse handler that performs the arc ball transformation

Protected Member Functions

virtual void drawRepresentation (float sx, float sy, float sz)
 draw a representation of the dataset of given size

Protected Attributes

vuBasicUtilitym_Parent
 pointer to the window that owns this Preview (not used)
vuVector center
 center to ratate about
vuCameram_Camera
 reference to the camere that should be controled by the previewer
int m_MX
 3D extension of the data set
int m_MY
 3D extension of the data set
int m_MZ
 3D extension of the data set

Detailed Description

Creates a little subwindow showing a box from a certain perspective.

This widget is provides a means to control the camera perspective from outside the rendering window. A little representation of the dataset is shown. Currently this is a coloured cube with the measures of the bounding box, but maybe

Definition at line 15 of file vuPreviewWin.h.


Constructor & Destructor Documentation

vuPreviewWin::vuPreviewWin vuBasicUtility parent,
int  size_x,
int  size_y
 

constructor

Parameters:
parent parent window
sixe_xy the desired size of preview window

Definition at line 13 of file vuPreviewWin.cpp.

vuPreviewWin::~vuPreviewWin  ) 
 

destructor

Definition at line 19 of file vuPreviewWin.cpp.


Member Function Documentation

void vuPreviewWin::attachCamera vuCamera cam  ) 
 

attaches a vuCamera that should be controled by the vuPreviewWin

Parameters:
cam pointer to the camera that should be manipulated

Definition at line 23 of file vuPreviewWin.cpp.

References m_Camera.

Referenced by vuSpectral::init(), and vuRaycast::init().

void vuPreviewWin::drawRepresentation float  sx,
float  sy,
float  sz
[protected, virtual]
 

draw a representation of the dataset of given size

Currently this virtual function draws a cube. It is possible to plug in other objects using OpenGL functions. Projection and modelview matrix are already setup according to the camera.

Definition at line 122 of file vuPreviewWin.cpp.

References GL_QUADS, glBegin(), glColor3fv(), glEnd(), GLfloat, GLint, glNormal3fv(), and glVertex3fv().

Referenced by render().

Here is the call graph for this function:

bool vuPreviewWin::glInit  )  [virtual]
 

our own init function

Reimplemented from vuGLCanvas.

Definition at line 66 of file vuPreviewWin.cpp.

void vuPreviewWin::glOnMouse wxMouseEvent &  ev  ) 
 

mouse handler that performs the arc ball transformation

Definition at line 75 of file vuPreviewWin.cpp.

References vuArcBall::attachCamera(), vuCamera::getPosition(), vuCamera::init(), m_Camera, vuVector::norm(), vuGLCanvas::redraw(), vuGLCanvas::resize(), vuArcBall::setWinSize(), vuCamera::translateXYZ(), and vuArcBall::turn().

Here is the call graph for this function:

void vuPreviewWin::render  )  [virtual]
 

implementation of the virtual render function

Reimplemented from vuGLCanvas.

Definition at line 36 of file vuPreviewWin.cpp.

References drawRepresentation(), GL_COLOR_BUFFER_BIT, GL_CULL_FACE, GL_DEPTH_BUFFER_BIT, GL_DEPTH_TEST, GL_LESS, GL_MODELVIEW, GL_PROJECTION, glClear(), glDepthFunc(), glDisable(), glEnable(), vuCamera::glInit(), glLoadIdentity(), glMatrixMode(), vuCamera::gluLookAt(), m_Camera, m_MX, m_MY, and m_MZ.

Here is the call graph for this function:

void vuPreviewWin::setCubeSize int  sx,
int  sy,
int  sz
 

set the size of the cube that has to be shown

Parameters:
sx,sy,sz extents of the cube

Definition at line 28 of file vuPreviewWin.cpp.

References center, m_MX, m_MY, and m_MZ.

Referenced by vuSpectral::init(), and vuRaycast::init().


Member Data Documentation

vuVector vuPreviewWin::center [protected]
 

center to ratate about

Definition at line 55 of file vuPreviewWin.h.

Referenced by setCubeSize().

vuCamera* vuPreviewWin::m_Camera [protected]
 

reference to the camere that should be controled by the previewer

Definition at line 58 of file vuPreviewWin.h.

Referenced by attachCamera(), glOnMouse(), and render().

int vuPreviewWin::m_MX [protected]
 

3D extension of the data set

Definition at line 61 of file vuPreviewWin.h.

Referenced by render(), and setCubeSize().

int vuPreviewWin::m_MY [protected]
 

3D extension of the data set

Definition at line 61 of file vuPreviewWin.h.

Referenced by render(), and setCubeSize().

int vuPreviewWin::m_MZ [protected]
 

3D extension of the data set

Definition at line 61 of file vuPreviewWin.h.

Referenced by render(), and setCubeSize().

vuBasicUtility* vuPreviewWin::m_Parent [protected]
 

pointer to the window that owns this Preview (not used)

Definition at line 52 of file vuPreviewWin.h.


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:22:01 2004 for vuVolume by  doxygen 1.3.9.1