9 #ifndef GlobeEngine_VectorFieldTopology_h
10 #define GlobeEngine_VectorFieldTopology_h
16 #include <pcl/kdtree/kdtree_flann.h>
32 void draw(std::shared_ptr<ge::Camera> _cam);
40 void setProgramForSpheres(std::shared_ptr<ge::Shader> _programForSpheres){programForSpheres=_programForSpheres;};
41 void setProgramForLines(std::shared_ptr<ge::Shader> _programForLines){programForLines=_programForLines;};
62 void exportToSHPFile(std::string _path,
enum shpio::SHPFileExportContainer::EXPORT_TYPE _type, shpio::SHPFileExportContainer* _content);
68 void setCallbackProgress(std::function<
void(
int const&)>
const& _callbackProgress){ callbackProgress = _callbackProgress; };
77 std::vector<CriticalPointptr> criticalPoints;
78 void calculateCriticalPointsOnEdges();
79 pcl::KdTreeFLANN<pcl::PointXYZ> kdtree;
80 pcl::PointCloud<pcl::PointXYZ>::Ptr cloud;
81 std::vector<std::shared_ptr< ge::Sphere>> criticalPointsSpheres;
82 std::shared_ptr<ge::Shader> programForSpheres;
83 std::shared_ptr<ge::Shader> programForLines;
85 std::vector<CriticalEdgeptr> edges;
87 vmml::Vector3f position;
88 void connectBoundaryPoints();
89 int activePointIndex=-1;
90 std::vector<CriticalRegionptr> regions;
92 bool perpVisible=
true;
94 std::function<void(int const&)> callbackProgress=
nullptr;
97 bool topoVAOcreated=
false;
98 bool perpVAOcreated=
false;
99 bool streamVAOcreated=
false;
Definition: DrawableComponent.h:25
void clear()
Definition: VectorFieldTopology.cpp:30
void setPerpVisible(bool _v)
Definition: VectorFieldTopology.h:56
shpio::SHPFileExportContainer * getRegionsAsSHPContainer()
Definition: VectorFieldTopology.cpp:2018
std::shared_ptr< ge::Shader > getProgramForLines()
Definition: VectorFieldTopology.h:48
void createVAOperp()
Definition: VectorFieldTopology.cpp:308
void createVAOstream()
Definition: VectorFieldTopology.cpp:317
std::shared_ptr< VectorFieldTopology > VectorFieldTopologyptr
Definition: VectorFieldTopology.h:102
float getdt()
Definition: VectorFieldTopology.h:38
float getTotalLength()
Definition: VectorFieldTopology.cpp:2055
void calculateEdges()
Definition: VectorFieldTopology.cpp:976
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: VectorFieldTopology.cpp:329
void createStreamlinesForEachRegion()
Definition: VectorFieldTopology.cpp:1981
void highlightStreamline(int _region, int _line)
Definition: VectorFieldTopology.cpp:2008
VectorFieldTopology(VectorField *_vectorField)
Definition: VectorFieldTopology.cpp:21
void calculateRegions()
Definition: VectorFieldTopology.cpp:1924
std::shared_ptr< CriticalPoint > CriticalPointptr
Definition: CriticalPoint.h:18
void resetStreamlines()
Definition: VectorFieldTopology.cpp:2002
void setSphereSize(float _ss)
Definition: VectorFieldTopology.h:64
void setdt(float _dt)
Definition: VectorFieldTopology.h:37
void update()
Definition: VectorFieldTopology.cpp:324
std::shared_ptr< CriticalEdge > CriticalEdgeptr
Definition: CriticalPoint.h:20
void clearRegions()
Definition: VectorFieldTopology.cpp:40
void setProgramForSpheres(std::shared_ptr< ge::Shader > _programForSpheres)
Definition: VectorFieldTopology.h:40
void create()
Definition: VectorFieldTopology.cpp:50
void setCallbackProgress(std::function< void(int const &)> const &_callbackProgress)
Definition: VectorFieldTopology.h:68
vmml::Vector3f getPosition()
Definition: VectorFieldTopology.h:44
void createVAOtopo()
Definition: VectorFieldTopology.cpp:54
void closestCriticalPoint(vmml::Vector3f _key, CriticalPointptr &_result, float &_distance)
Definition: VectorFieldTopology.cpp:1339
void setActivePointIndex(int _inx)
Definition: VectorFieldTopology.h:45
shpio::SHPFileExportContainer * getStreamlinesAsSHPContainer()
Definition: VectorFieldTopology.cpp:2078
void calculateCriticalPoints()
Definition: VectorFieldTopology.cpp:370
VectorField * getVectorField()
Definition: VectorFieldTopology.h:47
void calculateRegionsAndPerps()
Definition: VectorFieldTopology.cpp:1862
shpio::SHPFileExportContainer * getTopologyAsSHPContainer()
Definition: VectorFieldTopology.cpp:2132
void setPosition(vmml::Vector3f _p)
Definition: VectorFieldTopology.h:43
Definition: ClimateViewerComposition.h:13
void removeEdge(CriticalEdgeptr _edge)
Definition: VectorFieldTopology.cpp:2063
void streamLinesStepForward()
Definition: VectorFieldTopology.cpp:1995
~VectorFieldTopology()
Definition: VectorFieldTopology.cpp:26
void simplifyEdges(double _epsilon)
Definition: VectorFieldTopology.cpp:2050
void setProgramForLines(std::shared_ptr< ge::Shader > _programForLines)
Definition: VectorFieldTopology.h:41
void exportToSHPFile(std::string _path, enum shpio::SHPFileExportContainer::EXPORT_TYPE _type, shpio::SHPFileExportContainer *_content)
Definition: VectorFieldTopology.cpp:2038
Definition: VectorField.h:19
Definition: VectorFieldTopology.h:24