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

vuRaycast Class Reference

A utility window for RGBa raycasting. More...

#include <vuRaycast.h>

Inheritance diagram for vuRaycast:

Inheritance graph
[legend]
Collaboration diagram for vuRaycast:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuRaycast ()
 Constructor.
 ~vuRaycast ()
 Destructor.
bool init (const char *DataFile)
virtual vuCameragetCamera ()
 This function must return a pointer to the camera that is taking the picture of the scene.
virtual vuImagegetCurrentImage ()
 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 addRight (wxSizer *sizer)
 This method adds controls to the bottom of the window.
virtual void DrawAgain ()
 This function must rerender the scene completely.

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 onRender ()
void glResize ()
 Resizes the gl viewport and renders the volume.
void onMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.
void OnButtonRender (wxCommandEvent &event)
 initiate a refresh of the rendering
void OnChangeSampDist (void)
 Called if sampling distance has been changed.
void OnCheckBoxPreDraw (void)
 Called if someone's checking the checkbox.
void OnCheckBoxDoSpec (void)
 Called if someone's checking the checkbox for specular shading.
void OnSelectTFunc ()
 Changes the method for evaluating the transfer function.
void onKeyboard (wxKeyEvent &event)
 Keyboard handler.
vu1getVolume ()
 returns a pointer to m_Data

Private Attributes

vu1112113m_Data
 The raycaster owned by the utility.
vuTFDesign m_TFunc
 The transfer function.
vuTransferDialog m_TFuncDlg
 The transfer function dialog.
vuPreviewWinm_Preview
 This is a handle for a preview box.
wxTextCtrl * m_TCsmpDist
 for changing sampling distance
wxCheckBox * m_CBdoSpec
 setting the state for preview drawing and specular shading
wxCheckBox * m_CBdrawPrev
 setting the state for preview drawing and specular shading
wxListBox * m_TFuncList
 list of the different methods for evaluating the transfer function

Detailed Description

A utility window for RGBa raycasting.

Definition at line 20 of file vuRaycast.h.


Constructor & Destructor Documentation

vuRaycast::vuRaycast  ) 
 

Constructor.

Definition at line 40 of file vuRaycast.cpp.

vuRaycast::~vuRaycast  ) 
 

Destructor.

Definition at line 49 of file vuRaycast.cpp.

References m_Data.


Member Function Documentation

void vuRaycast::addRight wxSizer *  sizer  )  [virtual]
 

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 137 of file vuRaycast.cpp.

References idDOSPEC, idPREDRAW, idRENDER, idSMPDIST, idTFUNC, m_CBdoSpec, m_CBdrawPrev, m_Preview, m_TCsmpDist, m_TFuncList, NULL, and size.

void vuRaycast::DrawAgain  )  [virtual]
 

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 173 of file vuRaycast.cpp.

References vu1112113::doRefresh(), m_Data, and vuGLCanvas::redraw().

Here is the call graph for this function:

void vuRaycast::DrawFromImage  )  [virtual]
 

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 180 of file vuRaycast.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

vuCamera * vuRaycast::getCamera  )  [virtual]
 

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 113 of file vuRaycast.cpp.

References vu1::getCameraPtr(), and m_Data.

Here is the call graph for this function:

vuImage * vuRaycast::getCurrentImage  )  [virtual]
 

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 119 of file vuRaycast.cpp.

References vu1112113::getImage(), and m_Data.

Here is the call graph for this function:

const char * vuRaycast::getFileType  )  [static]
 

Returns the type of vu Datafile that the utility works with.

Reimplemented from vuBasicUtility.

Definition at line 58 of file vuRaycast.cpp.

vu1 * vuRaycast::getVolume  )  [protected, virtual]
 

returns a pointer to m_Data

Reimplemented from vuBasicUtility.

Definition at line 381 of file vuRaycast.cpp.

bool vuRaycast::glInit  )  [protected, virtual]
 

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 246 of file vuRaycast.cpp.

References GL_DEPTH_TEST, GL_LESS, glDepthFunc(), glEnable(), vu1112113::initOpenGL(), and m_Data.

Here is the call graph for this function:

void vuRaycast::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 289 of file vuRaycast.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GLint, glViewport(), m_Data, and vu1112113::setImageSize().

Here is the call graph for this function:

bool vuRaycast::init const char *  DataFile  )  [virtual]
 

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 67 of file vuRaycast.cpp.

References vuTFDesign::addColour(), vuTFDesign::addOpacity(), vuPreviewWin::attachCamera(), vu1112113::doPreviewDraw(), vuTFDesign::generateFunction(), vu1::getCamera(), vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vu1::getErrorMessage(), m_Data, m_Preview, m_TFunc, vu1112113::read(), vuTFDesign::setColourSmoothing(), vuPreviewWin::setCubeSize(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), vu111211::setTransferFunc(), and vuCamera::translateXYZ().

Here is the call graph for this function:

void vuRaycast::OnButtonRender wxCommandEvent &  event  )  [protected]
 

initiate a refresh of the rendering

Definition at line 192 of file vuRaycast.cpp.

References vu1112113::doRefresh(), m_Data, and vuGLCanvas::redraw().

Here is the call graph for this function:

void vuRaycast::OnChangeSampDist void   )  [protected]
 

Called if sampling distance has been changed.

Definition at line 218 of file vuRaycast.cpp.

void vuRaycast::OnCheckBoxDoSpec void   )  [protected]
 

Called if someone's checking the checkbox for specular shading.

Definition at line 209 of file vuRaycast.cpp.

void vuRaycast::OnCheckBoxPreDraw void   )  [protected]
 

Called if someone's checking the checkbox.

Definition at line 200 of file vuRaycast.cpp.

void vuRaycast::onKeyboard wxKeyEvent &  event  )  [protected, virtual]
 

Keyboard handler.

Overridden from vuBasicUtility. As implemented so far 'V' will write out file viewpoint.def containing current viewpoint information and 'v' will read in this file to restore viewpoint.

Reimplemented from vuBasicUtility.

Definition at line 340 of file vuRaycast.cpp.

References vu1::getCamera(), vuCamera::getLookAtVector(), vuCamera::getPosition(), vuCamera::getUpVector(), m_Data, vuCamera::setLookAtVector(), vuCamera::setPosition(), and vuCamera::setUpVector().

Here is the call graph for this function:

void vuRaycast::onMouse wxMouseEvent &  ev  )  [protected, virtual]
 

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 327 of file vuRaycast.cpp.

References m_TFuncDlg.

void vuRaycast::onRender  )  [protected, virtual]
 

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 266 of file vuRaycast.cpp.

References vu1112113::displayFromImage(), vu1::getCamera(), vuCamera::getHeight(), vuCamera::getWidth(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, glClear(), glLoadIdentity(), glMatrixMode(), glOrtho(), m_Data, m_TFunc, vu1112113::render(), and vu111211::setTransferFunc().

Here is the call graph for this function:

void vuRaycast::OnSelectTFunc  )  [protected]
 

Changes the method for evaluating the transfer function.

Definition at line 230 of file vuRaycast.cpp.


Member Data Documentation

wxCheckBox* vuRaycast::m_CBdoSpec [private]
 

setting the state for preview drawing and specular shading

Definition at line 122 of file vuRaycast.h.

Referenced by addRight().

wxCheckBox * vuRaycast::m_CBdrawPrev [private]
 

setting the state for preview drawing and specular shading

Definition at line 122 of file vuRaycast.h.

Referenced by addRight().

vu1112113* vuRaycast::m_Data [private]
 

The raycaster owned by the utility.

Definition at line 109 of file vuRaycast.h.

Referenced by DrawAgain(), getCamera(), getCurrentImage(), glInit(), glResize(), init(), OnButtonRender(), onKeyboard(), onRender(), and ~vuRaycast().

vuPreviewWin* vuRaycast::m_Preview [private]
 

This is a handle for a preview box.

Definition at line 116 of file vuRaycast.h.

Referenced by addRight(), and init().

wxTextCtrl* vuRaycast::m_TCsmpDist [private]
 

for changing sampling distance

Definition at line 119 of file vuRaycast.h.

Referenced by addRight().

vuTFDesign vuRaycast::m_TFunc [private]
 

The transfer function.

Reimplemented from vuBasicUtility.

Definition at line 111 of file vuRaycast.h.

Referenced by init(), and onRender().

vuTransferDialog vuRaycast::m_TFuncDlg [private]
 

The transfer function dialog.

Definition at line 113 of file vuRaycast.h.

Referenced by onMouse().

wxListBox* vuRaycast::m_TFuncList [private]
 

list of the different methods for evaluating the transfer function

Definition at line 125 of file vuRaycast.h.

Referenced by addRight().


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