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

vuBCCShearWarp Class Reference

A utility window for shear-warp. More...

#include <vuBCCShearWarp.h>

Inheritance diagram for vuBCCShearWarp:

Inheritance graph
[legend]
Collaboration diagram for vuBCCShearWarp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuBCCShearWarp ()
 Constructor.
 ~vuBCCShearWarp ()
 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 vuCameragetCamera ()
 This function must return a pointer to the camera that is taking the picture of the scene.
virtual vuImagegetCurrentImage ()
 This function must return a pointer to the current vuImage buffer that the method can write to or read from.
virtual void addBottom (wxSizer *sizer)
 This method adds controls to the bottom of the window.
virtual void addLeft (wxSizer *sizer)
 This method adds controls to the left part 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 OnButtonTransferFunction (wxCommandEvent &event)
void OnButtonApplyViewing (wxCommandEvent &event)
void OnRadioBoxProjection (wxCommandEvent &event)
void OnCheckBoxSpecular (wxCommandEvent &event)
void OnScrollPerspective (wxCommandEvent &event)
void OnCheckBoxWarpOpenGL (wxCommandEvent &event)

Private Attributes

vu1512119m_Data
 The shear-warp owned by the utility.
wxTextCtrl * viewXTextCtrl
 Text-fields for X-, Y- and Z-Coordinates of the viewing vector.
wxTextCtrl * viewYTextCtrl
wxTextCtrl * viewZTextCtrl
wxTextCtrl * upXTextCtrl
 Text-fields for X-, Y- and Z-Coordinates of the up vector.
wxTextCtrl * upYTextCtrl
wxTextCtrl * upZTextCtrl
wxButton * applyViewingButton
 Button for applying the viewing settings.
wxCheckBox * fastClassCheckBox
 CheckBox for turning on/off fast classification.
wxCheckBox * specularCheckBox
 CheckBox for turning on/off specular light.
wxRadioBox * projectionRadioBox
 2 Radio Boxes for choosing beetween orthogonal and perspective projection
vuCamera m_Camera
 A camera class for storing the user's current view.
float m_ViewScale
 The zoom magnification of the shear-warp.
vuTFDesign m_TFunc
 The transfer function to be applied to the shear-warp.
wxSlider * m_LightColour
wxSlider * m_LightIntensity
int m_x
 The width of the window.
int m_y
 The height of the window.

Detailed Description

A utility window for shear-warp.

Derived from vuSplat Utility.

Definition at line 16 of file vuBCCShearWarp.h.


Constructor & Destructor Documentation

vuBCCShearWarp::vuBCCShearWarp  ) 
 

Constructor.

Definition at line 36 of file vuBCCShearWarp.cpp.

vuBCCShearWarp::~vuBCCShearWarp  ) 
 

Destructor.

Definition at line 45 of file vuBCCShearWarp.cpp.

References m_Data.


Member Function Documentation

void vuBCCShearWarp::addBottom wxSizer *  sizer  )  [virtual]
 

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 307 of file vuBCCShearWarp.cpp.

void vuBCCShearWarp::addLeft wxSizer *  sizer  )  [virtual]
 

This method adds controls to the left part of the window.

Reimplemented from vuBasicUtility.

Definition at line 171 of file vuBCCShearWarp.cpp.

References applyViewingButton, idAPPLYVIEWING, idPROJECTION, idSCROLL, idSPECULAR, idTRANSFERFUNCTION, idWARP_OPENGL, projectionRadioBox, specularCheckBox, upXTextCtrl, upYTextCtrl, upZTextCtrl, viewXTextCtrl, viewYTextCtrl, and viewZTextCtrl.

void vuBCCShearWarp::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 50 of file vuBCCShearWarp.cpp.

void vuBCCShearWarp::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 53 of file vuBCCShearWarp.cpp.

vuCamera * vuBCCShearWarp::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 56 of file vuBCCShearWarp.cpp.

vuImage * vuBCCShearWarp::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 60 of file vuBCCShearWarp.cpp.

const char * vuBCCShearWarp::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 67 of file vuBCCShearWarp.cpp.

bool vuBCCShearWarp::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 315 of file vuBCCShearWarp.cpp.

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

Referenced by glResize().

Here is the call graph for this function:

void vuBCCShearWarp::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 492 of file vuBCCShearWarp.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(), vu1512119::runlengthEncode(), vu151211::setTransferFunc(), vuCamera::translateXYZ(), and vu1512119::zoom().

Here is the call graph for this function:

void vuBCCShearWarp::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 333 of file vuBCCShearWarp.cpp.

References vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), m_Camera, m_Data, vu1512119::render(), and vu1512119::setViewVectors().

Here is the call graph for this function:

void vuBCCShearWarp::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 350 of file vuBCCShearWarp.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), glInit(), GLint, glViewport(), m_Data, and vu1512119::setCanvasSize().

Referenced by glOnMouse(), and init().

Here is the call graph for this function:

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

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

Reimplemented from vuBasicUtility.

Definition at line 75 of file vuBCCShearWarp.cpp.

References vuTFDesign::addOpacity(), buffer, vuTFDesign::generateFunction(), vu1512119::getDimensions(), vu1::getErrorMessage(), vu1::getFileName(), glResize(), m_Data, m_TFunc, vu1512119::read(), vuTFDesign::setColourSmoothing(), vu1::setFileName(), vuTFDesign::setOpacitySmoothing(), vu151211::setTransferFunc(), and vuBasicUtility::useOpenGL().

Here is the call graph for this function:

void vuBCCShearWarp::OnButtonApplyViewing wxCommandEvent &  event  )  [protected]
 

Definition at line 400 of file vuBCCShearWarp.cpp.

References vuVector::cross, vuCamera::getLookAtVector(), vuCamera::getRightVector(), vuCamera::getUpVector(), m_Camera, m_Data, vuVector::makeUnit(), vuGLCanvas::redraw(), vu1512119::render(), vuCamera::setLookAtVector(), vuCamera::setUpVector(), vu1512119::setViewVectors(), upXTextCtrl, upYTextCtrl, upZTextCtrl, viewXTextCtrl, viewYTextCtrl, and viewZTextCtrl.

Here is the call graph for this function:

void vuBCCShearWarp::OnButtonTransferFunction wxCommandEvent &  event  )  [protected]
 

Definition at line 464 of file vuBCCShearWarp.cpp.

References vuTransferDialog::getTransferFunc(), m_Data, m_TFunc, vuGLCanvas::redraw(), vu1512119::render(), vu1512119::runlengthEncode(), and vu151211::setTransferFunc().

Here is the call graph for this function:

void vuBCCShearWarp::OnCheckBoxSpecular wxCommandEvent &  event  )  [protected]
 

Definition at line 388 of file vuBCCShearWarp.cpp.

References m_Data, and vu1512119::setSpecular().

Here is the call graph for this function:

void vuBCCShearWarp::OnCheckBoxWarpOpenGL wxCommandEvent &  event  )  [protected]
 

Definition at line 362 of file vuBCCShearWarp.cpp.

References m_Data, and vu1512119::setOrthogonalWarpOpenGL().

Here is the call graph for this function:

void vuBCCShearWarp::OnRadioBoxProjection wxCommandEvent &  event  )  [protected]
 

Definition at line 482 of file vuBCCShearWarp.cpp.

References m_Data, vuGLCanvas::redraw(), vu1512119::render(), and vu1512119::setViewing().

Here is the call graph for this function:

void vuBCCShearWarp::OnScrollPerspective wxCommandEvent &  event  )  [protected]
 

Definition at line 375 of file vuBCCShearWarp.cpp.

References vu1512119::getMaxSize(), vu1512119::getMinEyeDistance(), m_Data, vuGLCanvas::redraw(), vu1512119::render(), and vu1512119::setEyeDistance().

Here is the call graph for this function:


Member Data Documentation

wxButton* vuBCCShearWarp::applyViewingButton [private]
 

Button for applying the viewing settings.

Definition at line 87 of file vuBCCShearWarp.h.

Referenced by addLeft().

wxCheckBox* vuBCCShearWarp::fastClassCheckBox [private]
 

CheckBox for turning on/off fast classification.

Definition at line 89 of file vuBCCShearWarp.h.

vuCamera vuBCCShearWarp::m_Camera [private]
 

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

Definition at line 95 of file vuBCCShearWarp.h.

Referenced by glOnMouse(), glRender(), and OnButtonApplyViewing().

vu1512119* vuBCCShearWarp::m_Data [private]
 

The shear-warp owned by the utility.

Definition at line 77 of file vuBCCShearWarp.h.

Referenced by glInit(), glOnMouse(), glRender(), glResize(), init(), OnButtonApplyViewing(), OnButtonTransferFunction(), OnCheckBoxSpecular(), OnCheckBoxWarpOpenGL(), OnRadioBoxProjection(), OnScrollPerspective(), and ~vuBCCShearWarp().

wxSlider* vuBCCShearWarp::m_LightColour [private]
 

Definition at line 101 of file vuBCCShearWarp.h.

wxSlider * vuBCCShearWarp::m_LightIntensity [private]
 

Definition at line 101 of file vuBCCShearWarp.h.

vuTFDesign vuBCCShearWarp::m_TFunc [private]
 

The transfer function to be applied to the shear-warp.

Reimplemented from vuBasicUtility.

Definition at line 99 of file vuBCCShearWarp.h.

Referenced by glOnMouse(), init(), and OnButtonTransferFunction().

float vuBCCShearWarp::m_ViewScale [private]
 

The zoom magnification of the shear-warp.

Definition at line 97 of file vuBCCShearWarp.h.

Referenced by glOnMouse().

int vuBCCShearWarp::m_x [private]
 

The width of the window.

Definition at line 104 of file vuBCCShearWarp.h.

Referenced by glOnMouse().

int vuBCCShearWarp::m_y [private]
 

The height of the window.

Definition at line 106 of file vuBCCShearWarp.h.

Referenced by glOnMouse().

wxRadioBox* vuBCCShearWarp::projectionRadioBox [private]
 

2 Radio Boxes for choosing beetween orthogonal and perspective projection

Definition at line 93 of file vuBCCShearWarp.h.

Referenced by addLeft().

wxCheckBox* vuBCCShearWarp::specularCheckBox [private]
 

CheckBox for turning on/off specular light.

Definition at line 91 of file vuBCCShearWarp.h.

Referenced by addLeft().

wxTextCtrl* vuBCCShearWarp::upXTextCtrl [private]
 

Text-fields for X-, Y- and Z-Coordinates of the up vector.

Definition at line 83 of file vuBCCShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuBCCShearWarp::upYTextCtrl [private]
 

Definition at line 84 of file vuBCCShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuBCCShearWarp::upZTextCtrl [private]
 

Definition at line 85 of file vuBCCShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuBCCShearWarp::viewXTextCtrl [private]
 

Text-fields for X-, Y- and Z-Coordinates of the viewing vector.

Definition at line 79 of file vuBCCShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuBCCShearWarp::viewYTextCtrl [private]
 

Definition at line 80 of file vuBCCShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().

wxTextCtrl* vuBCCShearWarp::viewZTextCtrl [private]
 

Definition at line 81 of file vuBCCShearWarp.h.

Referenced by addLeft(), and OnButtonApplyViewing().


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