com.bulletphysics.collision.shapes
Class OptimizedBvh
java.lang.Object
com.bulletphysics.collision.shapes.OptimizedBvh
- All Implemented Interfaces:
- Serializable
public class OptimizedBvh
- extends Object
- implements Serializable
OptimizedBvh store an AABB tree that can be quickly traversed on CPU (and SPU, GPU in future).
- See Also:
- Serialized Form
Method Summary |
void |
assignInternalNodeFromLeafNode(int internalNode,
int leafNodeIndex)
|
void |
build(StridingMeshInterface triangles,
boolean useQuantizedAabbCompression,
Vector3f _aabbMin,
Vector3f _aabbMax)
|
Vector3f |
getAabbMax(int nodeIndex)
|
Vector3f |
getAabbMin(int nodeIndex)
|
void |
mergeInternalNodeAabb(int nodeIndex,
Vector3f newAabbMin,
Vector3f newAabbMax)
|
long |
quantizeWithClamp(Vector3f point)
|
void |
refit(StridingMeshInterface meshInterface)
|
void |
refitPartial(StridingMeshInterface meshInterface,
Vector3f aabbMin,
Vector3f aabbMax)
|
void |
reportAabbOverlappingNodex(NodeOverlapCallback nodeCallback,
Vector3f aabbMin,
Vector3f aabbMax)
|
void |
reportBoxCastOverlappingNodex(NodeOverlapCallback nodeCallback,
Vector3f raySource,
Vector3f rayTarget,
Vector3f aabbMin,
Vector3f aabbMax)
|
void |
reportRayOverlappingNodex(NodeOverlapCallback nodeCallback,
Vector3f raySource,
Vector3f rayTarget)
|
void |
setInternalNodeAabbMax(int nodeIndex,
Vector3f aabbMax)
|
void |
setInternalNodeAabbMin(int nodeIndex,
Vector3f aabbMin)
|
void |
setInternalNodeEscapeIndex(int nodeIndex,
int escapeIndex)
|
void |
setQuantizationValues(Vector3f aabbMin,
Vector3f aabbMax)
|
void |
setQuantizationValues(Vector3f aabbMin,
Vector3f aabbMax,
float quantizationMargin)
|
void |
swapLeafNodes(int i,
int splitIndex)
|
void |
unQuantize(Vector3f vecOut,
long vecIn)
|
void |
updateBvhNodes(StridingMeshInterface meshInterface,
int firstNode,
int endNode,
int index)
|
MAX_SUBTREE_SIZE_IN_BYTES
public static final int MAX_SUBTREE_SIZE_IN_BYTES
- See Also:
- Constant Field Values
MAX_NUM_PARTS_IN_BITS
public static final int MAX_NUM_PARTS_IN_BITS
- See Also:
- Constant Field Values
OptimizedBvh
public OptimizedBvh()
setInternalNodeAabbMin
public void setInternalNodeAabbMin(int nodeIndex,
Vector3f aabbMin)
setInternalNodeAabbMax
public void setInternalNodeAabbMax(int nodeIndex,
Vector3f aabbMax)
getAabbMin
public Vector3f getAabbMin(int nodeIndex)
getAabbMax
public Vector3f getAabbMax(int nodeIndex)
setQuantizationValues
public void setQuantizationValues(Vector3f aabbMin,
Vector3f aabbMax)
setQuantizationValues
public void setQuantizationValues(Vector3f aabbMin,
Vector3f aabbMax,
float quantizationMargin)
setInternalNodeEscapeIndex
public void setInternalNodeEscapeIndex(int nodeIndex,
int escapeIndex)
mergeInternalNodeAabb
public void mergeInternalNodeAabb(int nodeIndex,
Vector3f newAabbMin,
Vector3f newAabbMax)
swapLeafNodes
public void swapLeafNodes(int i,
int splitIndex)
assignInternalNodeFromLeafNode
public void assignInternalNodeFromLeafNode(int internalNode,
int leafNodeIndex)
build
public void build(StridingMeshInterface triangles,
boolean useQuantizedAabbCompression,
Vector3f _aabbMin,
Vector3f _aabbMax)
refit
public void refit(StridingMeshInterface meshInterface)
refitPartial
public void refitPartial(StridingMeshInterface meshInterface,
Vector3f aabbMin,
Vector3f aabbMax)
updateBvhNodes
public void updateBvhNodes(StridingMeshInterface meshInterface,
int firstNode,
int endNode,
int index)
reportAabbOverlappingNodex
public void reportAabbOverlappingNodex(NodeOverlapCallback nodeCallback,
Vector3f aabbMin,
Vector3f aabbMax)
reportRayOverlappingNodex
public void reportRayOverlappingNodex(NodeOverlapCallback nodeCallback,
Vector3f raySource,
Vector3f rayTarget)
reportBoxCastOverlappingNodex
public void reportBoxCastOverlappingNodex(NodeOverlapCallback nodeCallback,
Vector3f raySource,
Vector3f rayTarget,
Vector3f aabbMin,
Vector3f aabbMax)
quantizeWithClamp
public long quantizeWithClamp(Vector3f point)
unQuantize
public void unQuantize(Vector3f vecOut,
long vecIn)