A collection of 2D/3D spatial hashing algorithms. Useful for quick nearest neighbor calculations.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
example_kdtree_2d Update examples. Jan 8, 2018
example_kdtree_3d
example_kdtree_nd Add support for n-dim using std::array. Apr 4, 2017
libs
src Update license docs. Jan 24, 2017
.appveyor.yml
.gitignore Update .gitignore. Mar 16, 2018
.travis.yml Update Travis. Jan 8, 2018
LICENSE.md Add License. Jan 24, 2017
README.md Add support for n-dim using std::array. Apr 4, 2017
addon_config.mk Update addon_config.mk Apr 15, 2016
ofxaddons_thumbnail.png

README.md

ofxSpatialHash

Description

A collection of 2D/3D spatial hashing algorithms. Useful for quick nearest neighbor calculations in 2-, 3-d and N-d.

Inspired by https://github.com/neilmendoza/ofxNearestNeighbour/ and others.

See class documentation and examples for more information.

2-D Hash 3-D Hash N-D Hash (example uses 3 dimensions for easy visualization)

Features

  • Allows for an all-in-one approach to spatially indexing existing point clouds for rapid 2D/3D search.
  • Supports easy use of ofVec2f, ofVec3f, ofVec2f, glm::vec2, glm::vec3, glm::vec4.
  • Supports N dimensional hash using std::array<float, N>. See example_kdtree_nd for a 3d version.

Getting Started

To get started, generate the example project files using the openFrameworks Project Generator.

Documentation

API documentation can be found here.

Build Status

Linux, macOS Build Status

Visual Studio, MSYS Build status

Compatibility

The stable branch of this repository is meant to be compatible with the openFrameworks stable branch, which corresponds to the latest official openFrameworks release.

The master branch of this repository is meant to be compatible with the openFrameworks master branch.

Some past openFrameworks releases are supported via tagged versions, but only stable and master branches are actively supported.

Versioning

This project uses Semantic Versioning, although strict adherence will only come into effect at version 1.0.0.

Licensing

See LICENSE.md.

Contributing

Pull Requests are always welcome, so if you make any improvements please feel free to float them back upstream :)

  1. Fork this repository.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.