Skip to content

Instantly share code, notes, and snippets.

Created June 23, 2014 12:34
What would you like to do?
public class HashGrid {
float bucketSize;
int gridWidth, gridHeight, bucketLength, numberOfRows, numberOfCols;
HashGrid(float bucketSize_, int gridWidth_, int gridHeight_, int bucketLength_) {
void set(Points point_) { //TODO: it is better probably to use an interface instead of hardcoding it but for now! ...
Points[] get(PVector location_) {
Points[] answer = new Points[answerLength];
return answer;
void drawGrid() {
public class Buckets {
Points [] bucket = new Points[bucketLength];//TODO: use an interface instead!
int arrayPointer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment