Flow Visualisation
FlowField.h
Go to the documentation of this file.
1 //
2 // FlowField.h
3 // flowviz
4 //
5 // Created by Johann Götz on 07.06.15.
6 // Copyright (c) 2015 Johann Götz. All rights reserved.
7 //
8 
9 #ifndef __flowviz__FlowField__
10 #define __flowviz__FlowField__
11 
12 #include <stdio.h>
13 #include <vector>
14 
15 namespace flowiz
16 {
20  typedef struct
21  {
22  float X;
23  float Y;
24  } FlowVector;
25 
30  class FlowField
31  {
32  private:
33  int m_sizeX;
34  int m_sizeY;
35  std::vector<std::vector<FlowVector>> m_field;
37  public:
38  FlowField(): m_sizeX(0), m_sizeY(0) { }
39  FlowField(int sizeX, int sizeY);
40 
41  std::vector<std::vector<FlowVector>>& get_field() { return m_field; }
42 
43  int get_sizeX() { return m_sizeX; }
44  void set_sizeX(int sizeX) { m_sizeX = sizeX; }
45 
46  int get_sizeY() { return m_sizeY; }
47  void set_sizeY(int sizeY) { m_sizeY = sizeY; }
48  };
49 }
50 
51 #endif /* defined(__flowviz__FlowField__) */
FlowField()
The vector field.
Definition: FlowField.h:38
void set_sizeX(int sizeX)
Definition: FlowField.h:44
float X
Definition: FlowField.h:22
Represents a 2D vector field The vectors are stored inside two.
Definition: FlowField.h:30
int get_sizeX()
Definition: FlowField.h:43
Represents a 2D flow vector.
Definition: FlowField.h:20
float Y
Definition: FlowField.h:23
int get_sizeY()
Definition: FlowField.h:46
void set_sizeY(int sizeY)
Definition: FlowField.h:47
std::vector< std::vector< FlowVector > > & get_field()
Definition: FlowField.h:41
Definition: DistanceMap.h:16