GlobeEngine
SeedLine.h
Go to the documentation of this file.
1 //
2 // SeedLine.hpp
3 // GlobeEngine
4 //
5 // Created by Alireza Amiraghdam on 08/02/17.
6 //
7 //
8 
9 #ifndef GlobeEngine_SeedLine_h
10 #define GlobeEngine_SeedLine_h
11 
12 #include <stdio.h>
13 #include <memory>
14 #include <vmmlib/vmmlib.hpp>
15 #include "PolyLineExt.h"
16 #include "SeedLinePoint.h"
17 //#include "Streamlines.h"
18 
19 namespace geClimateViewer {
20  class CriticalRegion;
21  class SeedLine{
22  public:
23  SeedLine(CriticalRegion *_region, bool _forward){criticalRegion=_region; forward=_forward;};
25  void setLeftByPosition(vmml::Vector3f _left);
26  void setRightByPosition(vmml::Vector3f _right);
27  void add(vmml::Vector3f _point);
28  std::shared_ptr<SeedLinePoint> &getRight(){return right;};
29  std::shared_ptr<SeedLinePoint> &getLeft(){return left;};
30  void step(std::shared_ptr<PolyLineExt> _nextPerpLine, bool _leftToRight);
31  bool getForward(){return forward;};
32  CriticalRegion *getRegion(){return criticalRegion;};
33  void createStreamlinesVAO();
34  void drawStreamlines(std::shared_ptr<ge::Camera> _cam);
35  void resetStreamlines();
36  void checkStreamLineDistances(std::shared_ptr<PolyLineExt> _perpLine, bool _leftToRight);
37  void highlightStreamLine(int _line);
38  float getStreamlineLength();
39 
40 
41 
42  private:
43  bool forward=true;
44  CriticalRegion *criticalRegion;
45  std::shared_ptr<SeedLinePoint> left=nullptr;
46  std::shared_ptr<SeedLinePoint> right=nullptr;
47 
48 
49 
50  };
51  typedef std::shared_ptr<SeedLine> SeedLineptr;
52 
53 }
54 
55 
56 #endif /* SeedLine_hpp */
void createSeedLinePointsFromMainPerpLine()
Definition: SeedLine.cpp:15
void setRightByPosition(vmml::Vector3f _right)
Definition: SeedLine.cpp:45
CriticalRegion * getRegion()
Definition: SeedLine.h:32
Definition: SeedLine.h:21
float getStreamlineLength()
Definition: SeedLine.cpp:106
void add(vmml::Vector3f _point)
Definition: SeedLine.cpp:59
void setLeftByPosition(vmml::Vector3f _left)
Definition: SeedLine.cpp:36
void step(std::shared_ptr< PolyLineExt > _nextPerpLine, bool _leftToRight)
Definition: SeedLine.cpp:72
std::shared_ptr< SeedLinePoint > & getRight()
Definition: SeedLine.h:28
std::shared_ptr< SeedLinePoint > & getLeft()
Definition: SeedLine.h:29
void createStreamlinesVAO()
Definition: SeedLine.cpp:83
std::shared_ptr< SeedLine > SeedLineptr
Definition: SeedLine.h:51
SeedLine(CriticalRegion *_region, bool _forward)
Definition: SeedLine.h:23
void drawStreamlines(std::shared_ptr< ge::Camera > _cam)
Definition: SeedLine.cpp:93
Definition: CriticalRegion.h:26
bool getForward()
Definition: SeedLine.h:31
void resetStreamlines()
Definition: SeedLine.cpp:122
Definition: ClimateViewerComposition.h:13
void checkStreamLineDistances(std::shared_ptr< PolyLineExt > _perpLine, bool _leftToRight)
Definition: SeedLine.cpp:131
void highlightStreamLine(int _line)
Definition: SeedLine.cpp:205