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

vuBCCSheetSplatter Class Reference

#include <vuBCCSheetSplatter.h>

Inheritance diagram for vuBCCSheetSplatter:

Inheritance graph
[legend]
Collaboration diagram for vuBCCSheetSplatter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuBCCSheetSplatter ()
 Constructor.
 ~vuBCCSheetSplatter ()
 Destructor.
bool init (const char *DataFile)
virtual void DrawAgain ()
 This function must rerender the scene completely.
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 vuImagegetCurrentImage ()
 This function must return a pointer to the current vuImage buffer that the method can write to or read from.
virtual vuCameragetCamera ()
 This function must return a pointer to the camera that is taking the picture of the scene.
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 glOnMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.
void OnButtonRender (wxCommandEvent &event)
 initiate a refresh of the rendering
void OnChangeSplatSize (void)
 Called if splat radius has been changed.
void OnChangeSliceWidth (void)
 Called if slice width is to be changed.
void drawBox (float sx, float sy, float sz)
 Draws an axis aligned box originated at (0,0,0).

Private Attributes

vu1512112m_Data
 The spectral raycaster owned by the utility.
vuTFDesign m_TFunc
 The transfer function.
int m_x
 The width of the window.
int m_y
 The height of the window.
bool m_DrawBBox
 bounging box flag.
vuPreviewWinm_Preview
 This is a handle for a preview box.
wxTextCtrl * m_Slicew
 for changing slice width and splat size
wxTextCtrl * m_Splats
 for changing slice width and splat size

Constructor & Destructor Documentation

vuBCCSheetSplatter::vuBCCSheetSplatter  ) 
 

Constructor.

Definition at line 33 of file vuBCCSheetSplatter.cpp.

vuBCCSheetSplatter::~vuBCCSheetSplatter  ) 
 

Destructor.

Definition at line 43 of file vuBCCSheetSplatter.cpp.

References m_Data.


Member Function Documentation

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

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 152 of file vuBCCSheetSplatter.cpp.

References idCHANGE_SLICEW, idCHANGE_SPLATS, idRENDER, m_Slicew, m_Splats, and size.

void vuBCCSheetSplatter::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 128 of file vuBCCSheetSplatter.cpp.

void vuBCCSheetSplatter::drawBox float  sx,
float  sy,
float  sz
[protected]
 

Draws an axis aligned box originated at (0,0,0).

Expired due to the existence of vuPreviewWin.

Definition at line 415 of file vuBCCSheetSplatter.cpp.

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

Referenced by glRender().

Here is the call graph for this function:

void vuBCCSheetSplatter::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 132 of file vuBCCSheetSplatter.cpp.

vuCamera * vuBCCSheetSplatter::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 142 of file vuBCCSheetSplatter.cpp.

vuImage * vuBCCSheetSplatter::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 136 of file vuBCCSheetSplatter.cpp.

const char * vuBCCSheetSplatter::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 52 of file vuBCCSheetSplatter.cpp.

bool vuBCCSheetSplatter::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 195 of file vuBCCSheetSplatter.cpp.

References GL_DEPTH_TEST, GL_LESS, glDepthFunc(), glEnable(), vu1512112::initOpenGL(), m_Data, and vuBasicUtility::useOpenGL().

Here is the call graph for this function:

void vuBCCSheetSplatter::glOnMouse 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 335 of file vuBCCSheetSplatter.cpp.

References vuArcBall::attachCamera(), vu1::getCamera(), vu1::getCameraPtr(), vu1512112::getCenter(), vuCamera::getHeight(), vuCamera::getPosition(), vuTransferDialog::getTransferFunc(), vuCamera::getWidth(), vuParallelCamera::getXRange(), vuParallelCamera::getYRange(), glResize(), vuParallelCamera::init(), m_Data, m_DrawBBox, m_TFunc, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vu151211::setTransferFunc(), vuArcBall::setWinSize(), vuParallelCamera::setXRange(), vuParallelCamera::setYRange(), vuCamera::translateXYZ(), vuArcBall::turn(), and vuBasicUtility::useOpenGL().

Here is the call graph for this function:

void vuBCCSheetSplatter::glRender  )  [protected, virtual]
 

The method calls the render() method, setting it up to render to the window's gl canvas.

Reimplemented from vuBasicUtility.

Definition at line 218 of file vuBCCSheetSplatter.cpp.

References drawBox(), vu1::getCamera(), vu1512112::getCenter(), vuCamera::getHeight(), vuGLCanvas::getHeight(), vuCamera::getWidth(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_DEPTH_TEST, GL_LESS, GL_MODELVIEW, GL_PROJECTION, glClear(), glDepthFunc(), glEnable(), vuCamera::glInit(), GLint, glLoadIdentity(), glMatrixMode(), vuCamera::gluLookAt(), glViewport(), m_Data, and vu1512112::render().

Here is the call graph for this function:

void vuBCCSheetSplatter::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 290 of file vuBCCSheetSplatter.cpp.

References dword, vu1::getCameraPtr(), vu1512::getDim1Size(), vu1512::getDim2Size(), vu1512::getDim3Size(), vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), vuParallelCamera::getXRange(), m_Data, max, vu1512112::setImageSize(), and vuParallelCamera::setYRange().

Referenced by glOnMouse().

Here is the call graph for this function:

bool vuBCCSheetSplatter::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 61 of file vuBCCSheetSplatter.cpp.

References vuTFDesign::addColour(), vuTFDesign::addOpacity(), vuTFDesign::generateFunction(), vu1::getErrorMessage(), m_Data, m_TFunc, vu1512112::read(), vuTFDesign::setColourSmoothing(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), and vu151211::setTransferFunc().

Here is the call graph for this function:

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

initiate a refresh of the rendering

Definition at line 184 of file vuBCCSheetSplatter.cpp.

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

Here is the call graph for this function:

void vuBCCSheetSplatter::OnChangeSliceWidth void   )  [protected]
 

Called if slice width is to be changed.

Definition at line 263 of file vuBCCSheetSplatter.cpp.

References vu1512112::setSliceWidth().

Here is the call graph for this function:

void vuBCCSheetSplatter::OnChangeSplatSize void   )  [protected]
 

Called if splat radius has been changed.

Definition at line 275 of file vuBCCSheetSplatter.cpp.

References vu1512112::setFootprintSize().

Here is the call graph for this function:


Member Data Documentation

vu1512112* vuBCCSheetSplatter::m_Data [private]
 

The spectral raycaster owned by the utility.

Definition at line 81 of file vuBCCSheetSplatter.h.

Referenced by glInit(), glOnMouse(), glRender(), glResize(), init(), OnButtonRender(), and ~vuBCCSheetSplatter().

bool vuBCCSheetSplatter::m_DrawBBox [private]
 

bounging box flag.

Draw a bounding box (using OpenGL) instead of blitting the scene view. OLD because of vuPreviewWin.

Definition at line 94 of file vuBCCSheetSplatter.h.

Referenced by glOnMouse().

vuPreviewWin* vuBCCSheetSplatter::m_Preview [private]
 

This is a handle for a preview box.

Definition at line 97 of file vuBCCSheetSplatter.h.

wxTextCtrl* vuBCCSheetSplatter::m_Slicew [private]
 

for changing slice width and splat size

Definition at line 100 of file vuBCCSheetSplatter.h.

Referenced by addRight().

wxTextCtrl * vuBCCSheetSplatter::m_Splats [private]
 

for changing slice width and splat size

Definition at line 100 of file vuBCCSheetSplatter.h.

Referenced by addRight().

vuTFDesign vuBCCSheetSplatter::m_TFunc [private]
 

The transfer function.

This is not yet used because the TF don't yet operate on spectral colours.

Reimplemented from vuBasicUtility.

Definition at line 84 of file vuBCCSheetSplatter.h.

Referenced by glOnMouse(), and init().

int vuBCCSheetSplatter::m_x [private]
 

The width of the window.

Definition at line 87 of file vuBCCSheetSplatter.h.

Referenced by glOnMouse().

int vuBCCSheetSplatter::m_y [private]
 

The height of the window.

Definition at line 89 of file vuBCCSheetSplatter.h.

Referenced by glOnMouse().


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