-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbe_finder.h
44 lines (31 loc) · 936 Bytes
/
be_finder.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
38
39
40
41
42
43
44
//
// Created by xhy on 2021/8/23.
//
#ifndef CUBIOMES_NEW_FINDER_H
#define CUBIOMES_NEW_FINDER_H
#include <vector>
#include "structure.h"
struct CachedArea {
Vec2i area_pos;
uint32_t candicate_area_seed = 0;
CachedArea(const Vec2i &p, uint32_t seed) : area_pos(p), candicate_area_seed(seed) {}
};
class StructureFinder {
private:
Pos center_{};
int radius_{};
BEStructureConfig config_{};
std::vector<CachedArea> areas_;
Pos get_candicate_pos_in_area(const Pos &p, uint32_t area_seed) const;
public:
/**
* 结构查找器的输入
* @param search_center 输入中心(方块坐标)
* @param range 输入半径
* @param config 结构参数数据
*/
StructureFinder(const Pos &search_center, size_t range, BEStructureConfig config);
StructureFinder() = delete;
std::vector<Pos> get_candicate_positions(uint32_t seed);
};
#endif //CUBIOMES_NEW_FINDER_H