#include <vuSpectral.h>
Inheritance diagram for vuSpectral:
Public Member Functions | |
vuSpectral () | |
Constructor. | |
~vuSpectral () | |
Destructor. | |
bool | init (const char *DataFile) |
void | notifyDataChanged () |
external update trigger, virtual from some parent class | |
virtual vuCamera * | getCamera () |
This function must return a pointer to the camera that is taking the picture of the scene. | |
virtual vuImage * | getCurrentImage () |
This function must return a pointer to the current vuImage buffer that the method can write to or read from. | |
virtual void | DrawFromImage () |
This function must take the data vuImage buffer from the last call to getCurrent Image and draw that on the screen. | |
virtual void | DrawAgain () |
This function must rerender the scene completely. | |
void | handleGUIevent (wxCommandEvent &ev) |
handle some GUI events (idDOSPECULAR, idDRAWPREV) | |
virtual void | addRight (wxSizer *sizer) |
This method adds controls to the bottom of the window. | |
Static Public Member Functions | |
const char * | getFileType () |
Returns the type of vu Datafile that the utility works with. | |
Protected Member Functions | |
bool | glInit () |
Initializes open gl for the utility. | |
void | glRender () |
void | glResize () |
Resizes the gl viewport and renders the volume. | |
void | onMouse (wxMouseEvent &ev) |
Handles mouse commands from the user. | |
void | OnSlideLight (wxScrollEvent &event) |
event handler for the light property sliders. | |
void | OnButtonRender (wxCommandEvent &event) |
initiate a refresh of the rendering | |
void | OnButtonLoadSetup (wxCommandEvent &event) |
load a scene setup. | |
void | OnButtonLightPos (wxCommandEvent &ev) |
set light direction from current observer to centre of the volume | |
vu1 * | getVolume () |
Returns a pointer to the volume object. (usually m_Data). | |
Private Types | |
enum | { idDOSPECULAR, idDRAWPREV } |
Private Attributes | |
vu1112112 * | m_Data |
The spectral raycaster owned by the utility. | |
vuTFDesignSpec | m_TFunc |
The transfer function. | |
vuTFDialogSpec | m_TFuncDlg |
vuLightDial | m_LightDial |
wxSlider * | m_LightColour |
Slider to control the properties of the light. | |
wxSlider * | m_LightIntensity |
Slider to control the properties of the light. | |
int | m_x |
The width of the window. | |
int | m_y |
The height of the window. | |
vuPreviewWin * | m_Preview |
This is a handle for a preview box. |
This class provides a GUI for vu1112112 (aka vuVolumeRegularUnimodal3d1B1ValSpectral). It renders a dataset using a spectral color model. This allows modelling special physical properties of light like spectral absorption and metamerism.
Definition at line 26 of file vuSpectral.h.
|
Definition at line 28 of file vuSpectral.h. |
|
Constructor.
Definition at line 38 of file vuSpectral.cpp. |
|
Destructor.
Definition at line 48 of file vuSpectral.cpp. References m_Data. |
|
This method adds controls to the bottom of the window.
Reimplemented from vuBasicUtility. Definition at line 112 of file vuSpectral.cpp. References idDOSPECULAR, idDRAWPREV, idLIGHTPOS, idRENDER, m_Data, m_Preview, ns_vu1112112::vu1112112::setDoSpecular(), and ns_vu1112112::vu1112112::setDrawPreview(). |
Here is the call graph for this function:
|
This function must rerender the scene completely. This is so that the key frame animator can set the camera, and then force a redraw by the method. Implements vuBasicUtility. Definition at line 287 of file vuSpectral.cpp. References ns_vu1112112::vu1112112::doRefresh(), m_Data, and vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
This function must take the data vuImage buffer from the last call to getCurrent Image and draw that on the screen. This is so that prerendered video animation can be displayed by the key frame animator by simply setting the vuImage returned by getCurrentImage and then calling this function. Implements vuBasicUtility. Definition at line 294 of file vuSpectral.cpp. References vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
This function must return a pointer to the camera that is taking the picture of the scene. This is so that the key frame animator can read the camera when it needs to take a snapshot and change the camera when it wants the method to rerender the scene from a predetermined camera position. Implements vuBasicUtility. Definition at line 275 of file vuSpectral.cpp. References vu1::getCameraPtr(), and m_Data. Referenced by OnButtonLightPos(). |
Here is the call graph for this function:
|
This function must return a pointer to the current vuImage buffer that the method can write to or read from. This is how the key framer will update the screen. Implements vuBasicUtility. Definition at line 280 of file vuSpectral.cpp. References ns_vu1112112::vu1112112::getImage(), and m_Data. |
Here is the call graph for this function:
|
Returns the type of vu Datafile that the utility works with.
Reimplemented from vuBasicUtility. Definition at line 57 of file vuSpectral.cpp. |
|
Returns a pointer to the volume object. (usually m_Data).
Reimplemented from vuBasicUtility. Definition at line 322 of file vuSpectral.cpp. |
|
Initializes open gl for the utility. The method calls the initgl() method so it can do the proper initialization. Reimplemented from vuBasicUtility. Definition at line 193 of file vuSpectral.cpp. References GL_DEPTH_TEST, GL_LESS, glDepthFunc(), glEnable(), ns_vu1112112::vu1112112::initOpenGL(), and m_Data. |
Here is the call graph for this function:
|
The method calls the render() method, setting it up to render to the window's gl canvas. It "automagically" creates a preview now -ms-. Reimplemented from vuBasicUtility. Definition at line 215 of file vuSpectral.cpp. References vuGLCanvas::getHeight(), vuTFIntensity::getLight(), vuGLCanvas::getWidth(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, glClear(), glLoadIdentity(), glMatrixMode(), glOrtho(), vuLightDial::isUpdated(), vuTransferDialog::isUpdated(), ns_vu1112112::light, m_Data, m_LightDial, m_TFunc, m_TFuncDlg, vu1112::preview(), ns_vu1112112::vu1112112::render(), ns_vu1112112::vu1112112::setLight(), vu111211::setTransferFunc(), vuTransferDialog::unsetUpdated(), vuLightDial::updateSliders(), and vuTFDialogSpec::updateSliders(). |
Here is the call graph for this function:
|
Resizes the gl viewport and renders the volume.
Reimplemented from vuBasicUtility. Definition at line 254 of file vuSpectral.cpp. References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), m_Data, and ns_vu1112112::vu1112112::setImageSize(). |
Here is the call graph for this function:
|
handle some GUI events (idDOSPECULAR, idDRAWPREV)
Definition at line 302 of file vuSpectral.cpp. References idDOSPECULAR, idDRAWPREV, m_Data, ns_vu1112112::vu1112112::setDoSpecular(), and ns_vu1112112::vu1112112::setDrawPreview(). |
Here is the call graph for this function:
|
Initializes the utility window. A object is created and the volume data is read. The window appears when finished. Reimplemented from vuBasicUtility. Definition at line 66 of file vuSpectral.cpp. References vuTFDesign::addColour(), vuTFDesign::addOpacity(), vuPreviewWin::attachCamera(), vuTFDesignSpec::generateFunction(), vu1::getCamera(), vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vu1::getErrorMessage(), m_Data, m_Preview, m_TFunc, ns_vu1112112::vu1112112::read(), vuTFDesign::setColourSmoothing(), vuPreviewWin::setCubeSize(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), and vu111211::setTransferFunc(). |
Here is the call graph for this function:
|
external update trigger, virtual from some parent class
Reimplemented from vuBasicUtility. Definition at line 184 of file vuSpectral.cpp. References vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
set light direction from current observer to centre of the volume
Definition at line 314 of file vuSpectral.cpp. References getCamera(), ns_vu1112112::vu1112112::getCenter(), vuCamera::getPosition(), m_Data, vuVector::makeUnit(), and ns_vu1112112::vu1112112::setLightDir(). |
Here is the call graph for this function:
|
load a scene setup. This opens a wxFileDialog. Definition at line 166 of file vuSpectral.cpp. References ns_vu1112112::vu1112112::load_scene(), and m_Data. |
Here is the call graph for this function:
|
initiate a refresh of the rendering
Definition at line 154 of file vuSpectral.cpp. References ns_vu1112112::vu1112112::doRefresh(), m_Data, and vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
Handles mouse commands from the user. The mouse is the main interface between the user and the utility at the moment. This method receives mouse events from the window, and carries out commands. Reimplemented from vuBasicUtility. Definition at line 263 of file vuSpectral.cpp. References m_LightDial, and m_TFuncDlg. |
|
event handler for the light property sliders.
Definition at line 143 of file vuSpectral.cpp. References vuGLCanvas::redraw(). |
Here is the call graph for this function:
|
The spectral raycaster owned by the utility.
Definition at line 96 of file vuSpectral.h. Referenced by addRight(), DrawAgain(), getCamera(), getCurrentImage(), glInit(), glRender(), glResize(), handleGUIevent(), init(), OnButtonLightPos(), OnButtonLoadSetup(), OnButtonRender(), and ~vuSpectral(). |
|
Slider to control the properties of the light. Calls the event handler OnSlideLight(). Definition at line 106 of file vuSpectral.h. |
|
Definition at line 101 of file vuSpectral.h. Referenced by glRender(), and onMouse(). |
|
Slider to control the properties of the light. Calls the event handler OnSlideLight(). Definition at line 106 of file vuSpectral.h. |
|
This is a handle for a preview box.
Definition at line 114 of file vuSpectral.h. Referenced by addRight(), and init(). |
|
The transfer function. This is not yet used because the TF don't yet operate on spectral colours. Reimplemented from vuBasicUtility. Definition at line 99 of file vuSpectral.h. Referenced by glRender(), and init(). |
|
Definition at line 100 of file vuSpectral.h. Referenced by glRender(), and onMouse(). |
|
The width of the window.
Definition at line 109 of file vuSpectral.h. |
|
The height of the window.
Definition at line 111 of file vuSpectral.h. |