30 #include "twoDdataparams.h"
31 #include "twoDimageparams.h"
34 #include "probeparams.h"
35 #include "flowparams.h"
36 #include "isolineparams.h"
38 #include "dvrparams.h"
40 #include <vapor/common.h>
46 class AnimationController;
47 class AnimationParams;
52 class ViewpointParams;
57 class TwoDImageParams;
60 class AnimationEventRouter;
61 class RegionEventRouter;
63 class ProbeEventRouter;
64 class TwoDDataEventRouter;
65 class TwoDImageEventRouter;
66 class ViewpointEventRouter;
67 class FlowEventRouter;
210 static int RegisterMouseMode(
const std::string paramsTag,
int manipType,
const char* name,
const char*
const xpmIcon[]=0);
212 #ifndef DOXYGEN_SKIP_THIS
220 static DvrParams* getActiveDvrParams(){
223 static IsolineParams* getActiveIsolineParams(){
225 static ProbeParams* getActiveProbeParams(){
227 static TwoDDataParams* getActiveTwoDDataParams(){
229 static TwoDImageParams* getActiveTwoDImageParams(){
231 static RegionParams* getActiveRegionParams(){
232 return (getInstance()->getRegionParams(getInstance()->activeViz));
234 static FlowParams* getActiveFlowParams(){
236 static ViewpointParams* getActiveVPParams(){
237 return (getInstance()->getViewpointParams(getInstance()->activeViz));
239 static AnimationParams* getActiveAnimationParams(){
240 return (getInstance()->getAnimationParams(getInstance()->activeViz));
242 void forceFidelityUpdate();
243 void createAllDefaultParams();
244 void RegisterMouseModes();
248 void vizAboutToDisappear(
int i);
253 void minimize(
int i) {
257 void maximize(
int i) {
262 void normalize(
int i) {
271 int launchVisualizer(
int usenum = -1,
const char* name =
"",
int newNum = -1);
273 void nameChanged(QString& name,
int num);
275 int getNumVisualizers();
276 TabManager* getTabManager() {
return tabManager;}
279 int getActiveViz() {
return activeViz;}
280 VizWin* getActiveVisualizer() {
281 if(activeViz>=0)
return vizWin[activeViz];
285 void setActiveViz(
int vizNum);
287 ViewpointParams* getViewpointParams(
int winNum);
288 RegionParams* getRegionParams(
int winNum);
292 Params* getIsoParams(
int winnum,
int instance = -1){
295 Params* getDvrParams(
int winnum,
int instance = -1){
298 ProbeParams* getProbeParams(
int winNum,
int instance = -1);
299 IsolineParams* getIsolineParams(
int winNum,
int instance = -1);
300 TwoDDataParams* getTwoDDataParams(
int winNum,
int instance = -1);
301 TwoDImageParams* getTwoDImageParams(
int winNum,
int instance = -1);
307 int getNumDvrInstances(
int winnum){
310 int getNumIsoInstances(
int winnum){
316 void appendInstance(
int winnum, Params* p);
318 void insertInstance(
int winnum,
int posn, Params* p);
322 FlowParams* getFlowParams(
int winNum,
int instance = -1);
323 AnimationParams* getAnimationParams(
int winNum);
325 RegionEventRouter* getRegionRouter();
326 AnimationEventRouter* getAnimationRouter();
327 ProbeEventRouter* getProbeRouter();
328 TwoDDataEventRouter* getTwoDDataRouter();
329 TwoDImageEventRouter* getTwoDImageRouter();
330 ViewpointEventRouter* getViewpointRouter();
331 FlowEventRouter* getFlowRouter();
335 void updateActiveParams();
338 VizWin* getVizWin(
int i) {
return vizWin[i];}
341 void setVizWinName(
int winNum, QString& qs);
342 QString& getVizWinName(
int winNum) {
return vizName[winNum];}
343 bool isMinimized(
int winNum) {
return isMin[winNum];}
344 bool isMaximized(
int winNum) {
return isMax[winNum];}
351 void createDefaultParams(
int winnum);
352 Params* getCorrespondingLocalParams(Params* p) {
353 return getLocalParams(p->GetParamsBaseTypeId());
356 void setSelectionMode(
int mode);
358 ViewpointParams* getRealVPParams(
int win) {
359 if (!vizWin[win])
return 0;
361 if (p->isLocal())
return (ViewpointParams*)p;
364 Trackball* getGlobalTrackball() {
return globalTrackball;}
367 void refreshRenderData();
370 void disableRenderers(
const vector<string>& vars2D,
const vector<string>& vars3D);
372 void disableAllRenderers();
386 void refreshFlow(FlowParams*);
387 void refreshViewpoint(ViewpointParams* vParams);
388 void refreshRegion(RegionParams* rParams);
389 void refreshProbe(ProbeParams* pParams);
390 void refreshIsoline(IsolineParams* pParams);
391 void refreshTwoDData(TwoDDataParams* pParams);
392 void refreshTwoDImage(TwoDImageParams* pParams);
396 void setClutDirty(RenderParams* p);
404 void setDatarangeDirty(RenderParams* p);
405 void setFlowGraphicsDirty(FlowParams* p);
406 void setFlowDataDirty(FlowParams* p,
bool doInterrupt =
true);
407 void setFlowDisplayListDirty(FlowParams* p);
408 bool flowDataIsDirty(FlowParams* p);
411 void setAllTwoDElevDirty();
415 void animationParamsChanged(AnimationParams* );
419 void resetViews(ViewpointParams* vp);
422 void setViewerCoordsChanged(ViewpointParams* vp);
425 void startPlay(AnimationParams* aParams);
430 void reinitializeParams(
bool doOverride);
434 void reinitializeVariables();
437 void restartParams();
443 ParamNode* buildNode();
447 static const string _visualizersTag;
451 void setInteractiveNavigating(
int level);
452 bool findCoincident2DSurface(
int vizwin,
float coordinate, TwoDParams *tParams);
453 void stopFlowIntegration();
467 void winActivated(
int);
468 void killViz(
int viznum);
472 void alignView(
int axis);
475 void setVpLocalGlobal(
int val);
476 void setRgLocalGlobal(
int val);
477 void setAnimationLocalGlobal(
int val);
482 void enableMultiViz(
bool onOff);
484 void newViz(QString&,
int);
486 void activateViz(
int);
487 void changeName(QString&,
int);
491 static const string _vizUseLatLonAttr;
492 static const string _vizTimeAnnotColorAttr;
493 static const string _vizTimeAnnotTextSizeAttr;
494 static const string _vizTimeAnnotTypeAttr;
495 static const string _vizTimeAnnotCoordsAttr;
496 static const string _vizElevGridEnabledAttr;
497 static const string _vizElevGridColorAttr;
498 static const string _vizElevGridRefinementAttr;
499 static const string _vizWinTag;
500 static const string _vizWinNameAttr;
501 static const string _vizBgColorAttr;
502 static const string _vizRegionColorAttr;
503 static const string _vizSubregionColorAttr;
504 static const string _vizColorbarBackgroundColorAttr;
505 static const string _vizAxisPositionAttr;
506 static const string _vizAxisOriginAttr;
507 static const string _vizAxisAnnotationEnabledAttr;
508 static const string _vizMinTicAttr;
509 static const string _vizMaxTicAttr;
510 static const string _vizTicLengthAttr;
511 static const string _vizTicDirAttr;
512 static const string _vizNumTicsAttr;
513 static const string _vizAxisColorAttr;
514 static const string _vizTicWidthAttr;
515 static const string _vizLabelHeightAttr;
516 static const string _vizLabelDigitsAttr;
517 static const string _vizColorbarDigitsAttr;
518 static const string _vizColorbarFontsizeAttr;
519 static const string _vizColorbarLLPositionAttr;
520 static const string _vizColorbarURPositionAttr;
521 static const string _vizColorbarSizeAttr;
522 static const string _vizColorbarLLXTag;
523 static const string _vizColorbarLLYTag;
524 static const string _vizColorbarTitlesTag;
525 static const string _vizColorbarNumTicsAttr;
526 static const string _vizAxisArrowsEnabledAttr;
527 static const string _vizColorbarEnabledAttr;
528 static const string _vizColorbarEnabledTag;
529 static const string _vizColorbarParamsNameAttr;
530 static const string _vizRegionFrameEnabledAttr;
531 static const string _vizSubregionFrameEnabledAttr;
532 static const string _visualizerNumAttr;
533 static const string _vizElevGridDisplacementAttr;
534 static const string _vizElevGridInvertedAttr;
535 static const string _vizElevGridRotationAttr;
536 static const string _vizElevGridTexturedAttr;
537 static const string _vizElevGridTextureNameAttr;
540 RegionParams* getRealRegionParams(
int win) {
541 if (!vizWin[win])
return 0;
543 if (p->isLocal())
return (RegionParams*)p;
546 AnimationParams* getRealAnimationParams(
int win) {
547 if (!vizWin[win])
return 0;
549 if (p->isLocal())
return (AnimationParams*)p;
552 ViewpointParams* getGlobalVPParams(){
return (ViewpointParams*)(
Params::GetDefaultParams(Params::_viewpointParamsTag));}
553 RegionParams* getGlobalRegionParams(){
556 AnimationParams* getGlobalAnimationParams(){
return (AnimationParams*)(
Params::GetDefaultParams(Params::_animationParamsTag));}
559 static std::map<ParamsBase::ParamsBaseType, EventRouter*> eventRouterMap;
567 static VizWinMgr* theVizWinMgr;
581 int mx = -1;
int mj = -1;
583 if (vizWin[j] && activationOrder[j]>mx){
584 mx = activationOrder[j];
590 Trackball* globalTrackball;
594 MainForm* myMainWindow;
595 static TabManager* tabManager;
598 vector<int> parsingInstance;
599 int parsingVizNum, parsingDvrInstance, parsingIsoInstance,parsingFlowInstance, parsingProbeInstance,parsingTwoDDataInstance,parsingTwoDImageInstance;
605 QTimer *benchmarkTimer;
608 #endif //DOXYGEN_SKIP_THIS
614 #endif // VIZWINMGR_H
A pure virtual class for managing parameters used in visualization.
void forceRender(RenderParams *rp, bool always=false)
A Params subclass for managing parameters used by Renderers.
static Params * getActiveParams(const std::string &tag)
Region bit indicates the region bounds have changed.
static int getCurrentInstanceIndex(int winnum, Params::ParamsBaseType t)
static Params * getGlobalParams(Params::ParamsBaseType ptype)
int getActiveInstanceIndex(Params::ParamsBaseType t)
bool reloadShaders()
Method that forces all glWindows to reload their shaders.
static int GetNumParamsInstances(int pType, int winnum)
A pure virtual class specifying the common properties of all the parameter tabs in the VAPOR GUI...
Params * getApplicableParams(const std::string &tag)
virtual bool elementStartHandler(ExpatParseMgr *, int, std::string &, const char **)=0
EventRouter *( EventRouterCreateFcn)()
static int findInstanceIndex(int winnum, Params *params, Params::ParamsBaseType t)
static Params * GetParamsInstance(int pType, int winnum=-1, int instance=-1)
static void InstallTab(const std::string tag, EventRouterCreateFcn fcn)
static Params * GetDefaultParams(ParamsBase::ParamsBaseType pType)
Params * getApplicableParams(Params::ParamsBaseType t)
A class for managing all visualizers.
void setVizDirty(Params *p, DirtyBitType bittype, bool bit=true, bool refresh=true)
static EventRouter * getEventRouter(const std::string &tag)
static int RegisterMouseMode(const std::string paramsTag, int manipType, const char *name, const char *const xpmIcon[]=0)
static ParamsBaseType GetTypeFromTag(const string &tag)
static EventRouter * getEventRouter(Params::ParamsBaseType typeId)
void setParams(int winNum, Params *p, ParamsBase::ParamsBaseType typeId, int instance=-1)
static int getNumInstances(int winnum, Params::ParamsBaseType pType)
virtual bool elementEndHandler(ExpatParseMgr *, int, std::string &)=0
Params * getParams(int winNum, Params::ParamsBaseType pType, int instance=-1)
AnimationBit indicates a change in current frame.