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

vuBCCMarchingTetrahedra Class Reference

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

#include <vuBCCMarchingTetrahedra.h>

Inheritance diagram for vuBCCMarchingTetrahedra:

Inheritance graph
[legend]
Collaboration diagram for vuBCCMarchingTetrahedra:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuBCCMarchingTetrahedra ()
 Constructor.
 ~vuBCCMarchingTetrahedra ()
 Destructor.
bool init (const char *DataFile)
 Initializes the mc 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 (void)
 Initializes open gl for the mc utility.
void glRender (void)
 Calls on the mc class to render the volume.
void glResize (void)
 Resizes the gl viewport and renders the volume.
void glOnMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.

Private Member Functions

 DECLARE_EVENT_TABLE ()

Private Attributes

vu1512121m_Data
 The mc class 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 mc class.
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 21 of file vuBCCMarchingTetrahedra.h.


Constructor & Destructor Documentation

vuBCCMarchingTetrahedra::vuBCCMarchingTetrahedra  ) 
 

Constructor.

Definition at line 23 of file vuBCCMarchingTetrahedra.cpp.

vuBCCMarchingTetrahedra::~vuBCCMarchingTetrahedra  ) 
 

Destructor.

Definition at line 33 of file vuBCCMarchingTetrahedra.cpp.

References m_Data.


Member Function Documentation

vuBCCMarchingTetrahedra::DECLARE_EVENT_TABLE  )  [private]
 

void vuBCCMarchingTetrahedra::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 77 of file vuBCCMarchingTetrahedra.cpp.

void vuBCCMarchingTetrahedra::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 82 of file vuBCCMarchingTetrahedra.cpp.

vuCamera * vuBCCMarchingTetrahedra::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 93 of file vuBCCMarchingTetrahedra.cpp.

vuImage * vuBCCMarchingTetrahedra::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 87 of file vuBCCMarchingTetrahedra.cpp.

const char * vuBCCMarchingTetrahedra::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 42 of file vuBCCMarchingTetrahedra.cpp.

bool vuBCCMarchingTetrahedra::glInit void   )  [protected, virtual]
 

Initializes open gl for the mc utility.

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

Reimplemented from vuBasicUtility.

Definition at line 103 of file vuBCCMarchingTetrahedra.cpp.

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

Here is the call graph for this function:

void vuBCCMarchingTetrahedra::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 179 of file vuBCCMarchingTetrahedra.cpp.

References vu151212::decThreshold(), vuCamera::getPosition(), glResize(), vu151212::incThreshold(), m_Camera, m_Data, m_ViewScale, m_x, m_y, vuVector::norm(), vuGLCanvas::redraw(), vu1512121::render(), vuCamera::rotateAboutRight(), vuCamera::rotateAboutUp(), and vuCamera::translateXYZ().

Here is the call graph for this function:

void vuBCCMarchingTetrahedra::glRender void   )  [protected, virtual]
 

Calls on the mc class to render the volume.

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

Reimplemented from vuBasicUtility.

Definition at line 121 of file vuBCCMarchingTetrahedra.cpp.

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

Here is the call graph for this function:

void vuBCCMarchingTetrahedra::glResize void   )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 149 of file vuBCCMarchingTetrahedra.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 vuBCCMarchingTetrahedra::init const char *  DataFile  )  [virtual]
 

Initializes the mc utility.

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

Reimplemented from vuBasicUtility.

Definition at line 51 of file vuBCCMarchingTetrahedra.cpp.

References vu1::getErrorMessage(), m_Data, vu1512121::read(), and vu1::setFileName().

Here is the call graph for this function:


Member Data Documentation

vuCamera vuBCCMarchingTetrahedra::m_Camera [private]
 

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

Definition at line 68 of file vuBCCMarchingTetrahedra.h.

Referenced by glOnMouse(), and glRender().

vu1512121* vuBCCMarchingTetrahedra::m_Data [private]
 

The mc class owned by the utility.

Definition at line 66 of file vuBCCMarchingTetrahedra.h.

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

float vuBCCMarchingTetrahedra::m_ViewScale [private]
 

The zoom magnification of the mc class.

Definition at line 70 of file vuBCCMarchingTetrahedra.h.

Referenced by glOnMouse(), and glResize().

int vuBCCMarchingTetrahedra::m_x [private]
 

The width of the window.

Definition at line 74 of file vuBCCMarchingTetrahedra.h.

Referenced by glOnMouse().

int vuBCCMarchingTetrahedra::m_y [private]
 

The height of the window.

Definition at line 76 of file vuBCCMarchingTetrahedra.h.

Referenced by glOnMouse().


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