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

vuSphericBrowser< SIZE, TYPE > Class Template Reference

A utility template for browsing spherical lightfields. More...

#include <vuSphericBrowser.h>

Inheritance diagram for vuSphericBrowser< SIZE, TYPE >:

Inheritance graph
[legend]
Collaboration diagram for vuSphericBrowser< SIZE, TYPE >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuSphericBrowser ()
 Constructor.
 ~vuSphericBrowser ()
 Destructor.
virtual const char * _titleString ()
virtual bool init (const char *DataFile)
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 DrawFromImage ()
 This function must take the data vuImage buffer from the last call to getCurrent Image and draw that on the screen.
virtual void DrawAgain ()
 This function must rerender the scene completely.
wxString helpText ()
 return own help text
virtual void addRight (wxSizer *sizer)
 This method adds controls to the bottom of the window.
virtual void addBottom (wxSizer *sizer)
 This method adds controls to the bottom of the window.

Protected Types

enum  { idBROWSELIGHTFIELD, idIMAGESCALE, idIMAGESCALE2ONE }

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)
 Overridden to process any mouse events associated with the gl canvas.
void OnChar (wxKeyEvent &event)
 additional keyboard handler functionality
void OnBrowseViews (wxScrollEvent &event)
 event handler for the lightfield browser.
void OnScaleImage (wxScrollEvent &event)
 event handler for image scaler.
void OnScaleImage2One (wxScrollEvent &event)
 event handler for scale image to one button
void _updateIndexAndRefresh (dword idx)
 internal method for refreshing the content
void _updateScaleAndRefresh (int scale)
 internal method for refreshing the image scaling

Protected Attributes

vu1611_1< SIZE, TYPE > * m_Data
 The spectral raycaster owned by the utility.
wxSlider * m_ViewSlider
 Slider to select a view Calls the event handler OnBrowseViews().
wxSlider * m_ImageScale
wxStaticText * m_ViewsText

Detailed Description

template<int SIZE, class TYPE>
class vuSphericBrowser< SIZE, TYPE >

A utility template for browsing spherical lightfields.

Definition at line 10 of file vuSphericBrowser.h.


Member Enumeration Documentation

template<int SIZE, class TYPE>
anonymous enum [protected]
 

Enumeration values:
idBROWSELIGHTFIELD 
idIMAGESCALE 
idIMAGESCALE2ONE 

Definition at line 14 of file vuSphericBrowser.h.


Constructor & Destructor Documentation

template<int SIZE, class TYPE>
vuSphericBrowser< SIZE, TYPE >::vuSphericBrowser  ) 
 

Constructor.

Definition at line 6 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::m_Data.

template<int SIZE, class TYPE>
vuSphericBrowser< SIZE, TYPE >::~vuSphericBrowser  ) 
 

Destructor.

Definition at line 12 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::m_Data.


Member Function Documentation

template<int SIZE, class TYPE>
const char * vuSphericBrowser< SIZE, TYPE >::_titleString  )  [virtual]
 

Reimplemented in vuSphericFourierBrowser< SIZE, TYPE >, and vuSphericFourierBrowser< 2, float >.

Definition at line 21 of file vuSphericBrowser.cpp.

Referenced by vuSphericBrowser< SIZE, TYPE >::init().

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::_updateIndexAndRefresh dword  idx  )  [protected]
 

internal method for refreshing the content

Definition at line 264 of file vuSphericBrowser.cpp.

References BROWSER_MAX, vuSphericBrowser< SIZE, TYPE >::m_Data, vuSphericBrowser< SIZE, TYPE >::m_ViewSlider, and vuGLCanvas::redraw().

Referenced by vuSphericBrowser< SIZE, TYPE >::OnChar().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::_updateScaleAndRefresh int  scale  )  [protected]
 

internal method for refreshing the image scaling

Definition at line 272 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::m_ImageScale, and vuGLCanvas::redraw().

Referenced by vuSphericBrowser< SIZE, TYPE >::OnChar().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::addBottom wxSizer *  sizer  )  [virtual]
 

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 130 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::idIMAGESCALE, vuSphericBrowser< SIZE, TYPE >::idIMAGESCALE2ONE, and vuSphericBrowser< SIZE, TYPE >::m_ImageScale.

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::addRight wxSizer *  sizer  )  [virtual]
 

This method adds controls to the bottom of the window.

Reimplemented from vuBasicUtility.

Definition at line 111 of file vuSphericBrowser.cpp.

References BROWSER_MAX, vuSphericBrowser< SIZE, TYPE >::idBROWSELIGHTFIELD, vuSphericBrowser< SIZE, TYPE >::m_ViewSlider, and vuSphericBrowser< SIZE, TYPE >::m_ViewsText.

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::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 87 of file vuSphericBrowser.cpp.

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::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 vuSphericBrowser.cpp.

template<int SIZE, class TYPE>
vuCamera * vuSphericBrowser< SIZE, TYPE >::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 70 of file vuSphericBrowser.cpp.

template<int SIZE, class TYPE>
vuImage * vuSphericBrowser< SIZE, TYPE >::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 76 of file vuSphericBrowser.cpp.

template<int SIZE, class TYPE>
bool vuSphericBrowser< SIZE, TYPE >::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 158 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::m_Data.

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::glOnMouse wxMouseEvent &  ev  )  [protected, virtual]
 

Overridden to process any mouse events associated with the gl canvas.

These are mouse clicks and movements that originate within the gl canvas created by the vuBasicWindow. This method can implement tasks such as rotating the camera angle and such.

Reimplemented from vuBasicUtility.

Definition at line 192 of file vuSphericBrowser.cpp.

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::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 166 of file vuSphericBrowser.cpp.

References vuFixelMap< SIZE, TYPE >::glRender(), vuSphericBrowser< SIZE, TYPE >::m_Data, vuSphericBrowser< SIZE, TYPE >::m_ImageScale, and vuFixelMap< SIZE, TYPE >::scaleAndBias().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::glResize  )  [protected, virtual]
 

Resizes the gl viewport and renders the volume.

Reimplemented from vuBasicUtility.

Definition at line 185 of file vuSphericBrowser.cpp.

References vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), vuFixelMap< SIZE, TYPE >::glResize(), vuSphericBrowser< SIZE, TYPE >::m_Data, and vuGLCanvas::redraw().

Here is the call graph for this function:

template<int SIZE, class TYPE>
wxString vuSphericBrowser< SIZE, TYPE >::helpText  )  [virtual]
 

return own help text

Reimplemented from vuBasicUtility.

Definition at line 92 of file vuSphericBrowser.cpp.

template<int SIZE, class TYPE>
bool vuSphericBrowser< SIZE, TYPE >::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.

Reimplemented in vuSphericBrowser1B, vuSphericBrowser1F, vuSphericBrowser2F, vuSphericBrowser3B, vuSphericBrowser3F, and vuSphericFourierBrowser2F.

Definition at line 27 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::_titleString(), vuGLCanvas::getHeight(), vuGLCanvas::getWidth(), vuSphericBrowser< SIZE, TYPE >::m_Data, and vuSphericBrowser< SIZE, TYPE >::m_ViewsText.

Referenced by vuSphericFourierBrowser2F::init(), vuSphericBrowser3F::init(), vuSphericBrowser3B::init(), vuSphericBrowser2F::init(), vuSphericBrowser1F::init(), and vuSphericBrowser1B::init().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::OnBrowseViews wxScrollEvent &  event  )  [protected]
 

event handler for the lightfield browser.

Definition at line 233 of file vuSphericBrowser.cpp.

References dword, vuSphericBrowser< SIZE, TYPE >::m_Data, vuSphericBrowser< SIZE, TYPE >::m_ViewSlider, and vuGLCanvas::redraw().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::OnChar wxKeyEvent &  event  )  [protected, virtual]
 

additional keyboard handler functionality

Reimplemented from vuBasicUtility.

Definition at line 198 of file vuSphericBrowser.cpp.

References vuSphericBrowser< SIZE, TYPE >::_updateIndexAndRefresh(), vuSphericBrowser< SIZE, TYPE >::_updateScaleAndRefresh(), dword, vuSphericBrowser< SIZE, TYPE >::m_Data, vuSphericBrowser< SIZE, TYPE >::m_ImageScale, and vuBasicUtility::onKeyboardHelp().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::OnScaleImage wxScrollEvent &  event  )  [protected]
 

event handler for image scaler.

Definition at line 243 of file vuSphericBrowser.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:

template<int SIZE, class TYPE>
void vuSphericBrowser< SIZE, TYPE >::OnScaleImage2One wxScrollEvent &  event  )  [protected]
 

event handler for scale image to one button

Definition at line 250 of file vuSphericBrowser.cpp.

References vuGLCanvas::redraw().

Here is the call graph for this function:


Member Data Documentation

template<int SIZE, class TYPE>
vu1611_1<SIZE,TYPE>* vuSphericBrowser< SIZE, TYPE >::m_Data [protected]
 

The spectral raycaster owned by the utility.

Definition at line 94 of file vuSphericBrowser.h.

Referenced by vuSphericBrowser< SIZE, TYPE >::_updateIndexAndRefresh(), vuSphericBrowser< SIZE, TYPE >::glInit(), vuSphericBrowser< SIZE, TYPE >::glRender(), vuSphericBrowser< SIZE, TYPE >::glResize(), vuSphericBrowser< SIZE, TYPE >::init(), vuSphericBrowser< SIZE, TYPE >::OnBrowseViews(), vuSphericBrowser< SIZE, TYPE >::OnChar(), vuSphericBrowser< SIZE, TYPE >::vuSphericBrowser(), and vuSphericBrowser< SIZE, TYPE >::~vuSphericBrowser().

template<int SIZE, class TYPE>
wxSlider* vuSphericBrowser< SIZE, TYPE >::m_ImageScale [protected]
 

Definition at line 99 of file vuSphericBrowser.h.

Referenced by vuSphericBrowser< SIZE, TYPE >::_updateScaleAndRefresh(), vuSphericBrowser< SIZE, TYPE >::addBottom(), vuSphericBrowser< SIZE, TYPE >::glRender(), and vuSphericBrowser< SIZE, TYPE >::OnChar().

template<int SIZE, class TYPE>
wxSlider* vuSphericBrowser< SIZE, TYPE >::m_ViewSlider [protected]
 

Slider to select a view Calls the event handler OnBrowseViews().

Definition at line 98 of file vuSphericBrowser.h.

Referenced by vuSphericBrowser< SIZE, TYPE >::_updateIndexAndRefresh(), vuSphericBrowser< SIZE, TYPE >::addRight(), and vuSphericBrowser< SIZE, TYPE >::OnBrowseViews().

template<int SIZE, class TYPE>
wxStaticText* vuSphericBrowser< SIZE, TYPE >::m_ViewsText [protected]
 

Definition at line 102 of file vuSphericBrowser.h.

Referenced by vuSphericBrowser< SIZE, TYPE >::addRight(), and vuSphericBrowser< SIZE, TYPE >::init().


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