Git Product home page Git Product logo

octree-1's Introduction

Octree

Maven Releases Maven Releases

Here is an octree system to use in Java. This system allows you to store object with the tree, and retreive them.

Using Maven

Step 1: Add my release repository.

<repositories>
    <repository>
        <id>Ryandw11</id>
        <url>https://repo.ryandw11.com/repository/maven-releases/</url>
    </repository>
</repositories>

Step 2: Add the dependency

<dependency>
    <groupId>me.ryandw11</groupId>
    <artifactId>Octree</artifactId>
    <version>1.0</version>
</dependency>

Using Gradle

repositories {
    maven { url 'https://repo.ryandw11.com/repository/maven-releases/' }
}
dependencies {
    implementation 'me.ryandw11:Octree:1.0'
}

Octree Usage

The octree is a generic class. You can tell it what value you want to store at each point.

Octree<String> octree = new Octree<>(0,0,0, 7, 7, 7);

The 0, 0, 0 is the 3d point. 7, 7, 7 is also a 3d point. Those two points are the bounds of the tree. You cannot have any points outside of the bounds.

Adding values

octree.insert(4, 5, 4, "hello world!");

Checking for existance

octree.find(4, 5, 4); // returns true

Getting the value of a point

String s = octree.get(4, 5, 4);
// s than equals "hello world!"

Removing a point

octree.remove(4, 5, 4);
// Returns a boolean if it was successful or not.

octree-1's People

Contributors

ryandw11 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.