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

vuSplat Class Reference

A utility window for using Steve's more general splatter. More...

#include <vuSplat.h>

Inheritance diagram for vuSplat:

Inheritance graph
[legend]
Collaboration diagram for vuSplat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuSplat ()
 Constructor.
 ~vuSplat ()
 Destructor.
bool init (const char *DataFile)
 Initializes the splatter utility.
virtual void notifyDataChanged ()
 Updates the view by calling m_glCanvas->redraw().
virtual void DrawAgain ()
 Rerenders the screen from the current camera position.
virtual void DrawFromImage ()
 Draws on the screen the image contained in the image buffer.
virtual vuImagegetCurrentImage ()
 This will return a pointer to the image buffer that is being used by the method to draw images to...
virtual vuCameragetCamera ()
 This will return a poiunter to the camera that the method is using (note that this may be derived from vuCamera...).
virtual bool IsReRendering ()
 This will return whether or not the splatter is rerendering to the screen.
virtual void setIsReRendering (bool isit)
 This will set the state of rerendering to be the same as isit.

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 splatter utility.
void glRender ()
 Calls on the splatter to render the volume.
void glResize ()
 Resizes the gl viewport and renders the volume.
void glOnMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.

Private Attributes

vu1112111m_Data
 The splatter owned by the utility.
vuCamera m_Camera
 A camera class for storing the user's current view.
float m_ViewScale
 The zoom magnification of the splatter.
vuTFDesign m_TFunc
 the transfer function
vuTransferDialog m_TFDialog
 The dialog to edit the transfer function.
int m_x
 The width of the window.
int m_y
 The height of the window.

Detailed Description

A utility window for using Steve's more general splatter.

This class is a utility window wrapper for Steve's general splatter. This splatter is part of the vuVolume tree, and is meant to be as general as possible. (see the included header files). The utility displays an OpenGL window which lets users rotate the object, zoom it, as well as edit the transfer function. All these commands are done using the mouse.

The class is a good example of a general vuGui utility. It can be used as a model for building other utilities.

Definition at line 36 of file vuSplat.h.


Constructor & Destructor Documentation

vuSplat::vuSplat  ) 
 

Constructor.

Definition at line 25 of file vuSplat.cpp.

vuSplat::~vuSplat  ) 
 

Destructor.

Definition at line 35 of file vuSplat.cpp.

References m_Data.


Member Function Documentation

void vuSplat::DrawAgain  )  [virtual]
 

Rerenders the screen from the current camera position.

Implements vuBasicUtility.

Definition at line 102 of file vuSplat.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSplat::DrawFromImage  )  [virtual]
 

Draws on the screen the image contained in the image buffer.

Implements vuBasicUtility.

Definition at line 108 of file vuSplat.cpp.

References vu1112111::drawPic(), and m_Data.

Here is the call graph for this function:

vuCamera * vuSplat::getCamera  )  [virtual]
 

This will return a poiunter to the camera that the method is using (note that this may be derived from vuCamera...).

Implements vuBasicUtility.

Definition at line 120 of file vuSplat.cpp.

vuImage * vuSplat::getCurrentImage  )  [virtual]
 

This will return a pointer to the image buffer that is being used by the method to draw images to...

Implements vuBasicUtility.

Definition at line 114 of file vuSplat.cpp.

References vu1112111::getBuffer(), and m_Data.

Here is the call graph for this function:

const char * vuSplat::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 44 of file vuSplat.cpp.

bool vuSplat::glInit  )  [protected, virtual]
 

Initializes open gl for the splatter utility.

The method calls the splatter initgl() method so it can do the proper initialization.

Reimplemented from vuBasicUtility.

Definition at line 130 of file vuSplat.cpp.

References GL_LIGHT0, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, GL_TRUE, glClearColor(), glEnable(), glLightModeli(), vu1112111::initOpenGL(), and m_Data.

Here is the call graph for this function:

void vuSplat::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 219 of file vuSplat.cpp.

References vuCamera::getPosition(), glResize(), m_Camera, m_TFDialog, m_ViewScale, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), and vuCamera::translateXYZ().

Here is the call graph for this function:

void vuSplat::glRender  )  [protected, virtual]
 

Calls on the splatter to render the volume.

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

Reimplemented from vuBasicUtility.

Definition at line 149 of file vuSplat.cpp.

References vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuCamera::getLookAtVector(), vuTFIntensity::getNComponents(), vuCamera::getRightVector(), vuCamera::getUpVector(), GL_COLOR_BUFFER_BIT, glClear(), glLoadIdentity(), glTranslatef(), vuCamera::gluLookAt(), m_Camera, m_Data, m_TFunc, vu1112111::render(), vu111211::setTransferFunc(), and vu1112111::setViewVectors().

Here is the call graph for this function:

void vuSplat::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 189 of file vuSplat.cpp.

References dword, vu1112::getDim1Size(), vu1112::getDim2Size(), vu1112::getDim3Size(), vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GL_LIGHT0, GL_MODELVIEW, GL_POSITION, GL_PROJECTION, GLint, glLightfv(), glLoadIdentity(), glMatrixMode(), glOrtho(), glViewport(), m_Data, m_ViewScale, and max.

Referenced by glOnMouse().

Here is the call graph for this function:

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

Initializes the splatter utility.

Initializes the utility window. A splatting object is created and the volume data is read. The window appears when finished.

Reimplemented from vuBasicUtility.

Definition at line 53 of file vuSplat.cpp.

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

Here is the call graph for this function:

bool vuSplat::IsReRendering  )  [virtual]
 

This will return whether or not the splatter is rerendering to the screen.

Reimplemented from vuBasicUtility.

Definition at line 269 of file vuSplat.cpp.

References vu1::IsReRendering(), and m_Data.

Here is the call graph for this function:

void vuSplat::notifyDataChanged  )  [virtual]
 

Updates the view by calling m_glCanvas->redraw().

Reimplemented from vuBasicUtility.

Definition at line 180 of file vuSplat.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

void vuSplat::setIsReRendering bool  isit  )  [virtual]
 

This will set the state of rerendering to be the same as isit.

Reimplemented from vuBasicUtility.

Definition at line 275 of file vuSplat.cpp.

References m_Data, and vu1::setIsReRendering().

Here is the call graph for this function:


Member Data Documentation

vuCamera vuSplat::m_Camera [private]
 

A camera class for storing the user's current view.

Definition at line 101 of file vuSplat.h.

Referenced by glOnMouse(), and glRender().

vu1112111* vuSplat::m_Data [private]
 

The splatter owned by the utility.

Definition at line 99 of file vuSplat.h.

Referenced by DrawFromImage(), getCurrentImage(), glInit(), glRender(), glResize(), init(), IsReRendering(), setIsReRendering(), and ~vuSplat().

vuTransferDialog vuSplat::m_TFDialog [private]
 

The dialog to edit the transfer function.

Definition at line 107 of file vuSplat.h.

Referenced by glOnMouse().

vuTFDesign vuSplat::m_TFunc [private]
 

the transfer function

Reimplemented from vuBasicUtility.

Definition at line 105 of file vuSplat.h.

Referenced by glRender(), and init().

float vuSplat::m_ViewScale [private]
 

The zoom magnification of the splatter.

Definition at line 103 of file vuSplat.h.

Referenced by glOnMouse(), and glResize().

int vuSplat::m_x [private]
 

The width of the window.

Definition at line 110 of file vuSplat.h.

Referenced by glOnMouse().

int vuSplat::m_y [private]
 

The height of the window.

Definition at line 112 of file vuSplat.h.

Referenced by glOnMouse().


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