VAPOR3 3.9.4
VolumeRegular.h
Go to the documentation of this file.
1#pragma once
2
3#include <vapor/VolumeGLSL.h>
4#include <vapor/Texture.h>
5
6namespace VAPoR {
7
20
21class VolumeRegular : public VolumeGLSL {
22public:
25
26 static std::string GetName() { return "Regular"; }
27 static Type GetType() { return Type::DVR; }
28 virtual bool RequiresChunkedRendering() { return false; }
29
30 virtual int LoadData(const Grid *grid);
31 virtual int LoadSecondaryData(const Grid *grid);
32 virtual void DeleteSecondaryData();
33 virtual ShaderProgram *GetShader() const;
34 virtual void SetUniforms(const ShaderProgram *shader) const;
35 virtual float GuestimateFastModeSpeedupFactor() const;
36 virtual int CheckHardwareSupport(const Grid *grid) const;
37
38protected:
42
43 std::vector<size_t> _dataDimensions;
44
49
50 int _loadDataDirect(const Grid *grid, Texture3D *dataTexture, Texture3D *missingTexture, bool *hasMissingData);
51 virtual std::string _addDefinitionsToShader(std::string shaderName) const;
52};
53
64
66public:
67 VolumeRegularIso(GLManager *gl, VolumeRenderer *renderer) : VolumeRegular(gl, renderer) {}
68 static std::string GetName() { return "Iso Regular"; }
69 static Type GetType() { return Type::Iso; }
70 virtual ShaderProgram *GetShader() const;
71 virtual void SetUniforms(const ShaderProgram *shader) const;
72};
73
74} // namespace VAPoR
Abstract base class for a 2D or 3D structured or unstructured grid.
Definition: Grid.h:56
Provides a C++ interface to the OpenGL shader program construct.
Definition: ShaderProgram.h:25
Volume rendering algorithms using GLSL.
Definition: VolumeGLSL.h:17
Regular grid isosurface rendering algorithm.
Definition: VolumeRegular.h:65
virtual ShaderProgram * GetShader() const
static std::string GetName()
Definition: VolumeRegular.h:68
virtual void SetUniforms(const ShaderProgram *shader) const
VolumeRegularIso(GLManager *gl, VolumeRenderer *renderer)
Definition: VolumeRegular.h:67
Regular grid rendering algorithm.
Definition: VolumeRegular.h:21
std::vector< size_t > _dataDimensions
Definition: VolumeRegular.h:43
virtual void SetUniforms(const ShaderProgram *shader) const
virtual ShaderProgram * GetShader() const
virtual int LoadSecondaryData(const Grid *grid)
virtual float GuestimateFastModeSpeedupFactor() const
virtual int LoadData(const Grid *grid)
int _loadDataDirect(const Grid *grid, Texture3D *dataTexture, Texture3D *missingTexture, bool *hasMissingData)
VolumeRegular(GLManager *gl, VolumeRenderer *renderer)
static std::string GetName()
Definition: VolumeRegular.h:26
virtual bool RequiresChunkedRendering()
Definition: VolumeRegular.h:28
static Type GetType()
Definition: VolumeRegular.h:27
virtual void DeleteSecondaryData()
virtual std::string _addDefinitionsToShader(std::string shaderName) const
virtual int CheckHardwareSupport(const Grid *grid) const
Contains references to context scope OpenGL data.
Definition: GLManager.h:18