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

vuBccSplat Class Reference

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

#include <vuBccSplat.h>

Inheritance diagram for vuBccSplat:

Inheritance graph
[legend]
Collaboration diagram for vuBccSplat:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuBccSplat ()
 Constructor.
 ~vuBccSplat ()
 Destructor.
bool init (const char *DataFile)
 Initializes the splatter utility.
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.

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

vu1512111m_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 to be applied to the splatter.
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 22 of file vuBccSplat.h.


Constructor & Destructor Documentation

vuBccSplat::vuBccSplat  ) 
 

Constructor.

Definition at line 23 of file vuBccSplat.cpp.

vuBccSplat::~vuBccSplat  ) 
 

Destructor.

Definition at line 33 of file vuBccSplat.cpp.

References m_Data.


Member Function Documentation

void vuBccSplat::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 90 of file vuBccSplat.cpp.

void vuBccSplat::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 95 of file vuBccSplat.cpp.

vuCamera * vuBccSplat::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 106 of file vuBccSplat.cpp.

vuImage * vuBccSplat::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 100 of file vuBccSplat.cpp.

const char * vuBccSplat::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 42 of file vuBccSplat.cpp.

bool vuBccSplat::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 116 of file vuBccSplat.cpp.

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

Here is the call graph for this function:

void vuBccSplat::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 190 of file vuBccSplat.cpp.

References vuCamera::getPosition(), vuTransferDialog::getTransferFunc(), glResize(), m_Camera, m_Data, m_TFunc, m_ViewScale, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), vu151211::setTransferFunc(), and vuCamera::translateXYZ().

Here is the call graph for this function:

void vuBccSplat::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 134 of file vuBccSplat.cpp.

References vu1512::getDim1Size(), vu1512::getDim2Size(), vu1512::getDim3Size(), vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), GL_COLOR_BUFFER_BIT, glClear(), glLoadIdentity(), glTranslatef(), vuCamera::gluLookAt(), m_Camera, m_Data, vu1512111::render(), and vu1512111::setViewVectors().

Here is the call graph for this function:

void vuBccSplat::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 160 of file vuBccSplat.cpp.

References dword, vu1512::getDim1Size(), vu1512::getDim2Size(), vu1512::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 vuBccSplat::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 51 of file vuBccSplat.cpp.

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

Here is the call graph for this function:


Member Data Documentation

vuCamera vuBccSplat::m_Camera [private]
 

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

Definition at line 68 of file vuBccSplat.h.

Referenced by glOnMouse(), and glRender().

vu1512111* vuBccSplat::m_Data [private]
 

The splatter owned by the utility.

Definition at line 66 of file vuBccSplat.h.

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

vuTFDesign vuBccSplat::m_TFunc [private]
 

The transfer function to be applied to the splatter.

Reimplemented from vuBasicUtility.

Definition at line 72 of file vuBccSplat.h.

Referenced by glOnMouse(), and init().

float vuBccSplat::m_ViewScale [private]
 

The zoom magnification of the splatter.

Definition at line 70 of file vuBccSplat.h.

Referenced by glOnMouse(), and glResize().

int vuBccSplat::m_x [private]
 

The width of the window.

Definition at line 75 of file vuBccSplat.h.

Referenced by glOnMouse().

int vuBccSplat::m_y [private]
 

The height of the window.

Definition at line 77 of file vuBccSplat.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