VAPOR3 3.9.4
ContourRenderer.h
Go to the documentation of this file.
1//************************************************************************
2// *
3// Copyright (C) 2018 *
4// University Corporation for Atmospheric Research *
5// All Rights Reserved *
6// *
7//************************************************************************/
8//
9// File: ContourRenderer.cpp
10//
11// Author: Stas Jaroszynski
12// National Center for Atmospheric Research
13// PO 3000, Boulder, Colorado
14//
15// Date: March 2018
16//
17// Description:
18// Definition of ContourRenderer
19//
20#ifndef CONTOURRENDERER_H
21#define CONTOURRENDERER_H
22
23#include <vapor/glutil.h>
24#include "vapor/VAssert.h"
25#include <vapor/Renderer.h>
26#include <vapor/ContourParams.h>
27#include <vapor/ShaderProgram.h>
28#include <vapor/Texture.h>
29
30#include <glm/glm.hpp>
31
32namespace VAPoR {
33
34class DataMgr;
35
42public:
43 ContourRenderer(const ParamsMgr *pm, string winName, string dataSetName, string instName, DataMgr *dataMgr);
44
46
47 static string GetClassType() { return ("Contour"); }
48
50 virtual int _initializeGL();
52 virtual int _paintGL(bool fast);
53
54private:
55 GLuint _VAO, _VBO;
56 Texture1D _lutTexture;
57 unsigned int _nVertices;
58
59 struct VertexData;
60 struct {
61 string varName;
63 size_t ts;
64 int level;
65 int lod;
67 vector<double> boxMin, boxMax;
68 vector<double> contourValues;
69 vector<double> sliceRotation;
70 vector<double> sliceNormal;
71 vector<double> sliceOrigin;
75
76
77 } _cacheParams;
78
79 int _buildCache(bool fast);
80 bool _isCacheDirty() const;
81 void _saveCacheParams();
82
83 void _clearCache() { _cacheParams.varName.clear(); }
84
85 vector<glm::vec3> _sliceQuad;
86 glm::vec3 _finalOrigin;
87};
88
89}; // namespace VAPoR
90
91#endif // CONTOURRENDERER_H
Class that draws the contours (contours) as specified by IsolineParams.
vector< double > contourValues
static string GetClassType()
vector< double > sliceOrigin
virtual int _paintGL(bool fast)
All OpenGL rendering is performed in the pure virtual paintGL method.
vector< double > boxMax
virtual int _initializeGL()
vector< double > sliceNormal
vector< double > sliceRotation
ContourRenderer(const ParamsMgr *pm, string winName, string dataSetName, string instName, DataMgr *dataMgr)
A cache based data reader.
Definition: DataMgr.h:110
A singleton class for managing Params instances.
Definition: ParamsMgr.h:53
A class that performs rendering in a Visualizer.
Definition: Renderer.h:121
#define RENDER_API
Definition: common.h:78