VAPoR
3.0.0
|
A class for managing all visualizers. More...
#include <vizwinmgr.h>
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 () |
VizWin * | getActiveVizWin () |
Visualizer * | getActiveVisualizer () |
RegionEventRouter * | getRegionRouter () |
AnimationEventRouter * | getAnimationRouter () |
ViewpointEventRouter * | getViewpointRouter () |
VizWin * | getVizWin (int i) |
void | refreshViewpoint (ViewpointParams *vParams) |
void | refreshRegion (RegionParams *rParams) |
Static Public Member Functions | |
static void | InstallTab (const std::string tag, EventRouterCreateFcn fcn) |
static EventRouter * | getEventRouter (const std::string &tag) |
static void | UndoRedo (bool isUndo, int, Params *beforeP, Params *afterP, Params *aux1=0, Params *aux2=0) |
static VizWinMgr * | getInstance () |
Internal | |
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) |
A class for managing all visualizers.
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.
VAPoR::VizWinMgr::~VizWinMgr | ( | ) |
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.
[in] | visualizer | index |
visualizer | index |
|
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.
[in] | useViznum | specifies the visualizer number that is to be attached |
visualizer | index that was attached. |
|
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.
void VAPoR::VizWinMgr::createDefaultParams | ( | int | winnum | ) |
Create all the default params for a specific visualizer
[in] | winnum | Visualizer 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.
[in] | vars2D | vector of 2D variable names |
[in] | vars3D | vector of 3D variable names |
|
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.
[in] | Params* | pointer to Params instance that is associated with the rendering requested. |
[in] | bool | always indicates that rerender will occur even if the params is disabled. |
|
inline |
Obtain the VizWin object associated with the current active visualizer.
VizWin* | current active VizWin object |
Definition at line 125 of file vizwinmgr.h.
References VAPoR::ControlExec::GetActiveVizIndex(), and VAPoR::ControlExec::GetVisualizer().
|
inline |
Obtain the VizWin object associated with the current active visualizer.
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
AnimationEventRouter* |
|
static |
Static method obtains the EventRouter instance associated with a particular Params tag
[in] | const | std::string& Tag of the Params |
EventRouter* | pointer to the associated EventRouter instance |
Referenced by VAPoR::EventRouter::GetEventRouter(), and VAPoR::TabManager::getFrontEventRouter().
|
inlinestatic |
Obtain the (unique) VizWinMgr instance
VizWinMgr* |
Definition at line 159 of file vizwinmgr.h.
Referenced by VAPoR::TabManager::getFrontEventRouter().
int VAPoR::VizWinMgr::getNumVisualizers | ( | ) |
Determine the total number of visualizers.
number | of visualizers. |
RegionEventRouter* VAPoR::VizWinMgr::getRegionRouter | ( | ) |
Obtain the (unique) RegionEventRouter in the GUI
RegionEventRouter* |
ViewpointEventRouter* VAPoR::VizWinMgr::getViewpointRouter | ( | ) |
Obtain the (unique) ViewpointEventRouter in the GUI
ViewpointEventRouter* |
|
inline |
Obtain the VizWin associated with a visualizer index
[in] | visualizer | index |
VizWin* | associated VizWin object |
Definition at line 145 of file vizwinmgr.h.
|
slot |
Change viewpoint to the current home viewpoint.
|
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.
[in] | const | std::string tag : XML tag identifying the Params class. |
[in] | EventRouterCreateFcn | : the required method that creates the EventRouter. |
|
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()
visualizer | index |
void VAPoR::VizWinMgr::refreshRegion | ( | RegionParams * | rParams | ) |
Force re-render in all Visualizers that use a specific RegionParams instance
[in] | rParams | RegionParams 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
[in] | vParams | ViewpointParams 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
[in] | viznum | Visualizer 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
[in] | vp | ViewpointParams* |
void VAPoR::VizWinMgr::setActiveViz | ( | int | vizNum | ) |
Set a Visualizer to be the active (selected) Visualizer
[in] | vizNum | index of Visualizer to be activated. |
|
slot |
Set the current active Visualizer to use local or global Animation settings
[in] | val | is 0 for global, 1 for local. |
|
slot |
Set the current home viewpoint based on current viewpoint.
|
slot |
Set the current active Visualizer to use local or global Region settings
[in] | val | is 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.
|
slot |
Set the current active visualizer to use local or global viewpoint
[in] | val | is 0 for global, 1 for local. |
|
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()
void VAPoR::VizWinMgr::updateActiveParams | ( | ) |
Force all the EventRouters to update based on the state of the Params for the active window.
|
slot |
Move camera in or out to make entire volume visible.
|
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.
|
slot |
Respond to user request to activate a window: