-
Notifications
You must be signed in to change notification settings - Fork 25
/
octree.h
38 lines (25 loc) · 882 Bytes
/
octree.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
#pragma once
#include "CoreMinimal.h"
class octree
{
public:
octree(FIntVector position, int depth, int id);
bool operator==(octree agent) const;
bool operator<(octree agent) const;
bool operator>(octree agent) const;
FIntVector m_position;
int m_depth;
int m_id;
bool m_bFather;
// we use force inline to maximize performance
FORCEINLINE int size();
FORCEINLINE FIntVector getMin();
FORCEINLINE FIntVector getMax();
FORCEINLINE bool bLeaf();
FORCEINLINE bool bInTree(int x, int y, int z);
FORCEINLINE FIntVector glconvert(int x, int y, int z); // convert from global coord to local coord
FORCEINLINE FIntVector lgconvert(int x, int y, int z); // vice versa
FORCEINLINE int depth_id(int depth);
//TODO: implement region
// region getBound();
};