2017 © Pedro PelĂĄez
 

library quadtree

An easy-to-modify Quadtree with standard 2D implementation.

image

michalsanger/quadtree

An easy-to-modify Quadtree with standard 2D implementation.

  • Wednesday, October 29, 2014
  • by michalsanger
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 4 % Grown

The README.md

Quadtree Build Status

An easy-to-modify Quadtree with standard 2D implementation., (*1)

Usage

Standard 2D collision detection supports points and bounds (rectangular regions):, (*2)

use \Quadtree\Quadtree;
use \Quadtree\Geometry\Bounds;
use \Quadtree\Geometry\Point;

$qtBounds = new Bounds(1024, 1024);
$qt = new Quadtree($qtBounds);

$qt->insert(new Bounds(300, 200)); // TRUE
$qt->insert(new Bounds(100, 50, 20, 10)); // FALSE
$qt->insert(new Point(250, 100)); // FALSE
$qt->insert(new Point(2000, 500)); // FALSE
$qt->insert(new Point(299, 199)); // TRUE

Need more logic for collision detection? Create your own ICollisionDetector. Need to insert other objects then points and bounds? Implement Insertable interface., (*3)

API

See the docs, (*4)

Installation

Use Composer:, (*5)

composer require michalsanger/quadtree

Tests

Due to Nette Tester tests are simple and readable. Run:, (*6)

> vendor/bin/tester tests/

The Versions

29/10 2014

dev-master

9999999-dev

An easy-to-modify Quadtree with standard 2D implementation.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Michal SĂ€nger

quadtree collision detection

29/10 2014

v0.7.0

0.7.0.0

An easy-to-modify Quadtree with standard 2D implementation.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Michal SĂ€nger

quadtree collision detection

11/10 2014

v0.6.0

0.6.0.0

An easy-to-modify Quadtree with standard 2D implementation.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Michal SĂ€nger

quadtree collision detection

05/10 2014

v0.5.0

0.5.0.0

An easy-to-modify Quadtree with standard 2D implementation.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Michal SĂ€nger

quadtree collision detection

04/10 2014

v0.0.1

0.0.1.0

An easy-to-modify Quadtree with standard 2D implementation.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Michal SĂ€nger

quadtree collision detection