GlobeEngine
VectorField.h
Go to the documentation of this file.
1 //
2 // VectorField.hpp
3 // GlobeEngine
4 //
5 // Created by Alireza Amiraghdam on 19/01/17.
6 //
7 //
8 
9 #ifndef GlobeEngine_VectorField_h
10 #define GlobeEngine_VectorField_h
11 
12 
13 #include <vmmlib/vmmlib.hpp>
14 #include <memory>
15 #include "VectorFieldTopology.h"
17 
18 namespace geClimateViewer {
19  class VectorField{
20  private:
21  vmml::Vector3i dimension;
22  std::vector<float> longs;
23  std::vector<float> lats;
24  std::vector<float> heights;
25  std::vector<vmml::Vector3f> data;
27 
28  public:
29 
30  VectorField();
31  vmml::Vector3i getDimension(){ return dimension; };
32  float getLong(int _index){ return longs[_index]; };
33  float getLat(int _index){ return lats[_index]; };
34  float getHeight(int _index){ return heights[_index]; };
35 
36  void setDimention(vmml::Vector3i _dimension);
37  void setDimention(int x, int y, int z);
38  std::vector<vmml::Vector3f> getData();
39  vmml::Vector3f getDataAtIndex(vmml::Vector3ui _index);
40  vmml::Vector3f getDataAtIndex(vmml::Vector3ui _index, int &_err);
41  vmml::Vector3f getDataAtIndex(vmml::Vector3i _index, int &_err);
42  vmml::Vector3f getDataAtIndex(vmml::Vector3f _index, int &_err);
43  vmml::Vector3f getDataAtCoordination(vmml::Vector3f _coordination, int &_err);
44  void setData_x(float *_data);
45  void setData_y(float *_data);
46  void setData_z(float *_data);
47  void setLongs(float *_data);
48  void setLats(float *_data);
49  void setHeights(float *_data);
50  void setData(vmml::Vector3i _index, vmml::Vector3f _data);
51  vmml::Vector3f getCoordinationOfIndex(vmml::Vector3i _index, int &_err);
52  float getMaxLong();
53  float getMinLong();
54  float getMaxLat();
55  float getMinLat();
56  vmml::Vector3i getIndexAtCoordination(vmml::Vector3f _coor, int &_err);
57  vmml::Vector4d jacobianAtIndex(vmml::Vector2i _index);
58 
59  vmml::Vector3f rungekuatta(vmml::Vector3f _position, bool _forward, float _dt, int &_err);
60  vmml::Vector3f rungekuattaPerp(vmml::Vector3f _position, bool _forward, float _dt, bool _leftToRight, int &_err);
61 
62  VectorFieldTopologyptr& getVpt(){ return vpt; };
63 
64  };
65 
66 }
67 
68 
69 
70 #endif /* VectorField_hpp */
void setLats(float *_data)
Definition: VectorField.cpp:177
float getHeight(int _index)
Definition: VectorField.h:34
vmml::Vector3f getDataAtCoordination(vmml::Vector3f _coordination, int &_err)
Definition: VectorField.cpp:109
float getMinLat()
Definition: VectorField.cpp:212
vmml::Vector4d jacobianAtIndex(vmml::Vector2i _index)
Definition: VectorField.cpp:243
std::shared_ptr< VectorFieldTopology > VectorFieldTopologyptr
Definition: VectorFieldTopology.h:102
VectorField()
Definition: VectorField.cpp:15
void setHeights(float *_data)
Definition: VectorField.cpp:183
void setData_z(float *_data)
Definition: VectorField.cpp:165
float getLat(int _index)
Definition: VectorField.h:33
vmml::Vector3f rungekuattaPerp(vmml::Vector3f _position, bool _forward, float _dt, bool _leftToRight, int &_err)
Definition: VectorField.cpp:302
vmml::Vector3f getCoordinationOfIndex(vmml::Vector3i _index, int &_err)
Definition: VectorField.cpp:193
void setData_x(float *_data)
Definition: VectorField.cpp:153
void setData(vmml::Vector3i _index, vmml::Vector3f _data)
Definition: VectorField.cpp:189
vmml::Vector3f rungekuatta(vmml::Vector3f _position, bool _forward, float _dt, int &_err)
Definition: VectorField.cpp:262
vmml::Vector3f getDataAtIndex(vmml::Vector3ui _index)
Definition: VectorField.cpp:53
float getMinLong()
Definition: VectorField.cpp:206
void setLongs(float *_data)
Definition: VectorField.cpp:171
void setDimention(vmml::Vector3i _dimension)
Definition: VectorField.cpp:19
void setData_y(float *_data)
Definition: VectorField.cpp:159
float getLong(int _index)
Definition: VectorField.h:32
Definition: ClimateViewerComposition.h:13
float getMaxLat()
Definition: VectorField.cpp:209
vmml::Vector3i getDimension()
Definition: VectorField.h:31
Definition: VectorField.h:19
vmml::Vector3i getIndexAtCoordination(vmml::Vector3f _coor, int &_err)
Definition: VectorField.cpp:215
float getMaxLong()
Definition: VectorField.cpp:203
VectorFieldTopologyptr & getVpt()
Definition: VectorField.h:62
std::vector< vmml::Vector3f > getData()
Definition: VectorField.cpp:49