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:
VetsUtil::MyBase

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)
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 

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])
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message. More...
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 

Additional Inherited Members

- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Attributes inherited from VetsUtil::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

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

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
void VAPoR::GLWindow::addText ( Renderer ,
int  timestep,
int  objectNum,
float  posn[3] 
)
int VAPoR::GLWindow::addTextObject ( Renderer ,
int  timestep,
const char *  fontPath,
int  textSize,
float  textColor[4],
float  bgColor[4],
int  type,
string  text 
)
void VAPoR::GLWindow::changeTextObjectType ( int  type)
void VAPoR::GLWindow::clearTextObjects ( Renderer )
void VAPoR::GLWindow::clearTextObjects ( Renderer ,
int  timestep 
)
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
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.

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.

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.

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.

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.

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.

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.

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)
void VAPoR::GLWindow::TransformToUnitBox ( )

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

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: