de.jreality.scene.pick
Class AABBTree

java.lang.Object
  extended by de.jreality.scene.pick.AABBTree

public class AABBTree
extends java.lang.Object

An AABB tree for IndexedFaceSets.

TODO: the pick algorithm assumes that polygons are konvex... this is easy to change, steal code from tims triangulate non convex poly...

Author:
Steffen Weissmann

Field Summary
static AABBTree nullTree
          more or less a hack to indicate that a geometry has no pick tree.
 
Method Summary
static AABBTree construct(double[][] coords, int[][] faces)
           
static AABBTree construct(double[][] coords, int[][] faces, int maxPolysPerLeaf)
           
static AABBTree construct(IndexedFaceSet faceSet)
           
static AABBTree construct(IndexedFaceSet faceSet, int maxPolysPerLeaf)
           
 SceneGraphComponent display()
          this is only for debugging and might be removed in future.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nullTree

public static AABBTree nullTree
more or less a hack to indicate that a geometry has no pick tree. AABB pick system uses it to avoid

Method Detail

construct

public static AABBTree construct(double[][] coords,
                                 int[][] faces)

construct

public static AABBTree construct(double[][] coords,
                                 int[][] faces,
                                 int maxPolysPerLeaf)

construct

public static AABBTree construct(IndexedFaceSet faceSet)

construct

public static AABBTree construct(IndexedFaceSet faceSet,
                                 int maxPolysPerLeaf)

display

public SceneGraphComponent display()
this is only for debugging and might be removed in future.

Returns:
A component that contains the AABBs of the tree as IndexedLineSets.