public class BlockTree
extends java.lang.Object
Constructor and Description |
---|
BlockTree(java.util.ArrayList<Block> blocks)
Constructor: a binary tree containing blocks.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Vector2D p)
Return true iff this collection of blocks contains point p.
|
BoundingBox |
getBox()
Return the bounding box of the collection of blocks.
|
int |
getNumBlocks()
Return the number of blocks contained in this tree.
|
boolean |
isIntermediate()
Return true iff this is an intermediate node.
|
boolean |
isLeaf()
Return true iff this is a leaf node.
|
boolean |
overlaps(Vector2D thisD,
BlockTree t,
Vector2D d)
Return true iff (this tree displaced by thisD) and (tree t
displaced by d) overlap.
|
java.lang.String |
toString()
Return a representation of this instance.
|
java.lang.String |
toString(Vector2D d)
Return a representation of this tree displaced by d.
|
public BlockTree(java.util.ArrayList<Block> blocks)
public BoundingBox getBox()
public boolean isLeaf()
public boolean isIntermediate()
public int getNumBlocks()
public boolean contains(Vector2D p)
public boolean overlaps(Vector2D thisD, BlockTree t, Vector2D d)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(Vector2D d)