GlobeEngine
CriticalEdge.h
Go to the documentation of this file.
1 //
2 // CriticalEdge.hpp
3 // GlobeEngine
4 //
5 // Created by Alireza Amiraghdam on 06/02/17.
6 //
7 //
8 
9 #ifndef GlobeEngine_CriticalEdge_h
10 #define GlobeEngine_CriticalEdge_h
11 
12 #include <stdio.h>
13 #include <memory>
14 #include "CriticalPoint.h"
15 #include "PolyLineExt.h"
16 #include "DrawableComponent.h"
17 
18 namespace geClimateViewer {
19  class CriticalEdge{
20  public:
21  CriticalEdge();
22  void setEnd1(CriticalPointptr _end1){end1=_end1;};
23  void setEnd2(CriticalPointptr _end2){end2=_end2;};
24  CriticalPointptr &getEnd1(){return end1;};
25  CriticalPointptr &getEnd2(){return end2;};
26  std::shared_ptr<PolyLineExt> &getLine(){ return line; };
27  vmml::Vector3f getPointv(int _index, CriticalPointptr &_from);
28  vmml::Vector3f getPointv(int _index, CriticalPoint *_from);
29  void setType(int _t){type=_t;};
30  int getType(){return type;};
31  void setMoveDirection(float _m){moveDirection=_m;};
35  void setColor(vmml::Vector3f _color){color=_color; line->setColor(_color);};
36  void setClockwiseDone(bool _clockwise, CriticalPoint *_from);
37  bool getClockwiseDone(bool _clockwise,CriticalPoint *_from);
38  void resetRegionDone();
39 
40  private:
41  CriticalPointptr end1,end2;
42  std::shared_ptr<PolyLineExt> line;
43  int type=0; //0: not boundary 1:incoming 2:outgoing
44  float moveDirection=0;
45  vmml::Vector3f color;
46  bool cwDone=false,ccwDone=false;
47 
48  };
49 
50 }
51 #endif /* CriticalEdge_hpp */
CriticalPointptr otherEnd(CriticalPointptr _inEnd)
Definition: CriticalEdge.cpp:30
Definition: CriticalPoint.h:22
void setType(int _t)
Definition: CriticalEdge.h:29
void resetRegionDone()
Definition: CriticalEdge.cpp:85
void setClockwiseDone(bool _clockwise, CriticalPoint *_from)
Definition: CriticalEdge.cpp:52
std::shared_ptr< CriticalPoint > CriticalPointptr
Definition: CriticalPoint.h:18
int getType()
Definition: CriticalEdge.h:30
void setEnd1(CriticalPointptr _end1)
Definition: CriticalEdge.h:22
void setMoveDirection(float _m)
Definition: CriticalEdge.h:31
void setColor(vmml::Vector3f _color)
Definition: CriticalEdge.h:35
void setEnd2(CriticalPointptr _end2)
Definition: CriticalEdge.h:23
std::shared_ptr< PolyLineExt > & getLine()
Definition: CriticalEdge.h:26
Definition: CriticalEdge.h:19
CriticalEdge()
Definition: CriticalEdge.cpp:13
bool getClockwiseDone(bool _clockwise, CriticalPoint *_from)
Definition: CriticalEdge.cpp:68
Definition: ClimateViewerComposition.h:13
CriticalPointptr & getEnd2()
Definition: CriticalEdge.h:25
CriticalPointptr & getEnd1()
Definition: CriticalEdge.h:24
vmml::Vector3f getPointv(int _index, CriticalPointptr &_from)
Definition: CriticalEdge.cpp:26
float getMoveDirection(geClimateViewer::CriticalPoint *_from)
Definition: CriticalEdge.cpp:44