VAPOR3 3.9.4
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
VAPoR::VolumeCellTraversal Class Reference

Curvilinear grid rendering algorithm. More...

#include <VolumeCellTraversal.h>

Inheritance diagram for VAPoR::VolumeCellTraversal:
VAPoR::VolumeRegular VAPoR::VolumeGLSL VAPoR::VolumeAlgorithm VAPoR::NonCopyableMixin VAPoR::VolumeCellTraversalIso

Public Member Functions

 VolumeCellTraversal (GLManager *gl, VolumeRenderer *renderer)
 
 ~VolumeCellTraversal ()
 
virtual bool RequiresChunkedRendering ()
 
virtual int LoadData (const Grid *grid)
 
virtual ShaderProgramGetShader () const
 
virtual void SetUniforms (const ShaderProgram *shader) const
 
virtual float GuestimateFastModeSpeedupFactor () const
 
virtual int CheckHardwareSupport (const Grid *grid) const
 
- Public Member Functions inherited from VAPoR::VolumeRegular
 VolumeRegular (GLManager *gl, VolumeRenderer *renderer)
 
 ~VolumeRegular ()
 
virtual bool RequiresChunkedRendering ()
 
virtual int LoadData (const Grid *grid)
 
virtual int LoadSecondaryData (const Grid *grid)
 
virtual void DeleteSecondaryData ()
 
virtual ShaderProgramGetShader () const
 
virtual void SetUniforms (const ShaderProgram *shader) const
 
virtual float GuestimateFastModeSpeedupFactor () const
 
virtual int CheckHardwareSupport (const Grid *grid) const
 
- Public Member Functions inherited from VAPoR::VolumeGLSL
 VolumeGLSL (GLManager *gl, VolumeRenderer *renderer)
 
 ~VolumeGLSL ()
 
virtual void SaveDepthBuffer (bool fast)
 
virtual int Render (bool fast)
 
virtual int LoadData (const Grid *grid)
 
virtual ShaderProgramGetShader () const =0
 
virtual void SetUniforms (const ShaderProgram *shader) const =0
 
virtual void GetFinalBlendingMode (int *src, int *dst)
 
- Public Member Functions inherited from VAPoR::VolumeAlgorithm
 VolumeAlgorithm (GLManager *gl, VolumeRenderer *renderer)
 
virtual ~VolumeAlgorithm ()
 
virtual void SaveDepthBuffer (bool fast)
 
virtual int Render (bool fast)=0
 
virtual int LoadData (const Grid *grid)=0
 
virtual int LoadSecondaryData (const Grid *grid)=0
 
virtual void DeleteSecondaryData ()=0
 
virtual void GetFinalBlendingMode (int *src, int *dst)=0
 
virtual bool RequiresChunkedRendering ()=0
 
virtual float GuestimateFastModeSpeedupFactor () const
 
virtual int CheckHardwareSupport (const Grid *grid) const
 

Static Public Member Functions

static std::string GetName ()
 
static Type GetType ()
 
- Static Public Member Functions inherited from VAPoR::VolumeRegular
static std::string GetName ()
 
static Type GetType ()
 
- Static Public Member Functions inherited from VAPoR::VolumeAlgorithm
static VolumeAlgorithmNewAlgorithm (const std::string &name, GLManager *gl, VolumeRenderer *renderer)
 
static void Register (VolumeAlgorithmFactory *f)
 

Protected Member Functions

int _getHeuristicBBLevels () const
 
virtual std::string _addDefinitionsToShader (std::string shaderName) const
 
- Protected Member Functions inherited from VAPoR::VolumeRegular
int _loadDataDirect (const Grid *grid, Texture3D *dataTexture, Texture3D *missingTexture, bool *hasMissingData)
 
virtual std::string _addDefinitionsToShader (std::string shaderName) const
 
- Protected Member Functions inherited from VAPoR::VolumeAlgorithm
VolumeParamsGetParams () const
 
ViewpointParamsGetViewpointParams () const
 
AnnotationParamsGetAnnotationParams () const
 
TransformGetDatasetTransform () const
 
void GetExtents (glm::vec3 *dataMin, glm::vec3 *dataMax, glm::vec3 *userMin, glm::vec3 *userMax) const
 

Additional Inherited Members

- Public Types inherited from VAPoR::VolumeAlgorithm
enum class  Type { Any , DVR , Iso }
 
- Protected Attributes inherited from VAPoR::VolumeRegular
Texture3D _data
 
Texture3D _missing
 
bool _hasMissingData
 
std::vector< size_t > _dataDimensions
 
bool _hasSecondData
 
Texture3D _data2
 
Texture3D _missing2
 
bool _hasMissingData2
 
- Protected Attributes inherited from VAPoR::VolumeAlgorithm
GLManager_glManager
 

Detailed Description

Curvilinear grid rendering algorithm.

Author
Stanislaw Jaroszynski
Date
Feburary, 2019

Renders a curvilinear grid by traversing through the cells. The c++ code does the following:

  1. Loads scalar data
  2. Loads the coordinates
  3. Generates a bounding box for every border face
  4. Groups bounding boxs recursively into a tree, i.e. a bounding box at level n would encapsulate the 4 associated bounding boxes at level n-1

The glsl code does the following:

  1. Find the initial border face that the ray intersects with by traversing the tree built on the CPU
  2. Loop:
  3. Find the exit face of the current cell
  4. Render the ray segment from the entrance to the exit
  5. Set the current exit face to the new entrance face
  6. Goto Loop until the ray exits the volume

Definition at line 32 of file VolumeCellTraversal.h.

Constructor & Destructor Documentation

◆ VolumeCellTraversal()

VAPoR::VolumeCellTraversal::VolumeCellTraversal ( GLManager gl,
VolumeRenderer renderer 
)

◆ ~VolumeCellTraversal()

VAPoR::VolumeCellTraversal::~VolumeCellTraversal ( )

Member Function Documentation

◆ _addDefinitionsToShader()

virtual std::string VAPoR::VolumeCellTraversal::_addDefinitionsToShader ( std::string  shaderName) const
protectedvirtual

Reimplemented from VAPoR::VolumeRegular.

◆ _getHeuristicBBLevels()

int VAPoR::VolumeCellTraversal::_getHeuristicBBLevels ( ) const
protected

◆ CheckHardwareSupport()

virtual int VAPoR::VolumeCellTraversal::CheckHardwareSupport ( const Grid grid) const
virtual

Reimplemented from VAPoR::VolumeRegular.

◆ GetName()

static std::string VAPoR::VolumeCellTraversal::GetName ( )
inlinestatic

Definition at line 37 of file VolumeCellTraversal.h.

◆ GetShader()

virtual ShaderProgram * VAPoR::VolumeCellTraversal::GetShader ( ) const
virtual

Reimplemented from VAPoR::VolumeRegular.

Reimplemented in VAPoR::VolumeCellTraversalIso.

◆ GetType()

static Type VAPoR::VolumeCellTraversal::GetType ( )
inlinestatic

Definition at line 38 of file VolumeCellTraversal.h.

References VAPoR::VolumeAlgorithm::DVR.

◆ GuestimateFastModeSpeedupFactor()

virtual float VAPoR::VolumeCellTraversal::GuestimateFastModeSpeedupFactor ( ) const
virtual

Reimplemented from VAPoR::VolumeRegular.

◆ LoadData()

virtual int VAPoR::VolumeCellTraversal::LoadData ( const Grid grid)
virtual

Reimplemented from VAPoR::VolumeRegular.

◆ RequiresChunkedRendering()

virtual bool VAPoR::VolumeCellTraversal::RequiresChunkedRendering ( )
inlinevirtual

On OSX, some shaders can run for a long time without problems while others will crash if the run too long. It seems to correlate with complexity. Chunked rendering splits the rendering into smaller tasks so they won't crash

Reimplemented from VAPoR::VolumeRegular.

Definition at line 39 of file VolumeCellTraversal.h.

◆ SetUniforms()

virtual void VAPoR::VolumeCellTraversal::SetUniforms ( const ShaderProgram shader) const
virtual

Reimplemented from VAPoR::VolumeRegular.

Reimplemented in VAPoR::VolumeCellTraversalIso.


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