-
Notifications
You must be signed in to change notification settings - Fork 2
/
BlockController.h
37 lines (27 loc) · 1.05 KB
/
BlockController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef BLOCKCONTROLLER_H
#define BLOCKCONTROLLER_H
#include "Utils.h"
class Metadata;
class DataManager;
class FeatureTracker;
class BlockController {
public:
BlockController();
~BlockController();
void InitParameters(const Metadata& meta, const vec3i& gridDim, const vec3i& blockIdx);
void TrackForward(const Metadata& meta, const vec3i& gridDim, const vec3i& blockIdx);
void SetCurrentTimestep(int t) { currentT = t; }
std::vector<int> GetAdjacentBlockIds();
std::vector<Leaf> GetConnectivityTree() { return connectivityTree; }
void SetConnectivityTree(const std::vector<Leaf>& tree) { connectivityTree = tree; }
void UpdateConnectivityTree(int currentBlockId, const vec3i& blockIdx);
private:
DataManager *pDataManager;
FeatureTracker *pFeatureTracker;
vec3i blockDim;
int currentT;
std::unordered_map<int, int> adjacentBlocks;
std::vector<Leaf> connectivityTree;
void initAdjacentBlocks(const vec3i& gridDim, const vec3i& blockIdx);
};
#endif // BLOCKCONTROLLER_H