Skip to content

BioHaskell/octree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

octree

This is a simple Octree implementation in Haskell.

Build Status

To use simply:

module Main where

import Data.Octree as O

import Linear

main = do let oct = fromList [(V3 1 2 3, "a"),
                              (V3 3 4 5, "b"),
                              (V3 8 8 8, "c")]
              report msg elt = putStrLn $ msg ++ show elt
          report "Nearest     :" $ O.nearest     oct     $ V3 2 2 3
          report "Within range:" $ O.withinRange oct 5.0 $ V3 2 2 3
          return ()

For now it uses linear package for vectors, but I may change it to use Tensor package used by OpenGL package, if there is interest. So far I still wait for package with vector operations (like dot, cross producton, vector projection and rejection) on Tensor types.

Official releases are on Hackage.

This package is also a part of Stackage - a stable subset of Hackage.

About

Octree is a shallow tree structure for 3-dimensional points

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published