GlobeEngine
Streamlines.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_Streamlines_h
10 #define GlobeEngine_Streamlines_h
11 
12 #include "OpenGL_Includes.h"
13 #include "Shader.h"
14 #include "DrawableComponent.h"
15 #include "Texture.h"
16 #include "Timer.h"
17 #include "ArrowField.h"
18 #include "VectorField.h"
19 
20 namespace geClimateViewer {
21  struct StreamlineProperties;
22  struct SeedPoint{
23  vmml::Vector3f position;
24  vmml::Vector3f direction;
26  };
27 
28  typedef std::shared_ptr<SeedPoint> SeedPointptr;
29  class ClimateViewerEngine;
31  {
32  public:
33  Streamlines();
34  ~Streamlines();
35  void clear();
36  void create();
37  void draw(std::shared_ptr<ge::Camera> _cam);
38  void update();
39  void createVAO();
40  void createStreamlinesFromVectorField(std::shared_ptr<VectorField> _vectorField);
41  void setProperties(std::shared_ptr<StreamlineProperties> _prop){properties=_prop;};
42  void fillRandomSeeds(std::shared_ptr<VectorField> _vectorField);
43  void setArrowField(std::shared_ptr<geFlow::ArrowField> _arrowField){ arrowField = _arrowField; };
44  void addSeedPoint(SeedPoint _point){seedPoints.push_back(_point);};
45  void fillSeedPoins(std::vector<vmml::Vector3f> &_points);
46  void setPosition(vmml::Vector3f position);
47  void setDirection(vmml::Vector3f position);
48  float getTotalLength();
49  const std::vector<SeedPoint> &getSeedPoints(){return seedPoints;};
50  void fillSeedsFromStreamlines(std::shared_ptr<Streamlines> slr);
51  void setCallbackProgress(std::function<void(int const&)> const& _callbackProgress){ callbackProgress = _callbackProgress; };
52  private:
53  vmml::Vector3f position;
54  vmml::Vector3f direction;
55 
56  std::vector<std::shared_ptr<PolyLineExt>> liness;
57  std::shared_ptr<geFlow::ArrowField> arrowField;
58 
59  int linesize;
60 
61  std::shared_ptr<StreamlineProperties> properties;
62  ge::Timer openglTimer;
63  std::vector<SeedPoint> seedPoints;
64  std::function<void(int const&)> callbackProgress=nullptr;
65  float progressedReal;
66  int progressed;
67 
68 
69 
70 
71  };
72 
73 
74 
75 }
76 #endif
Definition: DrawableComponent.h:25
Definition: Streamlines.h:22
float moveDirection
Definition: Streamlines.h:25
Streamlines()
Definition: Streamlines.cpp:429
~Streamlines()
Definition: Streamlines.cpp:50
void setPosition(vmml::Vector3f position)
Definition: Streamlines.cpp:41
void fillRandomSeeds(std::shared_ptr< VectorField > _vectorField)
Definition: Streamlines.cpp:217
void setArrowField(std::shared_ptr< geFlow::ArrowField > _arrowField)
Definition: Streamlines.h:43
void createStreamlinesFromVectorField(std::shared_ptr< VectorField > _vectorField)
Definition: Streamlines.cpp:268
void create()
Definition: Streamlines.cpp:61
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: Streamlines.cpp:189
void createVAO()
Definition: Streamlines.cpp:69
void update()
Definition: Streamlines.cpp:184
Definition: Streamlines.h:30
vmml::Vector3f position
Definition: Streamlines.h:23
void setDirection(vmml::Vector3f position)
Definition: Streamlines.cpp:44
void fillSeedsFromStreamlines(std::shared_ptr< Streamlines > slr)
Definition: Streamlines.cpp:417
void fillSeedPoins(std::vector< vmml::Vector3f > &_points)
Definition: Streamlines.cpp:396
float getTotalLength()
Definition: Streamlines.cpp:408
std::shared_ptr< SeedPoint > SeedPointptr
Definition: Streamlines.h:28
void setProperties(std::shared_ptr< StreamlineProperties > _prop)
Definition: Streamlines.h:41
Definition: ClimateViewerEngine.h:80
vmml::Vector3f direction
Definition: Streamlines.h:24
void clear()
Definition: Streamlines.cpp:55
Definition: ClimateViewerComposition.h:13
const std::vector< SeedPoint > & getSeedPoints()
Definition: Streamlines.h:49
Definition: Timer.h:17
void setCallbackProgress(std::function< void(int const &)> const &_callbackProgress)
Definition: Streamlines.h:51
void addSeedPoint(SeedPoint _point)
Definition: Streamlines.h:44