ashleymoni / quadtree Goto Github PK
View Code? Open in Web Editor NEWQuadTree library for Haskell, using lenses.
License: Other
QuadTree library for Haskell, using lenses.
License: Other
Hi, thank you for your library!
I've started using it to store terrain (rectangles) for an OpenGL project. fmap/tmap'ing over the QuadTree has worked very well so far.
However, I would now like to cull some of the terrain using the camera's position and angle. I thought I might use filterTree
to create a new, slimmer QuadTree, but it seems to return a list.
I have two questions / issues:
Thanks!
Hello! Are you open to a small pull request contribution along the lines of the following?
-- |Unsafe sanity test lens that makes sure a given location index exists
-- within the relevant 'QuadTree'.
verifyLocation :: HCS => Location -> Lens' (QuadTree a) (QuadTree a)
verifyLocation index f qt
| index `outOfBounds` qt = error $ ""
++ "Location index out of QuadTree bounds."
++ " Attempted index: " ++ show index ++ ","
++ " Max index: " ++ show (treeLength qt - 1, treeWidth qt - 1)
| otherwise = f qt
type HCS = HasCallStack
If so I intend to clean up and submit one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.