com.bulletphysics.linearmath
Class AabbUtil2

java.lang.Object
  extended by com.bulletphysics.linearmath.AabbUtil2

public class AabbUtil2
extends Object

Utility functions for axis aligned bounding boxes (AABB).


Constructor Summary
AabbUtil2()
           
 
Method Summary
static void aabbExpand(Vector3f aabbMin, Vector3f aabbMax, Vector3f expansionMin, Vector3f expansionMax)
           
static int outcode(Vector3f p, Vector3f halfExtent)
           
static boolean rayAabb(Vector3f rayFrom, Vector3f rayTo, Vector3f aabbMin, Vector3f aabbMax, float[] param, Vector3f normal)
           
static boolean testAabbAgainstAabb2(Vector3f aabbMin1, Vector3f aabbMax1, Vector3f aabbMin2, Vector3f aabbMax2)
          Conservative test for overlap between two AABBs.
static boolean testTriangleAgainstAabb2(Vector3f[] vertices, Vector3f aabbMin, Vector3f aabbMax)
          Conservative test for overlap between triangle and AABB.
static void transformAabb(Vector3f halfExtents, float margin, Transform t, Vector3f aabbMinOut, Vector3f aabbMaxOut)
           
static void transformAabb(Vector3f localAabbMin, Vector3f localAabbMax, float margin, Transform trans, Vector3f aabbMinOut, Vector3f aabbMaxOut)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AabbUtil2

public AabbUtil2()
Method Detail

aabbExpand

public static void aabbExpand(Vector3f aabbMin,
                              Vector3f aabbMax,
                              Vector3f expansionMin,
                              Vector3f expansionMax)

outcode

public static int outcode(Vector3f p,
                          Vector3f halfExtent)

rayAabb

public static boolean rayAabb(Vector3f rayFrom,
                              Vector3f rayTo,
                              Vector3f aabbMin,
                              Vector3f aabbMax,
                              float[] param,
                              Vector3f normal)

testAabbAgainstAabb2

public static boolean testAabbAgainstAabb2(Vector3f aabbMin1,
                                           Vector3f aabbMax1,
                                           Vector3f aabbMin2,
                                           Vector3f aabbMax2)
Conservative test for overlap between two AABBs.


testTriangleAgainstAabb2

public static boolean testTriangleAgainstAabb2(Vector3f[] vertices,
                                               Vector3f aabbMin,
                                               Vector3f aabbMax)
Conservative test for overlap between triangle and AABB.


transformAabb

public static void transformAabb(Vector3f halfExtents,
                                 float margin,
                                 Transform t,
                                 Vector3f aabbMinOut,
                                 Vector3f aabbMaxOut)

transformAabb

public static void transformAabb(Vector3f localAabbMin,
                                 Vector3f localAabbMax,
                                 float margin,
                                 Transform trans,
                                 Vector3f aabbMinOut,
                                 Vector3f aabbMaxOut)