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

vuBCCFirstHitRaycaster Class Reference

A utility window for raycasting with a spectral colour model. More...

#include <vuBCCFirstHitRaycaster.h>

Inheritance diagram for vuBCCFirstHitRaycaster:

Inheritance graph
[legend]
Collaboration diagram for vuBCCFirstHitRaycaster:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuBCCFirstHitRaycaster ()
 Constructor.
 ~vuBCCFirstHitRaycaster ()
 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 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.
virtual void addBottom (wxSizer *sizer)
 This method adds controls to the bottom 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 onRender ()
void glResize ()
 Resizes the gl viewport and renders the volume.
void onMouse (wxMouseEvent &ev)
 Handles mouse commands from the user.
void OnLightChangeIntensity (wxScrollEvent &event)
void OnLightChangeColour (wxScrollEvent &event)
void OnButtonRender (wxCommandEvent &event)
vu1getVolume ()
 Returns a pointer to the volume object. (usually m_Data).

Private Attributes

vu1512122m_Data
 The spectral raycaster owned by the utility.
float m_ViewScale
 The zoom magnification of the splatter.
vuTFDesign m_TFunc
 The transfer function to be applied to the splatter.
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 raycasting with a spectral colour model.

Derived from vuSplat Utility.

Definition at line 18 of file vuBCCFirstHitRaycaster.h.


Constructor & Destructor Documentation

vuBCCFirstHitRaycaster::vuBCCFirstHitRaycaster  ) 
 

Constructor.

Definition at line 28 of file vuBCCFirstHitRaycaster.cpp.

vuBCCFirstHitRaycaster::~vuBCCFirstHitRaycaster  ) 
 

Destructor.

Definition at line 38 of file vuBCCFirstHitRaycaster.cpp.

References m_Data.


Member Function Documentation

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

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 110 of file vuBCCFirstHitRaycaster.cpp.

References idLGTCOL, idLGTINT, idRENDER, m_LightColour, and m_LightIntensity.

void vuBCCFirstHitRaycaster::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 84 of file vuBCCFirstHitRaycaster.cpp.

References m_Data, vuGLCanvas::redraw(), and vu1512122::refresh.

Here is the call graph for this function:

void vuBCCFirstHitRaycaster::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 91 of file vuBCCFirstHitRaycaster.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

vuCamera * vuBCCFirstHitRaycaster::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 101 of file vuBCCFirstHitRaycaster.cpp.

References vu1::getCameraPtr(), and m_Data.

Here is the call graph for this function:

vuImage * vuBCCFirstHitRaycaster::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 96 of file vuBCCFirstHitRaycaster.cpp.

References vu1512122::getImage(), and m_Data.

Here is the call graph for this function:

const char * vuBCCFirstHitRaycaster::getFileType  )  [static]
 

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

Reimplemented from vuBasicUtility.

Definition at line 47 of file vuBCCFirstHitRaycaster.cpp.

vu1* vuBCCFirstHitRaycaster::getVolume  )  [inline, protected, virtual]
 

Returns a pointer to the volume object. (usually m_Data).

Reimplemented from vuBasicUtility.

Definition at line 68 of file vuBCCFirstHitRaycaster.h.

bool vuBCCFirstHitRaycaster::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 176 of file vuBCCFirstHitRaycaster.cpp.

References vu1512122::initOpenGL(), and m_Data.

Here is the call graph for this function:

void vuBCCFirstHitRaycaster::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 219 of file vuBCCFirstHitRaycaster.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), GLint, glViewport(), m_Data, and vu1512122::setImageSize().

Here is the call graph for this function:

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

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

Reimplemented from vuBasicUtility.

Definition at line 56 of file vuBCCFirstHitRaycaster.cpp.

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

Here is the call graph for this function:

void vuBCCFirstHitRaycaster::OnButtonRender wxCommandEvent &  event  )  [protected]
 

Definition at line 164 of file vuBCCFirstHitRaycaster.cpp.

References m_Data, vuGLCanvas::redraw(), vu1512122::refresh, and vu1::setIsReRendering().

Here is the call graph for this function:

void vuBCCFirstHitRaycaster::OnLightChangeColour wxScrollEvent &  event  )  [protected]
 

Definition at line 155 of file vuBCCFirstHitRaycaster.cpp.

void vuBCCFirstHitRaycaster::OnLightChangeIntensity wxScrollEvent &  event  )  [protected]
 

Definition at line 146 of file vuBCCFirstHitRaycaster.cpp.

void vuBCCFirstHitRaycaster::onMouse 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 252 of file vuBCCFirstHitRaycaster.cpp.

void vuBCCFirstHitRaycaster::onRender  )  [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 196 of file vuBCCFirstHitRaycaster.cpp.

References vu1::getCamera(), vuCamera::getHeight(), vuCamera::getWidth(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, glClear(), glLoadIdentity(), glMatrixMode(), glOrtho(), m_Data, and vu1512122::render().

Here is the call graph for this function:


Member Data Documentation

vu1512122* vuBCCFirstHitRaycaster::m_Data [private]
 

The spectral raycaster owned by the utility.

Definition at line 72 of file vuBCCFirstHitRaycaster.h.

Referenced by DrawAgain(), getCamera(), getCurrentImage(), glInit(), glResize(), init(), OnButtonRender(), onRender(), and ~vuBCCFirstHitRaycaster().

wxSlider* vuBCCFirstHitRaycaster::m_LightColour [private]
 

Definition at line 78 of file vuBCCFirstHitRaycaster.h.

Referenced by addBottom().

wxSlider * vuBCCFirstHitRaycaster::m_LightIntensity [private]
 

Definition at line 78 of file vuBCCFirstHitRaycaster.h.

Referenced by addBottom().

vuTFDesign vuBCCFirstHitRaycaster::m_TFunc [private]
 

The transfer function to be applied to the splatter.

Reimplemented from vuBasicUtility.

Definition at line 76 of file vuBCCFirstHitRaycaster.h.

float vuBCCFirstHitRaycaster::m_ViewScale [private]
 

The zoom magnification of the splatter.

Definition at line 74 of file vuBCCFirstHitRaycaster.h.

int vuBCCFirstHitRaycaster::m_x [private]
 

The width of the window.

Definition at line 81 of file vuBCCFirstHitRaycaster.h.

int vuBCCFirstHitRaycaster::m_y [private]
 

The height of the window.

Definition at line 83 of file vuBCCFirstHitRaycaster.h.


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