VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | List of all members
VAPoR::TwoDRenderer Class Referenceabstract

#include <TwoDRenderer.h>

Inheritance diagram for VAPoR::TwoDRenderer:
VAPoR::Renderer VAPoR::RendererBase Wasp::MyBase VAPoR::ImageRenderer VAPoR::TwoDDataRenderer

Public Member Functions

 TwoDRenderer (const ParamsMgr *pm, string winName, string dataSetName, string paramsType, string classType, string instName, DataMgr *dataMgr)
 
virtual ~TwoDRenderer ()
 Destructor.
 
- Public Member Functions inherited from VAPoR::Renderer
 Renderer (const ParamsMgr *pm, string winName, string dataSetName, string paramsType, string classType, string instName, DataMgr *dataMgr)
 
virtual ~Renderer ()
 
double GetDefaultZ (DataMgr *dataMgr, size_t ts) const
 
virtual int paintGL (bool fast)
 
void ClearCache ()
 
void renderColorbar ()
 Render the colorbar for this renderer (if it has one)
 
RenderParamsGetActiveParams () const
 
ViewpointParamsGetViewpointParams () const
 
AnnotationParamsGetAnnotationParams () const
 
TransformGetDatasetTransform () const
 
- Public Member Functions inherited from VAPoR::RendererBase
 RendererBase (const ParamsMgr *pm, string winName, string dataSetName, string paramsType, string classType, string instName, DataMgr *dataMgr)
 
virtual ~RendererBase ()
 
virtual int initializeGL (GLManager *glManager)
 
string GetVisualizer ()
 Obtain the Visualizer associated with this Renderer.
 
string GetMyName () const
 
string GetInstanceName () const
 
string GetMyType () const
 
string GetMyParamsType () const
 
string GetMyDatasetName () const
 
bool IsGLInitialized () const
 
void FlagForDeletion ()
 
bool IsFlaggedForDeletion () const
 
 RendererBase ()
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

virtual int GetMesh (DataMgr *dataMgr, GLfloat **verts, GLfloat **normals, GLsizei &nverts, GLsizei &width, GLsizei &height, GLuint **indices, GLsizei &nindices, bool &structuredMesh)=0
 
virtual const GLvoid * GetTexture (DataMgr *dataMgr, GLsizei &width, GLsizei &height, GLint &internalFormat, GLenum &format, GLenum &type, size_t &texelSize, bool &gridAligned)=0
 
virtual void _clearCache ()=0
 
virtual int _initializeGL ()
 
virtual int _paintGL (bool fast)
 All OpenGL rendering is performed in the pure virtual paintGL method.
 
void ComputeNormals (const GLfloat *verts, GLsizei w, GLsizei h, GLfloat *normals)
 
- Protected Member Functions inherited from VAPoR::Renderer
 Renderer ()
 
virtual std::string _getColorbarVariableName () const
 
virtual int _paintGL (bool fast)=0
 All OpenGL rendering is performed in the pure virtual paintGL method.
 
void EnableClipToBox (ShaderProgram *shader, float haloFrac=0.0) const
 
void DisableClippingPlanes ()
 
void GetClippingPlanes (float planes[24]) const
 
virtual bool VariableExists (size_t ts, std::vector< string > &varnames, int level, int lod, bool zeroOK) const
 
virtual void _clearCache ()=0
 
virtual int _initializeGL ()=0
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

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 VAPoR::Renderer
static void ApplyTransform (GLManager *gl, const Transform *dataset, const Transform *renderer)
 
static void ApplyDatasetTransform (GLManager *gl, const Transform *dataset)
 
- 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 Attributes inherited from VAPoR::Renderer
unsigned char * _colorbarTexture
 
string _fontName
 
- Protected Attributes inherited from VAPoR::RendererBase
const ParamsMgr_paramsMgr
 
string _winName
 
string _dataSetName
 
string _paramsType
 
string _classType
 
string _instName
 
DataMgr_dataMgr
 
GLManager_glManager
 
- Static Protected Attributes inherited from VAPoR::Renderer
static const int _imgHgt
 
static const int _imgWid
 

Detailed Description

Author
John Clyne
Version
3.0
Date
March 2016

Definition at line 25 of file TwoDRenderer.h.

Constructor & Destructor Documentation

◆ TwoDRenderer()

VAPoR::TwoDRenderer::TwoDRenderer ( const ParamsMgr pm,
string  winName,
string  dataSetName,
string  paramsType,
string  classType,
string  instName,
DataMgr dataMgr 
)

Constructor, must invoke Renderer constructor

Parameters
[in]Visualizer*pointer to the visualizer where this will draw
[in]RenderParams*pointer to the ArrowParams describing this renderer

◆ ~TwoDRenderer()

virtual VAPoR::TwoDRenderer::~TwoDRenderer ( )
virtual

Destructor.

Member Function Documentation

◆ _clearCache()

virtual void VAPoR::TwoDRenderer::_clearCache ( )
protectedpure virtual

Implements VAPoR::Renderer.

◆ _initializeGL()

virtual int VAPoR::TwoDRenderer::_initializeGL ( )
protectedvirtual

Pure virtual method Any OpenGL initialization is performed in initializeGL It will be called from an OpenGL rendering context.

Implements VAPoR::RendererBase.

Reimplemented in VAPoR::TwoDDataRenderer.

◆ _paintGL()

virtual int VAPoR::TwoDRenderer::_paintGL ( bool  fast)
protectedvirtual

All OpenGL rendering is performed in the pure virtual paintGL method.

Implements VAPoR::Renderer.

Reimplemented in VAPoR::TwoDDataRenderer.

◆ ComputeNormals()

void VAPoR::TwoDRenderer::ComputeNormals ( const GLfloat *  verts,
GLsizei  w,
GLsizei  h,
GLfloat *  normals 
)
protected

Compute 2D surface normals at each vertex.

This protected method can be used by derived classes to calculate unitized normals from a set of vertices by calculating the gradient at each vertex. The normal vectors are determined by looking at z-coords of adjacent vertices in both x and y. Suppose that dzx is the change in z associated with an x-change of dz, and that dzy is the change in z associated with a y-change of dy. Let the normal vector be (a,b,c). Then a/c is equal to dzx/dx, and b/c is equal to dzy/dy. So (a,b,c) is proportional to (dzx*dy, dzy*dx, 1)

Parameters
[in]vertsA pointer to a 2D array of surface vertices, dimensioned w by h by 3. Vertices are store as inteleaved triplets: vx0, vy0, vz0, vx1, vy1, vz1, ... vxn, vyn, vzn, where n = w * h - 1
[in]wWidth (length of fastest varying dimension) of verts in grid points
[in]hHeight (length of second fastest varying dimension) of verts in grid points
[out]normalsA pointer to a 2D array of the same size as verts that will contain the computed, unitized surface normals, stored in interleaved form.

◆ GetMesh()

virtual int VAPoR::TwoDRenderer::GetMesh ( DataMgr dataMgr,
GLfloat **  verts,
GLfloat **  normals,
GLsizei &  nverts,
GLsizei &  width,
GLsizei &  height,
GLuint **  indices,
GLsizei &  nindices,
bool &  structuredMesh 
)
protectedpure virtual

◆ GetTexture()

virtual const GLvoid * VAPoR::TwoDRenderer::GetTexture ( DataMgr dataMgr,
GLsizei &  width,
GLsizei &  height,
GLint &  internalFormat,
GLenum &  format,
GLenum &  type,
size_t &  texelSize,
bool &  gridAligned 
)
protectedpure virtual

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