VAPOR3 3.9.4
|
A class for performing OpenGL rendering in VAPOR GUI Window. More...
#include <Visualizer.h>
Public Member Functions | |
Visualizer (const ParamsMgr *pm, const DataStatus *dataStatus, string winName) | |
~Visualizer () | |
ViewpointParams * | getActiveViewpointParams () const |
RegionParams * | getActiveRegionParams () const |
AnnotationParams * | getActiveAnnotationParams () const |
int | InitializeGL (GLManager *glManager) |
int | paintEvent (bool fast) |
int | resizeGL (int w, int h) |
string | GetWindowName () const |
int | GetNumRenderers () const |
int | CreateRenderer (string dataSetName, string renderType, string renderName) |
void | DestroyRenderer (string renderType, string renderName, bool hasOpenGLContext) |
void | DestroyAllRenderers (bool hasOpenGLContext) |
bool | HasRenderer (string renderType, string renderName) const |
void | MoveRendererToFront (string renderType, string renderName) |
void | MoveRenderersOfTypeToFront (const std::string &type) |
double | getPixelSize () const |
int | SetImageCaptureEnabled (bool onOff, string filename) |
int | SetAnimationCaptureEnabled (bool onOff, string filename) |
void | DrawText (string text, int x, int y, int size, float color[3], int type=0) |
Draw a text banner at x, y coordinates. | |
void | DrawTextNormalizedCoords (string text, float x, float y, int size, float color[3], int type=0) |
void | ClearText () |
void | ClearRenderCache () |
void | ClearRenderCache (const string &inst) |
Public Member Functions inherited from Wasp::MyBase | |
MyBase () | |
const string & | getClassName () const |
Additional Inherited Members | |
Public Types inherited from Wasp::MyBase | |
typedef void(* | ErrMsgCB_T) (const char *msg, int err_code) |
typedef void(* | DiagMsgCB_T) (const char *msg) |
Static Public Member Functions inherited from Wasp::MyBase | |
static void | SetErrMsg (const char *format,...) |
Record a formatted error message. | |
static void | SetErrMsg (int errcode, const char *format,...) |
Record a formatted error message and an error code. | |
static const char * | GetErrMsg () |
static void | SetErrCode (int err_code) |
Record an error code. | |
static int | GetErrCode () |
Retrieve the current error code. | |
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. | |
static const char * | GetDiagMsg () |
static void | SetDiagMsgCB (DiagMsgCB_T cb) |
static DiagMsgCB_T | GetDiagMsgCB () |
static void | SetDiagMsgFilePtr (FILE *fp) |
static bool | EnableErrMsg (bool enable) |
static bool | GetEnableErrMsg () |
Static Public Attributes inherited from Wasp::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 Wasp::MyBase | |
void | SetClassName (const string &name) |
A class for performing OpenGL rendering in VAPOR GUI Window.
The Visualizer class performs OpenGL rendering for the main VAPOR visualizers. The Visualizer class is not a GL Window itself, however it will issue the OpenGL calls to perform rendering in a context that is already current.
Definition at line 46 of file Visualizer.h.
VAPoR::Visualizer::Visualizer | ( | const ParamsMgr * | pm, |
const DataStatus * | dataStatus, | ||
string | winName | ||
) |
VAPoR::Visualizer::~Visualizer | ( | ) |
void VAPoR::Visualizer::ClearRenderCache | ( | ) |
Force each renderer to empty its cache
This method calls ClearCache on every renderer
void VAPoR::Visualizer::ClearRenderCache | ( | const string & | inst | ) |
|
inline |
Definition at line 162 of file Visualizer.h.
int VAPoR::Visualizer::CreateRenderer | ( | string | dataSetName, |
string | renderType, | ||
string | renderName | ||
) |
void VAPoR::Visualizer::DestroyAllRenderers | ( | bool | hasOpenGLContext | ) |
Flag all rendereres for destruction.
[in] | hasOpenGLContext | If true it is the callers job to ensure that the OpenGL Context for the window winName is active. In this case the renderer is destroyed immediately. If false the renderer is queue'd for later destruction when winName has an active OpenGL context. |
void VAPoR::Visualizer::DestroyRenderer | ( | string | renderType, |
string | renderName, | ||
bool | hasOpenGLContext | ||
) |
Flag a renderer for destruction.
[in] | hasOpenGLContext | If true it is the callers job to ensure that the OpenGL Context for the window winName is active. In this case the renderer is destroyed immediately. If false the renderer is queue'd for later destruction when winName has an active OpenGL context. |
|
inline |
Draw a text banner at x, y coordinates.
Definition at line 158 of file Visualizer.h.
|
inline |
Definition at line 160 of file Visualizer.h.
AnnotationParams * VAPoR::Visualizer::getActiveAnnotationParams | ( | ) | const |
Method that returns the AnnotationParams that is active in this window.
AnnotationParams* | current active AnnotationParams |
RegionParams * VAPoR::Visualizer::getActiveRegionParams | ( | ) | const |
Method that returns the RegionParams that is active in this window.
RegionParams* | current active RegionParams |
ViewpointParams * VAPoR::Visualizer::getActiveViewpointParams | ( | ) | const |
Method that returns the ViewpointParams that is active in this window.
ViewpointParams* | current active ViewpointParams |
|
inline |
Determine the number of renderers in the renderer list
Definition at line 84 of file Visualizer.h.
double VAPoR::Visualizer::getPixelSize | ( | ) | const |
Determine the approximate size of a pixel in terms of user coordinates, at the center of the scene.
|
inline |
Identify the visualizer index associated with this visualizer
visualizer | index; |
Definition at line 80 of file Visualizer.h.
bool VAPoR::Visualizer::HasRenderer | ( | string | renderType, |
string | renderName | ||
) | const |
int VAPoR::Visualizer::InitializeGL | ( | GLManager * | glManager | ) |
Method to initialize GL rendering. Must be called from a GL context.
[in] | glManager | A pointer to a GLManager |
void VAPoR::Visualizer::MoveRenderersOfTypeToFront | ( | const std::string & | type | ) |
void VAPoR::Visualizer::MoveRendererToFront | ( | string | renderType, |
string | renderName | ||
) |
Move the renderer to the front of the render queue
[out] | Renderer | instance that is moved to front |
int VAPoR::Visualizer::paintEvent | ( | bool | fast | ) |
Set/clear a flag indicating that the trackball has changed the viewpoint. all the OpenGL rendering is performed in the paintEvent method. It must be invoked from a current OpenGL context.
int VAPoR::Visualizer::resizeGL | ( | int | w, |
int | h | ||
) |
Issue the OpenGL resize call. Must be called from an OpenGL context.
[in] | w | Window width in pixels. |
[in] | h | Window height in pixels. |
|
inline |
Turn on or off the animation capture enablement. If on, all paintEvents will result in capture until it is turned off
Definition at line 138 of file Visualizer.h.
|
inline |
Turn on or off the image capture enablement. If on, the next paintEvent will result in capture Also saves the capture file name
Definition at line 122 of file Visualizer.h.