Flow Visualisation
DistanceMap.h
Go to the documentation of this file.
1 //
2 // DistanceMap.h
3 // flowviz
4 //
5 // Created by Johann Götz on 09.06.15.
6 // Copyright (c) 2015 Johann Götz. All rights reserved.
7 //
8 
9 #ifndef __flowviz__DistanceMap__
10 #define __flowviz__DistanceMap__
11 
12 #include <stdio.h>
13 
14 #include "glm.hpp"
15 
16 namespace flowiz {
17 
22  {
23  private:
24  int m_sizeX;
25  int m_sizeY;
27  int *m_distanceMap;
29  public:
30  DistanceMap(int sizeX, int sizeY);
31  ~DistanceMap();
32 
37  void initializeDistanceMap(glm::uvec2 position);
38 
43  void updateDistanceMap(glm::uvec2 position);
44 
48  int at(int row, int col);
49  };
50 }
51 
52 #endif /* defined(__flowviz__DistanceMap__) */
void initializeDistanceMap(glm::uvec2 position)
initializes distance map with supplied position Changes every element
Definition: DistanceMap.cpp:25
~DistanceMap()
Definition: DistanceMap.cpp:19
Definition: type_mat2x2.hpp:38
DistanceMap(int sizeX, int sizeY)
the distance data
Definition: DistanceMap.cpp:14
void updateDistanceMap(glm::uvec2 position)
Updates distance map with supplied position Changes elements only when position is closer...
Definition: DistanceMap.cpp:36
int at(int row, int col)
distance to nearest arrow at position
Definition: DistanceMap.cpp:49
genType::row_type row(genType const &m, int index)
Definition: matrix_access.inl:47
Discrete distance map.
Definition: DistanceMap.h:21
Definition: DistanceMap.h:16