Flow Visualisation
FlowControl.h
Go to the documentation of this file.
1 //
2 // FlowControl.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__FlowControl__
10 #define __flowviz__FlowControl__
11 
12 #include <stdio.h>
13 #include <vector>
14 #include <valarray>
15 
16 #include "FlowArrow.h"
17 #include "TimeField.h"
18 #include "DistanceMap.h"
19 
20 class ISceneGraphPart;
21 
22 namespace flowiz {
23 
28  {
29  private:
30  const float BorderDistance = 30.0f;
31  const float SeedingDistance = 15.0f;
32  const float SeparationDistance = 4.0f;
34  TimeField *m_timeField;
35  std::vector<FlowArrow*> m_arrows;
36  //DistanceMap *m_distanceMap; /** @brief distrectisized distance map */
37  std::vector<DistanceMap*> m_distanceMaps;
39  render::Texture *m_arrowTexture;
40  render::Texture *m_circleTexture;
45  void initializeDistanceMap(FlowArrow *arrow, int timestep);
46 
50  void updateDistanceMap(FlowArrow *arrow, int timestep);
51 
55  void updateDistanceMapToTimestamp(int timestep);
56 
60  bool arrowCanBePlaced(FlowArrow *arrow, int timestep);
61  bool arrowCanBePropagated(FlowArrow *arrow, int timestep);
62 
63  public:
64  FlowControl(TimeField *timeField);
65  ~FlowControl();
66 
70  void placeMovingArrows();
71 
75  void completeTimestepWithArrows(int timestep);
76 
80  void propagateArrowsOneStep(int time, int deltaTime);
81 
86 
90  void update(float time);
91  };
92 }
93 
94 #endif /* defined(__flowviz__FlowControl__) */
Represents OpenGL texture.
Definition: Texture.h:21
void placeMovingArrows()
Starts the arrow placement process.
Definition: FlowControl.cpp:168
FlowControl(TimeField *timeField)
Definition: FlowControl.cpp:15
Creates and Controls the time dependened vector field.
Definition: FlowControl.h:27
void completeTimestepWithArrows(int timestep)
Seeds arrows at timestep.
Definition: FlowControl.cpp:47
Represents a timebased vector filed The vector fields are stored as.
Definition: TimeField.h:25
void propagateArrowsOneStep(int time, int deltaTime)
Moves arrows forward backwards in time.
Definition: FlowControl.cpp:220
void addArrowsToSceneGraph(render::ISceneGraphPart *graphPart)
add arrows to scenegraph
Definition: FlowControl.cpp:190
Represents part of the SceneGraph.
Definition: ISceneGraphPart.h:23
void update(float time)
updates all time dependened actions
Definition: FlowControl.cpp:246
The graphical representation of an Arrow Creates and manages position, movement and lifetime of an ar...
Definition: FlowArrow.h:27
Definition: DistanceMap.h:16
~FlowControl()
Definition: FlowControl.cpp:21