Git Product home page Git Product logo

hashoctree's Introduction

About

HashOctree is an optimized octree that is both memory effiecent and cpu effiecent.

Note The module has no update function for dynamic objects as the updating was slower than just recreating a new octree per frame.

Performance

All the benchmarks shown use 1000 objects

Octree updating. image

Octree querying. image

API

HashOctreeModule.new(Size : number, MaxDepth : number?,OffsetPosition : Vector3?) : HashOctree

Takes in a number for the size of the octree and an optional max subdivision depth (The top limit is 10 depth) and an optional OffsetPosition and returns the octree.

HashOctreeModule.InsertObjects(HashOctree : HashOctree,Objects : {Object})

Takes in a table of objects (anything with a Position value) and inserts them into the octree.

HashOctreeModule.RemoveObject(HashOctree : HashOctree,Object : Object)

Takes in an object and removes it from the octree.

HashOctreeModule.InsertObject(HashOctree : HashOctree,Object : Object)

Takes in an object and inserts it into the octree.

HashOctreeModule.QueryBox(HashOctree : HashOctree,Position : Vector3,Size : Vector3) : {Object}

Takes in the box's position and size and returns all the objects in the octree inside said box.

HashOctreeModule.QuerySphere(HashOctree : HashOctree,Position : Vector3,Radius : number) : {Object}

Takes in the sphere's position and radius and returns all the objects in the octree inside said sphere.

HashOctreeModule.VisualizeOctree(HashOctree : HashOctree)

Takes in an octree and visualizes it.

hashoctree's People

Contributors

omrezkeypie avatar denispionicul avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

denispionicul

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.