Overview

Namespaces

  • Quadtree
    • Geometry

Classes

  • Bounds
  • Point
  • Overview
  • Namespace
  • Class
  • Tree

Class Bounds

A Bounds represents a rectangle on a two-dimensional plane

Quadtree\Geometry\Bounds implements Quadtree\Insertable
Namespace: Quadtree\Geometry
Located at Geometry/Bounds.php
Methods summary
public
# __construct( float $width, float $height, float $left = 0, float $top = 0 )

Parameters

$width
$height
$left
$top
public float
# getWidth( )

Returns

float
public float
# getHeight( )

Returns

float
public float
# getLeft( )

Returns

float
public float
# getTop( )

Returns

float
public boolean
# containsPoint( Quadtree\Geometry\Point $point )

Returns true if the given point is in this bounds

Returns true if the given point is in this bounds

Parameters

$point

Returns

boolean
public Quadtree\Geometry\Point
# getCenter( )

Computes the center of this bounds

Computes the center of this bounds

Returns

Quadtree\Geometry\Point
public boolean
# intersects( Quadtree\Geometry\Bounds $other )

Returns true if this bounds shares any points with other bounds

Returns true if this bounds shares any points with other bounds

Parameters

$other

Returns

boolean
public Quadtree\Geometry\Bounds
# intersection( Quadtree\Geometry\Bounds $other )

Returns the intersection of two bounds

Returns the intersection of two bounds

Parameters

$other

Returns

Quadtree\Geometry\Bounds
| NULL
public Quadtree\Geometry\Bounds
# getBounds( )

Get 2D envelope

Get 2D envelope

Returns

Quadtree\Geometry\Bounds

Implementation of

Quadtree\Insertable::getBounds()
public float
# getArea( )

Calculate size of area

Calculate size of area

Returns

float
public boolean
# equals( Quadtree\Geometry\Bounds $other )

Comparison function

Comparison function

Parameters

$other

Returns

boolean
API documentation generated by ApiGen