Skip to content

Commit 9950ae1

Browse files
committed
Add: documents
1 parent cf1a2be commit 9950ae1

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,61 @@
1-
# UE4-kd-tree
2-
kd-tree plugin for UE4
1+
# UE4 Plugin: kd-tree
2+
3+
This is a UE4 plugin to provide utility functions for building kd-tree as Blueprint Function Library.
4+
5+
6+
## Supported Environment
7+
8+
This plugin is tested on the below environment.
9+
10+
* UE4 Version: 4.22
11+
* OS: Windows/Mac
12+
13+
14+
## Installation
15+
16+
#### 1. Download source codes
17+
18+
Download whole project's source codes from [GitHub](https://github.com/nutti/UE4-Kdtree/archive/master.zip) and unzip them.
19+
20+
21+
#### 2. Copy the plugin source codes
22+
23+
Copy the plugin source codes (`Kdtree` directory) into the plugin directory (`Plugin` directory) on your UE4 project.
24+
25+
26+
#### 3. Generate a project file for each IDE
27+
28+
Generate a project file for Visual Studio (Windows) or XCode (Mac).
29+
30+
31+
#### 4. Build
32+
33+
Build whole source codes including plugin source codes.
34+
35+
36+
#### 5. Launch UE4 editor and enable plugin
37+
38+
Launch .uproject file and enable plugin via *Settings* > *Plugins* > *Project* > *Other* > *kd-tree*.
39+
40+
41+
## Features / Tutorials
42+
43+
### Build kdtree and radius search
44+
45+
1. `Build Kdtree` builds a kd-tree (`Kdtree` object in Blueprint) from `Vector` objects.
46+
* `Dump Kdtree to Console` outputs the internal information of `Kdtree` object to the console for debugging.
47+
* `Validate Kdtree` checks the `Kdtree` object and halts the game play if there is a incorrect in it.
48+
2. `Collect from Kdtree` collects `Vector` objects in the sphere (center location is `Center`, radius is `Radius`). `Collect from Kdtree` also returns indicies of list that is input argument of `Build Kdtree`.
49+
3. If you don't use `Kdtree` any more, you can destroy `Kdtree` object and free memories by `Clear Kdtree`.
50+
51+
![](docs/images/kdtree.png)
52+
53+
54+
### Build Actor kdtree and radius search
55+
56+
Same as [Build kdtree and radius search](#Build-kdtree-and-radius-search) except for below things.
57+
58+
* Build a kd-tree from `Actor` objects.
59+
* The name of all functions and data structures need to be changed as `kdtree` -> `Actor kdtree`.
60+
61+
![](docs/images/actor_kdtree.png)

docs/images/actor_kdtree.png

172 KB
Loading

docs/images/kdtree.png

163 KB
Loading

0 commit comments

Comments
 (0)