com.bulletphysics.collision.shapes
Class BvhTriangleMeshShape
java.lang.Object
com.bulletphysics.collision.shapes.CollisionShape
com.bulletphysics.collision.shapes.ConcaveShape
com.bulletphysics.collision.shapes.TriangleMeshShape
com.bulletphysics.collision.shapes.BvhTriangleMeshShape
public class BvhTriangleMeshShape
- extends TriangleMeshShape
Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization.
Uses an interface to access the triangles to allow for sharing graphics/physics triangles.
Constructor Summary |
BvhTriangleMeshShape()
|
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression)
|
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
boolean buildBvh)
|
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
javax.vecmath.Vector3f bvhAabbMin,
javax.vecmath.Vector3f bvhAabbMax)
Optionally pass in a larger bvh aabb, used for quantization. |
BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
javax.vecmath.Vector3f bvhAabbMin,
javax.vecmath.Vector3f bvhAabbMax,
boolean buildBvh)
Optionally pass in a larger bvh aabb, used for quantization. |
Method Summary |
java.lang.String |
getName()
|
OptimizedBvh |
getOptimizedBvh()
|
boolean |
getOwnsBvh()
|
BroadphaseNativeType |
getShapeType()
|
void |
partialRefitTree(javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
For a fast incremental refit of parts of the tree. |
void |
performConvexcast(TriangleCallback callback,
javax.vecmath.Vector3f raySource,
javax.vecmath.Vector3f rayTarget,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
|
void |
performRaycast(TriangleCallback callback,
javax.vecmath.Vector3f raySource,
javax.vecmath.Vector3f rayTarget)
|
void |
processAllTriangles(TriangleCallback callback,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
Perform bvh tree traversal and report overlapping triangles to 'callback'. |
void |
refitTree(javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
|
void |
setLocalScaling(javax.vecmath.Vector3f scaling)
|
void |
setOptimizedBvh(OptimizedBvh bvh)
|
boolean |
usesQuantizedAabbCompression()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BvhTriangleMeshShape
public BvhTriangleMeshShape()
BvhTriangleMeshShape
public BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression)
BvhTriangleMeshShape
public BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
boolean buildBvh)
BvhTriangleMeshShape
public BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
javax.vecmath.Vector3f bvhAabbMin,
javax.vecmath.Vector3f bvhAabbMax)
- Optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb.
BvhTriangleMeshShape
public BvhTriangleMeshShape(StridingMeshInterface meshInterface,
boolean useQuantizedAabbCompression,
javax.vecmath.Vector3f bvhAabbMin,
javax.vecmath.Vector3f bvhAabbMax,
boolean buildBvh)
- Optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb.
getOwnsBvh
public boolean getOwnsBvh()
getShapeType
public BroadphaseNativeType getShapeType()
- Specified by:
getShapeType
in class CollisionShape
performRaycast
public void performRaycast(TriangleCallback callback,
javax.vecmath.Vector3f raySource,
javax.vecmath.Vector3f rayTarget)
performConvexcast
public void performConvexcast(TriangleCallback callback,
javax.vecmath.Vector3f raySource,
javax.vecmath.Vector3f rayTarget,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
processAllTriangles
public void processAllTriangles(TriangleCallback callback,
javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
- Perform bvh tree traversal and report overlapping triangles to 'callback'.
- Overrides:
processAllTriangles
in class TriangleMeshShape
refitTree
public void refitTree(javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
partialRefitTree
public void partialRefitTree(javax.vecmath.Vector3f aabbMin,
javax.vecmath.Vector3f aabbMax)
- For a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks.
getName
public java.lang.String getName()
- Overrides:
getName
in class TriangleMeshShape
setLocalScaling
public void setLocalScaling(javax.vecmath.Vector3f scaling)
- Overrides:
setLocalScaling
in class TriangleMeshShape
getOptimizedBvh
public OptimizedBvh getOptimizedBvh()
setOptimizedBvh
public void setOptimizedBvh(OptimizedBvh bvh)
usesQuantizedAabbCompression
public boolean usesQuantizedAabbCompression()