VAPoR  3.0.0
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::VizWinMgr Class Reference

A class for managing all visualizers. More...

#include <vizwinmgr.h>

Inheritance diagram for VAPoR::VizWinMgr:

Public Member Functions

void forceRender (Params *p, bool always=false)
 
void SetToDefaults ()
 Reset the GUI to its default state, either due to New Session, or in preparation for loading a session file. More...
 
int getNumVisualizers ()
 
VizWingetActiveVizWin ()
 
VisualizergetActiveVisualizer ()
 
RegionEventRouter * getRegionRouter ()
 
AnimationEventRouter * getAnimationRouter ()
 
ViewpointEventRouter * getViewpointRouter ()
 
VizWingetVizWin (int i)
 
void refreshViewpoint (ViewpointParams *vParams)
 
void refreshRegion (RegionParams *rParams)
 

Static Public Member Functions

static void InstallTab (const std::string tag, EventRouterCreateFcn fcn)
 
static EventRoutergetEventRouter (const std::string &tag)
 
static void UndoRedo (bool isUndo, int, Params *beforeP, Params *afterP, Params *aux1=0, Params *aux2=0)
 
static VizWinMgrgetInstance ()
 

Internal

Internal methods not intended for general use

void createAllDefaultTabs ()
 
void vizAboutToDisappear (int i)
 
int launchVisualizer ()
 
int addVisualizer (int viznum)
 
void removeVisualizer (int viznum)
 
int attachVisualizer (int useViznum)
 
void setActiveViz (int vizNum)
 
void updateActiveParams ()
 
void createDefaultParams (int winnum)
 
void refreshRenderData ()
 
void disableRenderers (const vector< string > &vars2D, const vector< string > &vars3D)
 
void disableAllRenderers ()
 Disable all enabled renderers. More...
 
void resetViews (ViewpointParams *vp)
 
void resetTrackball ()
 Reset the trackball for a new dataset. More...
 
 ~VizWinMgr ()
 
void cascade ()
 Arrange the Visualizers in a cascading sequence. More...
 
void fitSpace ()
 Arrange the visualizers to tile the available space. More...
 
void home ()
 Change viewpoint to the current home viewpoint. More...
 
void sethome ()
 Set the current home viewpoint based on current viewpoint. More...
 
void winActivated (int)
 Respond to user request to activate a window: More...
 
void killViz (int viznum)
 Close the VizWin associated with a Visualizer index. More...
 
void viewAll ()
 Move camera in or out to make entire volume visible. More...
 
void viewRegion ()
 Move camera in or out to make current region visible. More...
 
void alignView (int axis)
 
void setVpLocalGlobal (int val)
 
void setRgLocalGlobal (int val)
 
void setAnimationLocalGlobal (int val)
 

Detailed Description

A class for managing all visualizers.

Author
Alan Norton
Version
3.0
Date
October 2013

This class manages the VAPOR visualizers in the GUI. It provides various methods relating the active visualizers and the corresponding EventRouter and Params classes. Methods are also provided for setting up the Qt OpenGL context of a QGLWidget and associating the corresponding Visualizer instance.

Definition at line 69 of file vizwinmgr.h.

Constructor & Destructor Documentation

VAPoR::VizWinMgr::~VizWinMgr ( )

Member Function Documentation

int VAPoR::VizWinMgr::addVisualizer ( int  viznum)

Method that sets up a particular visualizer when the visualizer index and Visualizer index is already known, as when performing Undo of visualizer destruction.

Parameters
[in]visualizerindex
Return values
visualizerindex
void VAPoR::VizWinMgr::alignView ( int  axis)
slot

Align the camera to a specified axis param[in] axis 1,2, or 3.

int VAPoR::VizWinMgr::attachVisualizer ( int  useViznum)

method to launch a viz window, when the associated params already exist, associated with a specified visualizer. Useful when a new session is opened.

Parameters
[in]useViznumspecifies the visualizer number that is to be attached
Return values
visualizerindex that was attached.
void VAPoR::VizWinMgr::cascade ( )
slot

Arrange the Visualizers in a cascading sequence.

void VAPoR::VizWinMgr::createAllDefaultTabs ( )

Method setting up the tabs in their default state. This is invoked once at the time vaporgui is started. This method includes a line for each built-in tab.

Note
To install extension tabs, users must insert a line in the method VAPoR::InstallExtensionTabs() in the file "ExtensionGuis.h"
void VAPoR::VizWinMgr::createDefaultParams ( int  winnum)

Create all the default params for a specific visualizer

Parameters
[in]winnumVisualizer index
void VAPoR::VizWinMgr::disableAllRenderers ( )

Disable all enabled renderers.

void VAPoR::VizWinMgr::disableRenderers ( const vector< string > &  vars2D,
const vector< string > &  vars3D 
)

Disable all renderers that use a specified set of variables. Useful for example when a Python script is updated.

Parameters
[in]vars2Dvector of 2D variable names
[in]vars3Dvector of 3D variable names
void VAPoR::VizWinMgr::fitSpace ( )
slot

Arrange the visualizers to tile the available space.

void VAPoR::VizWinMgr::forceRender ( Params p,
bool  always = false 
)

If the params indicated is null or a shared non-render params, all visualizer windows are refreshed. If it's a RenderParams, this causes a re-rendering for the renderer associated with that particular RenderParams instance. The renderer must be enabled or this will have no effect unless the optional 'always' parameter is true. If it is a local (non-shared) non-render params then only the single associated visualizer is updated.

Parameters
[in]Params*pointer to Params instance that is associated with the rendering requested.
[in]boolalways indicates that rerender will occur even if the params is disabled.
Visualizer* VAPoR::VizWinMgr::getActiveVisualizer ( )
inline

Obtain the VizWin object associated with the current active visualizer.

Return values
VizWin*current active VizWin object

Definition at line 125 of file vizwinmgr.h.

References VAPoR::ControlExec::GetActiveVizIndex(), and VAPoR::ControlExec::GetVisualizer().

VizWin* VAPoR::VizWinMgr::getActiveVizWin ( )
inline

Obtain the VizWin object associated with the current active visualizer.

Return values
VizWin*current active VizWin object

Definition at line 113 of file vizwinmgr.h.

References VAPoR::ControlExec::GetActiveVizIndex().

AnimationEventRouter* VAPoR::VizWinMgr::getAnimationRouter ( )

Obtain the (unique) AnimationEventRouter in the GUI

Return values
AnimationEventRouter*
static EventRouter* VAPoR::VizWinMgr::getEventRouter ( const std::string &  tag)
static

Static method obtains the EventRouter instance associated with a particular Params tag

Parameters
[in]conststd::string& Tag of the Params
Return values
EventRouter*pointer to the associated EventRouter instance

Referenced by VAPoR::EventRouter::GetEventRouter(), and VAPoR::TabManager::getFrontEventRouter().

static VizWinMgr* VAPoR::VizWinMgr::getInstance ( )
inlinestatic

Obtain the (unique) VizWinMgr instance

Return values
VizWinMgr*

Definition at line 159 of file vizwinmgr.h.

Referenced by VAPoR::TabManager::getFrontEventRouter().

int VAPoR::VizWinMgr::getNumVisualizers ( )

Determine the total number of visualizers.

Return values
numberof visualizers.
RegionEventRouter* VAPoR::VizWinMgr::getRegionRouter ( )

Obtain the (unique) RegionEventRouter in the GUI

Return values
RegionEventRouter*
ViewpointEventRouter* VAPoR::VizWinMgr::getViewpointRouter ( )

Obtain the (unique) ViewpointEventRouter in the GUI

Return values
ViewpointEventRouter*
VizWin* VAPoR::VizWinMgr::getVizWin ( int  i)
inline

Obtain the VizWin associated with a visualizer index

Parameters
[in]visualizerindex
Return values
VizWin*associated VizWin object

Definition at line 145 of file vizwinmgr.h.

void VAPoR::VizWinMgr::home ( )
slot

Change viewpoint to the current home viewpoint.

static void VAPoR::VizWinMgr::InstallTab ( const std::string  tag,
EventRouterCreateFcn  fcn 
)
static

Static method that creates an eventRouter, and installs it as one of the tabs. All extension EventRouter classes must call this during the InstallExtensions() method.

Parameters
[in]conststd::string tag : XML tag identifying the Params class.
[in]EventRouterCreateFcn: the required method that creates the EventRouter.
void VAPoR::VizWinMgr::killViz ( int  viznum)
slot

Close the VizWin associated with a Visualizer index.

int VAPoR::VizWinMgr::launchVisualizer ( )

Method launches a new visualizer, sets up appropriate Params etc. It returns the visualizer index as returned by ControlExec::NewVisualizer()

Return values
visualizerindex
void VAPoR::VizWinMgr::refreshRegion ( RegionParams rParams)

Force re-render in all Visualizers that use a specific RegionParams instance

Parameters
[in]rParamsRegionParams instance
void VAPoR::VizWinMgr::refreshRenderData ( )

Force all renderers to re-obtain their data, for example when a new session is opened.

void VAPoR::VizWinMgr::refreshViewpoint ( ViewpointParams vParams)

Force re-render in all Visualizers that use a specific ViewpointParams instance

Parameters
[in]vParamsViewpointParams instance
void VAPoR::VizWinMgr::removeVisualizer ( int  viznum)

Method to delete a visualizer under program control, e.g. if the user performs Undo after creating a visualizer

Parameters
[in]viznumVisualizer index.
void VAPoR::VizWinMgr::resetTrackball ( )

Reset the trackball for a new dataset.

void VAPoR::VizWinMgr::resetViews ( ViewpointParams vp)

Reset the near/far distances for all the windows that share a viewpoint

Parameters
[in]vpViewpointParams*
void VAPoR::VizWinMgr::setActiveViz ( int  vizNum)

Set a Visualizer to be the active (selected) Visualizer

Parameters
[in]vizNumindex of Visualizer to be activated.
void VAPoR::VizWinMgr::setAnimationLocalGlobal ( int  val)
slot

Set the current active Visualizer to use local or global Animation settings

Parameters
[in]valis 0 for global, 1 for local.
void VAPoR::VizWinMgr::sethome ( )
slot

Set the current home viewpoint based on current viewpoint.

void VAPoR::VizWinMgr::setRgLocalGlobal ( int  val)
slot

Set the current active Visualizer to use local or global Region settings

Parameters
[in]valis 0 for global, 1 for local.
void VAPoR::VizWinMgr::SetToDefaults ( )

Reset the GUI to its default state, either due to New Session, or in preparation for loading a session file.

void VAPoR::VizWinMgr::setVpLocalGlobal ( int  val)
slot

Set the current active visualizer to use local or global viewpoint

Parameters
[in]valis 0 for global, 1 for local.
static void VAPoR::VizWinMgr::UndoRedo ( bool  isUndo,
int  ,
Params beforeP,
Params afterP,
Params aux1 = 0,
Params aux2 = 0 
)
static

Static helper method invoked during Undo and Redo visualizer creation and destruction, as well setting the current viz window. This function must be passed in Command::CaptureStart()

See also
UndoRedoHelpCB_T
Parameters
[in]isUndoindicates whether an Undo or Redo is being performed
[in]instanceis not used here
[in]beforePis a copy of the VizWinParams* at the start of the Command
[in]afterPis a copy of the VizWinParams* at the end of the Command
void VAPoR::VizWinMgr::updateActiveParams ( )

Force all the EventRouters to update based on the state of the Params for the active window.

void VAPoR::VizWinMgr::viewAll ( )
slot

Move camera in or out to make entire volume visible.

void VAPoR::VizWinMgr::viewRegion ( )
slot

Move camera in or out to make current region visible.

void VAPoR::VizWinMgr::vizAboutToDisappear ( int  i)

Method that responds to user destruction of a visualizer. Relevant params, renderers, etc. are removed.

void VAPoR::VizWinMgr::winActivated ( int  )
slot

Respond to user request to activate a window:


The documentation for this class was generated from the following file: