maspack.geometry
Class AABBTree

java.lang.Object
  extended by maspack.geometry.BVTree
      extended by maspack.geometry.AABBTree
All Implemented Interfaces:
GLRenderable

public class AABBTree
extends BVTree


Field Summary
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
AABBTree()
           
AABBTree(MeshBase mesh)
           
AABBTree(MeshBase mesh, int maxLeafElems)
           
AABBTree(MeshBase mesh, int maxLeafElems, double margin)
           
 
Method Summary
 void build(Boundable[] elements, int nelems)
          Builds a bounding volume tree for a set of elements.
 AABB getRoot()
          Returns the root bounding volume for this tree
 void update()
          Updates the bounding volumes in this tree to ensure that they properly contain their enclosed elements.
 
Methods inherited from class maspack.geometry.BVTree
build, build, getBvhToWorld, getBvhToWorld, getCenter, getLeafNodes, getMargin, getMaxLeafElements, getRadius, getRenderHints, intersectLine, intersectLineSegment, intersectPlane, intersectPoint, intersectSphere, intersectTree, intersectTree, numberNodes, numNodes, prerender, print, print, printElement, printNumLeafFaces, render, setBvhToWorld, setMargin, setMaxLeafElements, updateBounds
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AABBTree

public AABBTree()

AABBTree

public AABBTree(MeshBase mesh,
                int maxLeafElems,
                double margin)

AABBTree

public AABBTree(MeshBase mesh,
                int maxLeafElems)

AABBTree

public AABBTree(MeshBase mesh)
Method Detail

getRoot

public AABB getRoot()
Description copied from class: BVTree
Returns the root bounding volume for this tree

Specified by:
getRoot in class BVTree
Returns:
root bounding volume

build

public void build(Boundable[] elements,
                  int nelems)
Description copied from class: BVTree
Builds a bounding volume tree for a set of elements.

Specified by:
build in class BVTree
Parameters:
elements - elements around which this tree is to be built.
nelems - number of elements

update

public void update()
Description copied from class: BVTree
Updates the bounding volumes in this tree to ensure that they properly contain their enclosed elements. This should be called when the positions of the elements changes (such when the vertices of mesh change position).

Specified by:
update in class BVTree
See Also:
BVTree.setMargin(double)