Module org.dyn4j
Package org.dyn4j.collision.broadphase
Class CollisionBodyAABBProducer<T extends CollisionBody<?>>
- Object
-
- CollisionBodyAABBProducer<T>
-
- Type Parameters:
T
- theCollisionBody
type
- All Implemented Interfaces:
AABBProducer<T>
public final class CollisionBodyAABBProducer<T extends CollisionBody<?>> extends Object implements AABBProducer<T>
AnAABBProducer
forCollisionBody
's which produces a tight fitting AABB based of the current state of the body.- Since:
- 4.1.0
- Version:
- 4.1.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description CollisionBodyAABBProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AABB
compute(T object)
Returns a new AABB for the given object.void
compute(T object, AABB result)
Updates the given AABB with the AABB for the given object.
-
-
-
Method Detail
-
compute
public AABB compute(T object)
Description copied from interface:AABBProducer
Returns a new AABB for the given object.- Specified by:
compute
in interfaceAABBProducer<T extends CollisionBody<?>>
- Parameters:
object
- the object- Returns:
AABB
-
compute
public void compute(T object, AABB result)
Description copied from interface:AABBProducer
Updates the given AABB with the AABB for the given object.- Specified by:
compute
in interfaceAABBProducer<T extends CollisionBody<?>>
- Parameters:
object
- the objectresult
- the AABB to update
-
-