public class BVBoxNodeTester extends java.lang.Object implements BVNodeTester
BoxTypes
.Modifier and Type | Class and Description |
---|---|
static class |
BVBoxNodeTester.BoxTypes
Decsribes the type expected for the first and second bounding box.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isDisjoint(AABB box1,
AABB box2) |
boolean |
isDisjoint(AABB box1,
AABB box2,
RigidTransform3d XBA) |
boolean |
isDisjoint(AABB box1,
OBB box2,
RigidTransform3d XBA) |
boolean |
isDisjoint(BVNode node1,
BVNode node2,
RigidTransform3d XBA)
Returns true if node1 and node2 are disjoint.
|
boolean |
isDisjoint(OBB box1,
AABB box2,
RigidTransform3d XBA) |
static boolean |
isDisjoint(OBB box1,
OBB box2) |
boolean |
isDisjoint(OBB box1,
OBB box2,
RigidTransform3d XBA) |
static boolean |
isDisjoint(Vector3d hw1,
Vector3d hw2,
RotationMatrix3d R1,
RotationMatrix3d R2,
Vector3d pd,
Vector3d px)
Determines if two bounding boxes with half widths
hw1 and
hw2 are disjoint. |
static boolean |
isDisjoint(Vector3d hw1,
Vector3d hw2,
RotationMatrix3d R21,
Vector3d p21)
Determines if two bounding boxes with half widths
hw1 and
hw2 are disjoint. |
public boolean isDisjoint(BVNode node1, BVNode node2, RigidTransform3d XBA)
isDisjoint
in interface BVNodeTester
node1
- first bounding volume nodenode2
- second bounding volume nodeXBA
- transform from the coordinate frame of node2 to the
coordinate frame of node1. If the coordinate frames are the same,
this should be set to RigidTransform3d.IDENTITY
.public boolean isDisjoint(AABB box1, AABB box2, RigidTransform3d XBA)
public boolean isDisjoint(AABB box1, OBB box2, RigidTransform3d XBA)
public boolean isDisjoint(OBB box1, AABB box2, RigidTransform3d XBA)
public boolean isDisjoint(OBB box1, OBB box2, RigidTransform3d XBA)
public static final boolean isDisjoint(Vector3d hw1, Vector3d hw2, RotationMatrix3d R1, RotationMatrix3d R2, Vector3d pd, Vector3d px)
hw1
and
hw2
are disjoint. The first box is assumed to be axis-aligned
and centered at the origin, while the coordinate frame of the second
box has position and orientation given by
p21 = R1^T pd + px R21 = R1^T R2The reason for providing
p21
and R21
in
factored form is so their components can be computed on demand, as
they may not all be needed before the test is decided.
For details on this algorithm, see pg 338 of Game Physics by David Eberly, or "OBBTree: A Hierarchichal Structure for Rapid Interference Detection", Gottschalk Lin & Manocha
public static final boolean isDisjoint(Vector3d hw1, Vector3d hw2, RotationMatrix3d R21, Vector3d p21)
hw1
and
hw2
are disjoint. The first box is assumed to be axis-aligned
and centered at the origin, while the coordinate frame of the second
box has position and orientation given by p21
and
R21
, respectively.
For details on this algorithm, see pg 338 of Game Physics by David Eberly, or "OBBTree: A Hierarchichal Structure for Rapid Interference Detection", Gottschalk Lin & Manocha