GlobeEngine
CriticalPoint.h
Go to the documentation of this file.
1 //
2 // CriticalPoint.hpp
3 // GlobeEngine
4 //
5 // Created by Alireza Amiraghdam on 06/02/17.
6 //
7 //
8 
9 #ifndef GlobeEngine_CriticalPoint_h
10 #define GlobeEngine_CriticalPoint_h
11 
12 #include <stdio.h>
13 #include <vmmlib/vmmlib.hpp>
14 #include <memory>
15 namespace geClimateViewer {
16  class CriticalPoint;
17  class CriticalEdge;
19  typedef std::shared_ptr<CriticalPoint> CriticalPointptr;
20  typedef std::shared_ptr<CriticalEdge> CriticalEdgeptr;
21 
23 
24  struct CriticalPointInfo{
25  vmml::Vector3f position;
26  vmml::Vector3f eigenvalues;
27  vmml::Vector3f eigenvector[3];
28 
29  };
30 
31  public:
33  void setPosition(vmml::Vector3f _pos){position=_pos;};
34  void setType(int _t){type=_t;};
35  void setEigenValue1(float _e){eigenValue1=_e;};
36  void setEigenValue2(float _e){eigenValue2=_e;};
37  void setEigenVector1(vmml::Vector3f _ev){eigenVector1=_ev;};
38  void setEigenVector2(vmml::Vector3f _ev){eigenVector2=_ev;};
39  vmml::Vector3f &getPosition(){return position;};
40  int &getType(){return type;};
41  float &getEigenValue1(){return eigenValue1;};
42  float &getEigenValue2(){return eigenValue2;};
43  vmml::Vector3f &getEigenVector1(){return eigenVector1;};
44  vmml::Vector3f &getEigenVector2(){return eigenVector2;};
45  void edgePushBack(CriticalEdgeptr _edge){edges.push_back(_edge);};
46  bool ifConnected(CriticalPointptr _inpoint);
47  void sortEdges();
48  CriticalEdgeptr getEdge(int inx){return edges[inx];};
49  int getEdgeSize(){return edges.size();};
50  CriticalEdgeptr nextEdge(CriticalEdgeptr _inEdge);
51  CriticalEdgeptr previousEdge(CriticalEdgeptr _inEdge);
52  void removeEdge(CriticalEdgeptr _edge);
53 
54  private:
55  vmml::Vector3f position;
56  int type=0;// 1:saddle 2:repeller 3:attractor 4:focus 11:boudarySaddle 12:boundaryOut 13:corner 14: boundaryIn 15:focusrepeller 16:focusattractor
57  float eigenValue1;
58  float eigenValue2;
59  vmml::Vector3f eigenVector1;
60  vmml::Vector3f eigenVector2;
61  std::vector<CriticalEdgeptr> edges;
62  int compareEdges(CriticalEdgeptr _first, CriticalEdgeptr _second);
63  // int compareEdges2(CriticalEdgeptr _first, CriticalEdgeptr _second);
64  // int compareEdgesClosed(CriticalEdgeptr _first, CriticalEdgeptr _second);
66  };
67 }
68 
69 #endif /* CriticalPoint_hpp */
vmml::Vector3f & getEigenVector2()
Definition: CriticalPoint.h:44
Definition: CriticalPoint.h:22
void setEigenVector2(vmml::Vector3f _ev)
Definition: CriticalPoint.h:38
CriticalEdgeptr getEdge(int inx)
Definition: CriticalPoint.h:48
void setEigenValue2(float _e)
Definition: CriticalPoint.h:36
void edgePushBack(CriticalEdgeptr _edge)
Definition: CriticalPoint.h:45
std::shared_ptr< CriticalPoint > CriticalPointptr
Definition: CriticalPoint.h:18
void setPosition(vmml::Vector3f _pos)
Definition: CriticalPoint.h:33
int getEdgeSize()
Definition: CriticalPoint.h:49
std::shared_ptr< CriticalEdge > CriticalEdgeptr
Definition: CriticalPoint.h:20
float & getEigenValue1()
Definition: CriticalPoint.h:41
void sortEdges()
Definition: CriticalPoint.cpp:25
CriticalEdgeptr previousEdge(CriticalEdgeptr _inEdge)
Definition: CriticalPoint.cpp:992
void setType(int _t)
Definition: CriticalPoint.h:34
vmml::Vector3f & getEigenVector1()
Definition: CriticalPoint.h:43
vmml::Vector3f & getPosition()
Definition: CriticalPoint.h:39
bool ifConnected(CriticalPointptr _inpoint)
Definition: CriticalPoint.cpp:15
CriticalEdgeptr nextEdge(CriticalEdgeptr _inEdge)
Definition: CriticalPoint.cpp:974
void setEigenVector1(vmml::Vector3f _ev)
Definition: CriticalPoint.h:37
Definition: ClimateViewerComposition.h:13
int & getType()
Definition: CriticalPoint.h:40
float & getEigenValue2()
Definition: CriticalPoint.h:42
void removeEdge(CriticalEdgeptr _edge)
Definition: CriticalPoint.cpp:1009
Definition: VectorFieldTopology.h:24
void setEigenValue1(float _e)
Definition: CriticalPoint.h:35
CriticalPoint(VectorFieldTopology *_vpt)
Definition: CriticalPoint.h:32