#include <vuPreviewWin.h>
Inheritance diagram for vuPreviewWin:
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 | |
vuBasicUtility * | m_Parent |
pointer to the window that owns this Preview (not used) | |
vuVector | center |
center to ratate about | |
vuCamera * | m_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 |
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
Definition at line 13 of file vuPreviewWin.cpp. |
|
destructor
Definition at line 19 of file vuPreviewWin.cpp. |
|
attaches a vuCamera that should be controled by the vuPreviewWin
Definition at line 23 of file vuPreviewWin.cpp. References m_Camera. Referenced by vuSpectral::init(), and vuRaycast::init(). |
|
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:
|
our own init function
Reimplemented from vuGLCanvas. Definition at line 66 of file vuPreviewWin.cpp. |
|
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:
|
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:
|
set the size of the cube that has to be shown
Definition at line 28 of file vuPreviewWin.cpp. References center, m_MX, m_MY, and m_MZ. Referenced by vuSpectral::init(), and vuRaycast::init(). |
|
center to ratate about
Definition at line 55 of file vuPreviewWin.h. Referenced by setCubeSize(). |
|
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(). |
|
3D extension of the data set
Definition at line 61 of file vuPreviewWin.h. Referenced by render(), and setCubeSize(). |
|
3D extension of the data set
Definition at line 61 of file vuPreviewWin.h. Referenced by render(), and setCubeSize(). |
|
3D extension of the data set
Definition at line 61 of file vuPreviewWin.h. Referenced by render(), and setCubeSize(). |
|
pointer to the window that owns this Preview (not used)
Definition at line 52 of file vuPreviewWin.h. |