|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.geometry.BVTree
maspack.geometry.OBBTree
public class OBBTree
Field Summary | |
---|---|
boolean |
debug
|
static int |
myDefaultMaxLeafElems
|
static OBB.Method |
myDefaultMethod
|
Fields inherited from interface maspack.render.GLRenderable |
---|
TRANSLUCENT, TWO_DIMENSIONAL |
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
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(GLRenderer renderer,
int flags,
BVNode node,
int level)
|
void |
render(GLRenderer renderer,
int flags)
Render this object using Open GL via the JOGL. |
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. |
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, prerender, print, print, printElement, printNumLeafFaces, setBvhToWorld, setMargin, setMaxLeafElements, updateBounds |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int myDefaultMaxLeafElems
public static OBB.Method myDefaultMethod
public boolean debug
Constructor Detail |
---|
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)
Method Detail |
---|
public void setMethod(OBB.Method method)
method
- new method to be used to generate the OBBspublic OBB getRoot()
BVTree
getRoot
in class BVTree
public void build(Boundable[] elems, int num)
BVTree
build
in class BVTree
elems
- elements around which this tree is to be built.num
- number of elementspublic void recursiveRender(GLRenderer renderer, int flags, BVNode node, int level)
public int recursiveDepth(BVNode node, int level)
public int getDepth()
public void render(GLRenderer renderer, int flags)
BVTree
render
in interface GLRenderable
render
in class BVTree
renderer
- renderer object which is used to perform the rendering. Provides pointers
to GL and GLU, along with helper functions.flags
- supplies flags that may be used to control different
aspects of the rendering. Flags are defined in GLRenderer
and currently include
GLRenderer.SELECTED
,
GLRenderer.VERTEX_COLORING
,
GLRenderer.HSV_COLOR_INTERPOLATION
,
GLRenderer.SORT_FACES
, and
GLRenderer.CLEAR_MESH_DISPLAY_LISTS
.public int numNodes()
BVTree
numNodes
in class BVTree
public int recursiveNumNodes(BVNode node)
public void update()
BVTree
update
in class BVTree
BVTree.setMargin(double)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |