#include <vuBCCMarchingTetrahedra.h>
Inheritance diagram for vuBCCMarchingTetrahedra:
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 vuImage * | getCurrentImage () |
This function must return a pointer to the current vuImage buffer that the method can write to or read from. | |
virtual vuCamera * | getCamera () |
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 | |
vu1512121 * | m_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. |
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.
Definition at line 23 of file vuBCCMarchingTetrahedra.cpp. |
|
Destructor.
Definition at line 33 of file vuBCCMarchingTetrahedra.cpp. References m_Data. |
|
|
|
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. |
|
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. |
|
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. |
|
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. |
|
Returns the type of vu Datafile that the utility works with.
Reimplemented from vuBasicUtility. Definition at line 42 of file vuBCCMarchingTetrahedra.cpp. |
|
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:
|
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:
|
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:
|
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:
|
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:
|
A camera class for storing the user's current view.
Definition at line 68 of file vuBCCMarchingTetrahedra.h. Referenced by glOnMouse(), and glRender(). |
|
The mc class owned by the utility.
Definition at line 66 of file vuBCCMarchingTetrahedra.h. Referenced by glInit(), glOnMouse(), glRender(), glResize(), init(), and ~vuBCCMarchingTetrahedra(). |
|
The zoom magnification of the mc class.
Definition at line 70 of file vuBCCMarchingTetrahedra.h. Referenced by glOnMouse(), and glResize(). |
|
The width of the window.
Definition at line 74 of file vuBCCMarchingTetrahedra.h. Referenced by glOnMouse(). |
|
The height of the window.
Definition at line 76 of file vuBCCMarchingTetrahedra.h. Referenced by glOnMouse(). |