public class OBBTree extends BVTree
Modifier and Type | Field and Description |
---|---|
boolean |
debug |
static int |
myDefaultMaxLeafElems |
static OBB.Method |
myDefaultMethod |
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
OBBTree() |
OBBTree(MeshBase mesh) |
OBBTree(MeshBase mesh,
int maxLeafElems) |
OBBTree(MeshBase mesh,
int maxLeafElems,
double margin) |
OBBTree(MeshBase mesh,
OBB.Method method) |
OBBTree(MeshBase mesh,
OBB.Method method,
int maxLeafElems,
double margin) |
Modifier and Type | Method and Description |
---|---|
void |
build(Boundable[] elems,
int num)
Builds a bounding volume tree for a set of elements.
|
int |
getDepth() |
OBB |
getRoot()
Returns the root bounding volume for this tree
|
int |
numNodes()
Returns the number of nodes in this tree.
|
int |
recursiveDepth(BVNode node,
int level) |
int |
recursiveNumNodes(BVNode node) |
void |
recursiveRender(Renderer renderer,
int flags,
BVNode node,
int level) |
void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
setMethod(OBB.Method method)
Sets the method used to generate the OBBs within the tree.
|
void |
update()
Updates the bounding volumes in this tree to ensure that they
properly contain their enclosed elements.
|
build, build, getBvhToWorld, getBvhToWorld, getCenter, getLeafNodes, getMargin, getMaxLeafElements, getRadius, getRenderHints, intersectLine, intersectLineSegment, intersectPlane, intersectPoint, intersectSphere, intersectTree, intersectTree, numberNodes, prerender, print, print, printElement, printNumLeafFaces, setBvhToWorld, setMargin, setMaxLeafElements, updateBounds
public static int myDefaultMaxLeafElems
public static OBB.Method myDefaultMethod
public boolean debug
public OBBTree()
public OBBTree(MeshBase mesh, OBB.Method method, int maxLeafElems, double margin)
public OBBTree(MeshBase mesh, int maxLeafElems, double margin)
public OBBTree(MeshBase mesh, OBB.Method method)
public OBBTree(MeshBase mesh, int maxLeafElems)
public OBBTree(MeshBase mesh)
public void setMethod(OBB.Method method)
method
- new method to be used to generate the OBBspublic OBB getRoot()
BVTree
public void build(Boundable[] elems, int num)
BVTree
public int recursiveDepth(BVNode node, int level)
public int getDepth()
public void render(Renderer renderer, int flags)
BVTree
Renderer
.render
in interface IsRenderable
render
in class BVTree
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.public int numNodes()
BVTree
public int recursiveNumNodes(BVNode node)
public void update()
BVTree
update
in class BVTree
BVTree.setMargin(double)