| GeometryHelperHaveContact Method (Aabb, Aabb, Vector3F) |
Determines whether a given AABB is hit by a moving AABB.
Namespace: DigitalRune.GeometryAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static bool HaveContact(
Aabb aabbA,
Aabb aabbB,
Vector3F movementB
)
Public Shared Function HaveContact (
aabbA As Aabb,
aabbB As Aabb,
movementB As Vector3F
) As Boolean
public:
static bool HaveContact(
Aabb aabbA,
Aabb aabbB,
Vector3F movementB
)
static member HaveContact :
aabbA : Aabb *
aabbB : Aabb *
movementB : Vector3F -> bool
Parameters
- aabbA
- Type: DigitalRune.Geometry.ShapesAabb
The axis-aligned bounding box. - aabbB
- Type: DigitalRune.Geometry.ShapesAabb
The moving axis-aligned bounding box. - movementB
- Type: DigitalRune.Mathematics.AlgebraVector3F
The movement vector of aabbB. aabbB is given at its
start position. The movement vector is added to the start position of
aabbB to define its end position.
Return Value
Type:
Boolean if the moving AABB (
aabbB) overlaps the static
AABB (
aabbA) at any time during its movement.
Remarks
This method does not take rotations into account, only linear movement. If the AABBs
represent two rotating objects, make sure that the AABBs are large enough to contain the
rotating objects for all rotation angles.
Remember: A situation where both AABBs are moving can always be re-framed as one static AABB
and the other AABB moving relative to the static AABB.
See Also