VAPOR3 3.9.4
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
VAPoR::RayCaster Class Referenceabstract

#include <RayCaster.h>

Inheritance diagram for VAPoR::RayCaster:
VAPoR::Renderer VAPoR::RendererBase Wasp::MyBase

Classes

class  UserCoordinates
 

Public Member Functions

 RayCaster (const ParamsMgr *pm, std::string &winName, std::string &dataSetName, std::string paramsType, std::string classType, std::string &instName, DataMgr *dataMgr)
 
virtual ~RayCaster ()
 
- 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 Types

enum  CastingMode { FixedStep = 1 , CellTraversal = 2 }
 

Protected Member Functions

int _initializeGL ()
 
int _paintGL (bool fast)
 All OpenGL rendering is performed in the pure virtual paintGL method.
 
void _clearCache ()
 
virtual int _load3rdPassShaders ()=0
 
void _renderTriangleStrips (int whichPass, int castingMode) const
 
void _drawVolumeFaces (int whichPass, int whichCastingMode, const std::vector< size_t > &cameraCellIdx, const glm::mat4 &inversedMV=glm::mat4(0.0f), bool fast=false) const
 
void _load3rdPassUniforms (int castingMode, bool fast, bool insideVolume) const
 
virtual void _3rdPassSpecialHandling (bool fast, int castingMode) const
 
virtual void _colormapSpecialHandling ()
 
virtual bool _use2ndVariable (const RayCasterParams *params) const
 
virtual void _update2ndVarTextures ()
 
int _initializeFramebufferTextures ()
 
int _selectDefaultCastingMethod () const
 
void _updateViewportWhenNecessary (const GLint *viewport)
 
void _updateColormap (RayCasterParams *params)
 
void _updateDataTextures ()
 
int _updateVertCoordsTexture (const glm::mat4 &MV)
 
void _configure3DTextureNearestInterpolation () const
 
void _configure3DTextureLinearInterpolation () const
 
void _configure2DTextureLinearInterpolation () const
 
void _sleepAWhile () const
 
double _getElapsedSeconds (const struct timeval *begin, const struct timeval *end) const
 
- 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)
 

Protected Attributes

UserCoordinates _userCoordinates
 
std::vector< float > _colorMap
 
float _colorMapRange [3]
 
glm::mat4 _currentMV
 
GLint _currentViewport [4]
 
bool _isIntel
 
GLuint _backFaceTextureId
 
GLuint _frontFaceTextureId
 
GLuint _volumeTextureId
 
GLuint _missingValueTextureId
 
GLuint _colorMapTextureId
 
GLuint _vertCoordsTextureId
 
GLuint _depthTextureId
 
GLuint _2ndVarDataTexId
 
GLuint _2ndVarMaskTexId
 
const GLint _backFaceTexOffset
 
const GLint _frontFaceTexOffset
 
const GLint _volumeTexOffset
 
const GLint _colorMapTexOffset
 
const GLint _missingValueTexOffset
 
const GLint _vertCoordsTexOffset
 
const GLint _depthTexOffset
 
const GLint _2ndVarDataTexOffset
 
const GLint _2ndVarMaskTexOffset
 
GLuint _frameBufferId
 
GLuint _vertexArrayId
 
GLuint _vertexBufferId
 
GLuint _indexBufferId
 
GLuint _vertexAttribId
 
ShaderProgram_1stPassShader
 
ShaderProgram_2ndPassShader
 
ShaderProgram_3rdPassShader
 
ShaderProgram_3rdPassMode1Shader
 
ShaderProgram_3rdPassMode2Shader
 
- 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
 

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
 
- Static Protected Attributes inherited from VAPoR::Renderer
static const int _imgHgt
 
static const int _imgWid
 

Detailed Description

Definition at line 17 of file RayCaster.h.

Member Enumeration Documentation

◆ CastingMode

Enumerator
FixedStep 
CellTraversal 

Definition at line 35 of file RayCaster.h.

Constructor & Destructor Documentation

◆ RayCaster()

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

◆ ~RayCaster()

virtual VAPoR::RayCaster::~RayCaster ( )
virtual

Member Function Documentation

◆ _3rdPassSpecialHandling()

virtual void VAPoR::RayCaster::_3rdPassSpecialHandling ( bool  fast,
int  castingMode 
) const
protectedvirtual

◆ _clearCache()

void VAPoR::RayCaster::_clearCache ( )
inlineprotectedvirtual

Implements VAPoR::Renderer.

Definition at line 28 of file RayCaster.h.

◆ _colormapSpecialHandling()

virtual void VAPoR::RayCaster::_colormapSpecialHandling ( )
protectedvirtual

◆ _configure2DTextureLinearInterpolation()

void VAPoR::RayCaster::_configure2DTextureLinearInterpolation ( ) const
protected

◆ _configure3DTextureLinearInterpolation()

void VAPoR::RayCaster::_configure3DTextureLinearInterpolation ( ) const
protected

◆ _configure3DTextureNearestInterpolation()

void VAPoR::RayCaster::_configure3DTextureNearestInterpolation ( ) const
protected

◆ _drawVolumeFaces()

void VAPoR::RayCaster::_drawVolumeFaces ( int  whichPass,
int  whichCastingMode,
const std::vector< size_t > &  cameraCellIdx,
const glm::mat4 &  inversedMV = glm::mat4(0.0f),
bool  fast = false 
) const
protected

◆ _getElapsedSeconds()

double VAPoR::RayCaster::_getElapsedSeconds ( const struct timeval *  begin,
const struct timeval *  end 
) const
protected

◆ _initializeFramebufferTextures()

int VAPoR::RayCaster::_initializeFramebufferTextures ( )
protected

◆ _initializeGL()

int VAPoR::RayCaster::_initializeGL ( )
protectedvirtual

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

Implements VAPoR::RendererBase.

◆ _load3rdPassShaders()

virtual int VAPoR::RayCaster::_load3rdPassShaders ( )
protectedpure virtual

◆ _load3rdPassUniforms()

void VAPoR::RayCaster::_load3rdPassUniforms ( int  castingMode,
bool  fast,
bool  insideVolume 
) const
protected

◆ _paintGL()

int VAPoR::RayCaster::_paintGL ( bool  fast)
protectedvirtual

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

Implements VAPoR::Renderer.

◆ _renderTriangleStrips()

void VAPoR::RayCaster::_renderTriangleStrips ( int  whichPass,
int  castingMode 
) const
protected

◆ _selectDefaultCastingMethod()

int VAPoR::RayCaster::_selectDefaultCastingMethod ( ) const
protected

◆ _sleepAWhile()

void VAPoR::RayCaster::_sleepAWhile ( ) const
protected

◆ _update2ndVarTextures()

virtual void VAPoR::RayCaster::_update2ndVarTextures ( )
protectedvirtual

◆ _updateColormap()

void VAPoR::RayCaster::_updateColormap ( RayCasterParams params)
protected

◆ _updateDataTextures()

void VAPoR::RayCaster::_updateDataTextures ( )
protected

◆ _updateVertCoordsTexture()

int VAPoR::RayCaster::_updateVertCoordsTexture ( const glm::mat4 &  MV)
protected

◆ _updateViewportWhenNecessary()

void VAPoR::RayCaster::_updateViewportWhenNecessary ( const GLint *  viewport)
protected

◆ _use2ndVariable()

virtual bool VAPoR::RayCaster::_use2ndVariable ( const RayCasterParams params) const
protectedvirtual

Member Data Documentation

◆ _1stPassShader

ShaderProgram* VAPoR::RayCaster::_1stPassShader
protected

Definition at line 149 of file RayCaster.h.

◆ _2ndPassShader

ShaderProgram* VAPoR::RayCaster::_2ndPassShader
protected

Definition at line 150 of file RayCaster.h.

◆ _2ndVarDataTexId

GLuint VAPoR::RayCaster::_2ndVarDataTexId
protected

Definition at line 129 of file RayCaster.h.

◆ _2ndVarDataTexOffset

const GLint VAPoR::RayCaster::_2ndVarDataTexOffset
protected

Definition at line 138 of file RayCaster.h.

◆ _2ndVarMaskTexId

GLuint VAPoR::RayCaster::_2ndVarMaskTexId
protected

Definition at line 130 of file RayCaster.h.

◆ _2ndVarMaskTexOffset

const GLint VAPoR::RayCaster::_2ndVarMaskTexOffset
protected

Definition at line 139 of file RayCaster.h.

◆ _3rdPassMode1Shader

ShaderProgram* VAPoR::RayCaster::_3rdPassMode1Shader
protected

Definition at line 152 of file RayCaster.h.

◆ _3rdPassMode2Shader

ShaderProgram* VAPoR::RayCaster::_3rdPassMode2Shader
protected

Definition at line 153 of file RayCaster.h.

◆ _3rdPassShader

ShaderProgram* VAPoR::RayCaster::_3rdPassShader
protected

Definition at line 151 of file RayCaster.h.

◆ _backFaceTexOffset

const GLint VAPoR::RayCaster::_backFaceTexOffset
protected

Definition at line 131 of file RayCaster.h.

◆ _backFaceTextureId

GLuint VAPoR::RayCaster::_backFaceTextureId
protected

Definition at line 122 of file RayCaster.h.

◆ _colorMap

std::vector<float> VAPoR::RayCaster::_colorMap
protected

Definition at line 114 of file RayCaster.h.

◆ _colorMapRange

float VAPoR::RayCaster::_colorMapRange[3]
protected

Definition at line 115 of file RayCaster.h.

◆ _colorMapTexOffset

const GLint VAPoR::RayCaster::_colorMapTexOffset
protected

Definition at line 134 of file RayCaster.h.

◆ _colorMapTextureId

GLuint VAPoR::RayCaster::_colorMapTextureId
protected

Definition at line 126 of file RayCaster.h.

◆ _currentMV

glm::mat4 VAPoR::RayCaster::_currentMV
protected

Definition at line 116 of file RayCaster.h.

◆ _currentViewport

GLint VAPoR::RayCaster::_currentViewport[4]
protected

Definition at line 117 of file RayCaster.h.

◆ _depthTexOffset

const GLint VAPoR::RayCaster::_depthTexOffset
protected

Definition at line 137 of file RayCaster.h.

◆ _depthTextureId

GLuint VAPoR::RayCaster::_depthTextureId
protected

Definition at line 128 of file RayCaster.h.

◆ _frameBufferId

GLuint VAPoR::RayCaster::_frameBufferId
protected

Definition at line 142 of file RayCaster.h.

◆ _frontFaceTexOffset

const GLint VAPoR::RayCaster::_frontFaceTexOffset
protected

Definition at line 132 of file RayCaster.h.

◆ _frontFaceTextureId

GLuint VAPoR::RayCaster::_frontFaceTextureId
protected

Definition at line 123 of file RayCaster.h.

◆ _indexBufferId

GLuint VAPoR::RayCaster::_indexBufferId
protected

Definition at line 145 of file RayCaster.h.

◆ _isIntel

bool VAPoR::RayCaster::_isIntel
protected

Definition at line 118 of file RayCaster.h.

◆ _missingValueTexOffset

const GLint VAPoR::RayCaster::_missingValueTexOffset
protected

Definition at line 135 of file RayCaster.h.

◆ _missingValueTextureId

GLuint VAPoR::RayCaster::_missingValueTextureId
protected

Definition at line 125 of file RayCaster.h.

◆ _userCoordinates

UserCoordinates VAPoR::RayCaster::_userCoordinates
protected

Definition at line 113 of file RayCaster.h.

◆ _vertCoordsTexOffset

const GLint VAPoR::RayCaster::_vertCoordsTexOffset
protected

Definition at line 136 of file RayCaster.h.

◆ _vertCoordsTextureId

GLuint VAPoR::RayCaster::_vertCoordsTextureId
protected

Definition at line 127 of file RayCaster.h.

◆ _vertexArrayId

GLuint VAPoR::RayCaster::_vertexArrayId
protected

Definition at line 143 of file RayCaster.h.

◆ _vertexAttribId

GLuint VAPoR::RayCaster::_vertexAttribId
protected

Definition at line 146 of file RayCaster.h.

◆ _vertexBufferId

GLuint VAPoR::RayCaster::_vertexBufferId
protected

Definition at line 144 of file RayCaster.h.

◆ _volumeTexOffset

const GLint VAPoR::RayCaster::_volumeTexOffset
protected

Definition at line 133 of file RayCaster.h.

◆ _volumeTextureId

GLuint VAPoR::RayCaster::_volumeTextureId
protected

Definition at line 124 of file RayCaster.h.


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