33 enum class FlowStatus {
40 int _initializeGL()
override;
41 int _paintGL(
bool fast)
override;
42 void _clearCache()
override{};
48 std::vector<float> _colorMap;
49 std::vector<double> _timestamps;
50 float _colorMapRange[3];
52 bool _advectionComplete =
false;
53 bool _coloringComplete =
false;
57 int _cache_refinementLevel = 0;
58 int _cache_compressionLevel = 0;
60 double _cache_velocityMltp = 1.0;
61 double _cache_firstStepSizeMltp = 1.0;
62 bool _cache_isSteady =
false;
63 long _cache_steadyNumOfSteps = 0;
64 size_t _cache_currentTS = 0;
65 std::vector<bool> _cache_periodic{
false,
false,
false};
66 std::vector<float> _cache_rake{0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
67 std::vector<long> _cache_gridNumOfSeeds{5, 5, 5};
68 long _cache_randNumOfSeeds = 5;
69 int _cache_seedInjInterval = 0;
70 int _cache_pastNumOfTimeSteps = 0;
71 long _cache_rakeBiasStrength = 0;
72 double _cache_deltaT = 0.05;
74 FlowDir _cache_flowDir = FlowDir::FORWARD;
75 FlowStatus _velocityStatus = FlowStatus::SIMPLE_OUTOFDATE;
76 FlowStatus _colorStatus = FlowStatus::SIMPLE_OUTOFDATE;
77 FlowStatus _renderStatus = FlowStatus::SIMPLE_OUTOFDATE;
78 std::string _cache_rakeBiasVariable;
79 std::string _cache_seedInputFilename;
80 bool _cache_doIntegration;
81 bool _cache_integrationSetAllToFinalValue;
82 float _cache_integrationDistScalar;
83 std::vector<double> _cache_integrationVolume;
84 bool _cache_useFixedAdvectionSteps =
false;
85 double _cache_fixedAdvectionStepSize = 0.0;
88 std::unique_ptr<flow::Advection> _2ndAdvection;
91 const GLint _colorMapTexOffset;
92 ShaderProgram *_shader =
nullptr;
93 GLuint _vertexArrayId = 0;
94 GLuint _vertexBufferId = 0;
95 GLuint _colorMapTexId = 0;
97 unsigned int _VAO = 0;
98 unsigned int _VBO = 0;
99 vector<int> _streamSizes;
104 int _genSeedsRakeUniform(std::vector<flow::Particle> &seeds)
const;
105 int _genSeedsRakeRandom(std::vector<flow::Particle> &seeds)
const;
106 int _genSeedsRakeRandomBiased(std::vector<flow::Particle> &seeds)
const;
107 int _genSeedsFromList(std::vector<flow::Particle> &seeds)
const;
109 int _renderFromAnAdvectionLegacy(
const flow::Advection *, FlowParams *,
bool fast);
111 int _renderAdvectionHelper(
bool renderDirection =
false);
112 void _prepareColormap(FlowParams *);
113 void _particleHelper1(std::vector<float> &vec,
const flow::Particle &p,
bool singleColor)
const;
114 int _drawALineStrip(
const float *buf,
size_t numOfParts,
bool singleColor)
const;
115 void _restoreGLState()
const;
116 glm::vec3 _getScales();
119 int _updateFlowCacheAndStates(
const FlowParams *);
123 int _outputFlowLines();
125 void _dupSeedsNewTime(std::vector<flow::Particle> &seeds,
127 double newTime)
const;
130 void _printNonZero(
int rtn,
const char *file,
const char *func,
int line)
const;
A cache based data reader.
static std::string GetClassType()
FlowRenderer(const FlowRenderer &)=delete
FlowRenderer & operator=(const FlowRenderer &)=delete
FlowRenderer(const FlowRenderer &&)=delete
FlowRenderer(const ParamsMgr *pm, std::string &winName, std::string &dataSetName, std::string &instName, DataMgr *dataMgr)
FlowRenderer & operator=(const FlowRenderer &&)=delete
virtual std::string _getColorbarVariableName() const override
A singleton class for managing Params instances.
A class that performs rendering in a Visualizer.