Skip to content

Commit

Permalink
Update: Documents
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Nov 19, 2023
1 parent c8c22e4 commit 4993ab7
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 56 deletions.
70 changes: 14 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,29 @@
# UE4 Plugin: kd-tree
# Unreal Engine Plugin: kd-tree

This is a UE4 plugin to provide utility functions for building kd-tree as
Blueprint Function Library.

## Supported Environment

This plugin is tested on the below environment.

* UE4 Version: 4.22
* OS: Windows/Mac

## Installation

### 1. Download source code

Download whole project's source code from
[GitHub](https://github.com/nutti/UE4-Kdtree/archive/master.zip) and unzip it.

### 2. Move the plugin

Move the plugin folder (`Kdtree` directory) into the "Plugins" directory in
your UE4 project folder.
## Features

### 3. (re-) Generate project files
* Build kd-tree.
* Radius search by using kd-tree.
* Support synchronous and asynchronous versions.

Generate project files (for example with RMouseButton on the \*.uproject) for
Visual Studio (Windows) or XCode (Mac).

### 4. Build

Build the project.

### 5. Launch UE4 editor and enable the plugin

Launch .uproject file and enable the plugin via *Settings* > *Plugins* >
*Project* > *Other* > *kd-tree*.

## Features / Tutorials

### Build kdtree and radius search
## Supported Environment

1. `Build Kdtree` builds a kd-tree (`Kdtree` object in Blueprint) from `Vector`
objects.
* `Dump Kdtree to Console` outputs the internal information of `Kdtree`
object to the console for debugging.
* `Validate Kdtree` checks the `Kdtree` object and halts the game play if
there is a incorrect in it.
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`.
3. If you don't use `Kdtree` any more, you can destroy `Kdtree` object and free
memories by `Clear Kdtree`.
This plugin supports on the below environment.

![kdtree](docs/images/kdtree.png)
* Unreal Engine Version: 4.22-4.27, 5.0-
* Development Platforms: Windows, macOS, Linux
* Target Build Platforms: All platforms

### Build kdtree and radius search (Async version)
## Installation

Async version is also provided by this plugin.
See [the installation document](docs/installation.md).

1. `Build Kdtree Async` is an asynchronous version of `Build Kdtree`.
* All synchronous versions (`Collect from Kdtree`, `Dump Kdtree to Console`,
`Validate Kdtree` and `Clear Kdtree`) can be applicatable to `Kdtree`
object after `Build Kdtree Async` is completed.
2. `Collect from Kdtree Async` is an asynchronous version of
`Collect from Kdtree`.
## Tutorial

![kdtree_async](docs/images/kdtree_async.png)
See [the tutorial](docs/tutorial.md).

## Change Log

Expand Down
25 changes: 25 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Installation

## 1. Download source code

Download whole project's source code from
[GitHub](https://github.com/nutti/UE4-Kdtree/archive/master.zip) and unzip it.

## 2. Move the plugin

Move the plugin folder (`Kdtree` directory) into the "Plugins" directory in
your UE4 project folder.

## 3. (re-) Generate project files

Generate project files (for example with right mouse click on the \*.uproject)
for Visual Studio (Windows) or XCode (Mac).

## 4. Build

Build the project in Visual Studio.

### 5. Launch UE4 editor and enable the plugin

Launch .uproject file and enable the plugin via *Settings* > *Plugins* >
*Project* > *Other* > *kd-tree*.
28 changes: 28 additions & 0 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Tutorial

## Build kd-tree and do radius search

![kdtree](docs/images/kdtree.png)

1. `Build Kdtree` builds a kd-tree (`Kdtree` object in Blueprint) from `Vector`
objects.
* `Dump Kdtree to Console` outputs the internal information of `Kdtree`
object to the console for debugging.
* `Validate Kdtree` checks the `Kdtree` object and halts the game play if
there is a incorrect in it.
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`.
3. If you don't use `Kdtree` any more, you can destroy `Kdtree` object and free
memories by `Clear Kdtree`.

## Use asynchronous version

![kdtree_async](docs/images/kdtree_async.png)

1. `Build Kdtree Async` is an asynchronous version of `Build Kdtree`.
* All synchronous versions (`Collect from Kdtree`, `Dump Kdtree to Console`,
`Validate Kdtree` and `Clear Kdtree`) can be applicatable to `Kdtree`
object after `Build Kdtree Async` is completed.
2. `Collect from Kdtree Async` is an asynchronous version of
`Collect from Kdtree`.

0 comments on commit 4993ab7

Please sign in to comment.