public class BvhTriangleMeshShape extends TriangleMeshShape
It takes a triangle mesh as input, for example a TriangleMesh or
TriangleIndexVertexArray. The BvhTriangleMeshShape class allows for
triangle mesh deformations by a refit or partialRefit method.
Instead of building the bounding volume hierarchy acceleration structure, it is also possible to serialize (save) and deserialize (load) the structure from disk. See ConcaveDemo for an example.
| Constructor and Description |
|---|
BvhTriangleMeshShape() |
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression) |
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
boolean buildBvh) |
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
Vector3f bvhAabbMin,
Vector3f bvhAabbMax)
Optionally pass in a larger bvh aabb, used for quantization.
|
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
Vector3f bvhAabbMin,
Vector3f bvhAabbMax,
boolean buildBvh)
Optionally pass in a larger bvh aabb, used for quantization.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
OptimizedBvh |
getOptimizedBvh() |
boolean |
getOwnsBvh() |
BroadphaseNativeType |
getShapeType() |
void |
partialRefitTree(Vector3f aabbMin,
Vector3f aabbMax)
For a fast incremental refit of parts of the tree.
|
void |
performConvexcast(TriangleCallback callback,
Vector3f raySource,
Vector3f rayTarget,
Vector3f aabbMin,
Vector3f aabbMax) |
void |
performRaycast(TriangleCallback callback,
Vector3f raySource,
Vector3f rayTarget) |
void |
processAllTriangles(TriangleCallback callback,
Vector3f aabbMin,
Vector3f aabbMax)
Perform bvh tree traversal and report overlapping triangles to 'callback'.
|
void |
refitTree(Vector3f aabbMin,
Vector3f aabbMax) |
void |
setLocalScaling(Vector3f scaling) |
void |
setOptimizedBvh(OptimizedBvh bvh) |
void |
setOptimizedBvh(OptimizedBvh bvh,
Vector3f scaling) |
boolean |
usesQuantizedAabbCompression() |
calculateLocalInertia, getAabb, getLocalAabbMax, getLocalAabbMin, getLocalScaling, getMeshInterface, localGetSupportingVertex, localGetSupportingVertexWithoutMargin, recalcLocalAabbgetMargin, setMargincalculateTemporalAabb, getAngularMotionDisc, getBoundingSphere, getUserPointer, isCompound, isConcave, isConvex, isInfinite, isPolyhedral, setUserPointerpublic BvhTriangleMeshShape()
public BvhTriangleMeshShape(StridingMeshInterface meshInterface, boolean useQuantizedAabbCompression)
public BvhTriangleMeshShape(StridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, boolean buildBvh)
public BvhTriangleMeshShape(StridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3f bvhAabbMin, Vector3f bvhAabbMax)
public BvhTriangleMeshShape(StridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3f bvhAabbMin, Vector3f bvhAabbMax, boolean buildBvh)
public boolean getOwnsBvh()
public BroadphaseNativeType getShapeType()
getShapeType in class CollisionShapepublic void performRaycast(TriangleCallback callback, Vector3f raySource, Vector3f rayTarget)
public void performConvexcast(TriangleCallback callback, Vector3f raySource, Vector3f rayTarget, Vector3f aabbMin, Vector3f aabbMax)
public void processAllTriangles(TriangleCallback callback, Vector3f aabbMin, Vector3f aabbMax)
processAllTriangles in class TriangleMeshShapepublic void partialRefitTree(Vector3f aabbMin, Vector3f aabbMax)
public String getName()
getName in class TriangleMeshShapepublic void setLocalScaling(Vector3f scaling)
setLocalScaling in class TriangleMeshShapepublic OptimizedBvh getOptimizedBvh()
public void setOptimizedBvh(OptimizedBvh bvh)
public void setOptimizedBvh(OptimizedBvh bvh, Vector3f scaling)
public boolean usesQuantizedAabbCompression()