VAPoR  0.1
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::GLWindow Class Reference

A class for performing OpenGL rendering in a VAPOR Visualizer. More...

#include <glwindow.h>

Inheritance diagram for VAPoR::GLWindow:

Public Member Functions

void setDirtyBit (DirtyBitType t, bool val)
 
bool vizIsDirty (DirtyBitType t)
 
ViewpointParamsgetActiveViewpointParams ()
 
RegionParamsgetActiveRegionParams ()
 
AnimationParamsgetActiveAnimationParams ()
 
void TransformToUnitBox ()
 Method that transforms the world into the unit box, should be called by each renderer before rendering. More...
 
int addTextObject (Renderer *, int timestep, const char *fontPath, int textSize, float textColor[4], float bgColor[4], int type, string text)
 
void changeTextObjectType (int type)
 
void addText (Renderer *, int timestep, int objectNum, float posn[3])
 
void clearTextObjects (Renderer *)
 
void clearTextObjects (Renderer *, int timestep)
 

Static Public Member Functions

static int getModeManipType (int modeIndex)
 
static ParamsBase::ParamsBaseType getModeParamType (int modeIndex)
 
static int getModeFromParams (ParamsBase::ParamsBaseType t)
 
static const string & getModeName (int index)
 
static int AddMouseMode (const std::string paramsTag, int manipType, const char *name)
 
static void ConvertAxes (bool toLatLon, const int ticDirs[3], const double fromMinTic[3], const double fromMaxTic[3], const double fromOrigin[3], const double fromTicLength[3], double toMinTic[3], double toMaxTic[3], double toOrigin[3], double toTicLength[3])
 

Detailed Description

A class for performing OpenGL rendering in a VAPOR Visualizer.

Author
Alan Norton
Version
$Revision$
Date
$Date$

The GLWindow class is an OpenGL rendering window. There is one instance for each of the VAPOR visualizers. The GLWindow is embedded in a VizWin instance. It performs basic setup for OpenGL rendering, renders incidental geometry, and calls all the enabled VAPOR Renderer instances. The GLWindow maintains "Dirty bits" that indicate window-specific state that may require refreshing

Definition at line 77 of file glwindow.h.

Member Function Documentation

◆ AddMouseMode()

static int VAPoR::GLWindow::AddMouseMode ( const std::string  paramsTag,
int  manipType,
const char *  name 
)
static

Static method used to add a new Mouse Mode to the list of available modes.

Parameters
[in]conststring& tag associated with the Params class
[in]intManipulator type (1,2,or 3)
[in]constchar* name of mouse mode
Return values
intResulting mouse mode

◆ addText()

void VAPoR::GLWindow::addText ( Renderer ,
int  timestep,
int  objectNum,
float  posn[3] 
)

◆ addTextObject()

int VAPoR::GLWindow::addTextObject ( Renderer ,
int  timestep,
const char *  fontPath,
int  textSize,
float  textColor[4],
float  bgColor[4],
int  type,
string  text 
)

◆ changeTextObjectType()

void VAPoR::GLWindow::changeTextObjectType ( int  type)

◆ clearTextObjects() [1/2]

void VAPoR::GLWindow::clearTextObjects ( Renderer )

◆ clearTextObjects() [2/2]

void VAPoR::GLWindow::clearTextObjects ( Renderer ,
int  timestep 
)

◆ ConvertAxes()

static void VAPoR::GLWindow::ConvertAxes ( bool  toLatLon,
const int  ticDirs[3],
const double  fromMinTic[3],
const double  fromMaxTic[3],
const double  fromOrigin[3],
const double  fromTicLength[3],
double  toMinTic[3],
double  toMaxTic[3],
double  toOrigin[3],
double  toTicLength[3] 
)
static

Static method to convert axis coordinates between user and lat-lon It is OK for outputs to equal corresponding inputs.

Parameters
[in]toLatLonindicates whether conversion is to LatLon (true) or to user (false)
[in]ticDirsare directions of tics on each axis.
[in]fromMinTicis a 3-vector indicating minimum tic coordinates being mapped.
[in]fromMaxTicis a 3-vector indicating maximum tic coordinates being mapped.
[in]fromOriginis a 3-vector indicating origin coordinates being mapped.
[in]fromTicLengthis a 3-vector indicating tic lengths before conversion
[out]toMinTicis result 3-vector of minimum tic coordinates
[out]toMaxTicis result 3-vector of maximum tic coordinates
[out]toOriginis result 3-vector of origin coordinates
[out]toTicLengthis a 3-vector indicating tic lengths after conversion

◆ getActiveAnimationParams()

AnimationParams* VAPoR::GLWindow::getActiveAnimationParams ( )
inline

Method that returns the AnimationParams that is active in this window.

Return values
AnimationParams*current active AnimationParams

Definition at line 103 of file glwindow.h.

◆ getActiveRegionParams()

RegionParams* VAPoR::GLWindow::getActiveRegionParams ( )
inline

Method that returns the RegionParams that is active in this window.

Return values
RegionParams*current active RegionParams

Definition at line 99 of file glwindow.h.

◆ getActiveViewpointParams()

ViewpointParams* VAPoR::GLWindow::getActiveViewpointParams ( )
inline

Method that returns the ViewpointParams that is active in this window.

Return values
ViewpointParams*current active ViewpointParams

Definition at line 95 of file glwindow.h.

◆ getModeFromParams()

static int VAPoR::GLWindow::getModeFromParams ( ParamsBase::ParamsBaseType  t)
inlinestatic

Static method that identifies the current mouse mode for a particular params type.

Parameters
[in]ParamsBase::ParamsBaseTypet must be the type of a params with an associated mouse mode
Return values
intMouse mode

Definition at line 126 of file glwindow.h.

◆ getModeManipType()

static int VAPoR::GLWindow::getModeManipType ( int  modeIndex)
inlinestatic

Static method that indicates the manipulator type that is associated with a mouse mode.

See also
VizWinMgr
Parameters
[in]modeIndexis a positive integer indexing the current mouse modes
Return values
intmanipulator type is 1 (region box) 2 (2D box) or 3 (rotated 3D box).

Definition at line 113 of file glwindow.h.

◆ getModeName()

static const string& VAPoR::GLWindow::getModeName ( int  index)
inlinestatic

Static method that identifies the name associated with a mouse mode. This is the text that is displayed in the mouse mode selector.

Parameters
[in]intMouse Mode
Return values
conststring& Name associated with mode

Definition at line 132 of file glwindow.h.

References VAPoR::Params::GetCurrentParamsInstance(), VAPoR::DataStatus::getInstance(), VAPoR::ParamsBase::GetParamsBaseTypeId(), VAPoR::ParamsBase::GetTypeFromTag(), VAPoR::RenderParams::isEnabled(), MAXNUMRENDERERS, and VAPoR::RenderParams::UsesMapperFunction().

◆ getModeParamType()

static ParamsBase::ParamsBaseType VAPoR::GLWindow::getModeParamType ( int  modeIndex)
inlinestatic

Static method that returns the Params type associated with a mouse mode.

Parameters
[in]intmodeIndex The mouse mode.
Return values
ParamsBase::ParamsBaseTypeThe type of the params associated with the mouse mode.

Definition at line 119 of file glwindow.h.

◆ setDirtyBit()

void VAPoR::GLWindow::setDirtyBit ( DirtyBitType  t,
bool  val 
)

Method for setting window-specific dirty bits. All the bits are defined in the params.h file, in the VAPoR namespace.

Parameters
[in]DirtyBitTypet identifies the property being set
[in]boolval sets the bit true (dirty) or false (clean)

◆ TransformToUnitBox()

void VAPoR::GLWindow::TransformToUnitBox ( )

Method that transforms the world into the unit box, should be called by each renderer before rendering.

◆ vizIsDirty()

bool VAPoR::GLWindow::vizIsDirty ( DirtyBitType  t)

Method for checking window-specific dirty bits. All the bits are defined in the params.h file, in the VAPoR namespace.

Parameters
[in]DirtyBitTypet identifies the property being checked
Return values
boolis true if it is dirty.

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