Module org.dyn4j
Package org.dyn4j.world.result
Class DetectResult<T extends CollisionBody<E>,E extends Fixture>
- Object
-
- DetectResult<T,E>
-
- Type Parameters:
T
- theCollisionBody
typeE
- theFixture
type
- All Implemented Interfaces:
Copyable<DetectResult<T,E>>
- Direct Known Subclasses:
ConvexCastResult
,ConvexDetectResult
,RaycastResult
public class DetectResult<T extends CollisionBody<E>,E extends Fixture> extends Object implements Copyable<DetectResult<T,E>>
Represents a reusable result for query-based collision detection.- Since:
- 4.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Modifier Constructor Description DetectResult()
Default constructor.protected
DetectResult(T body, E fixture)
Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DetectResult<T,E>
copy()
Returns a deep copy of this object.void
copy(DetectResult<T,E> result)
Copies (deep) the given result to this result.T
getBody()
Returns the body.E
getFixture()
Returns the fixture.void
setBody(T body)
Sets the body.void
setFixture(E fixture)
Sets the fixture.
-
-
-
Field Detail
-
body
protected T extends CollisionBody<E> body
The body
-
-
Method Detail
-
getBody
public T getBody()
Returns the body.- Returns:
- T
-
getFixture
public E getFixture()
Returns the fixture.- Returns:
- E
-
setBody
public void setBody(T body)
Sets the body.- Parameters:
body
- the body
-
setFixture
public void setFixture(E fixture)
Sets the fixture.- Parameters:
fixture
- the fixture
-
copy
public void copy(DetectResult<T,E> result)
Copies (deep) the given result to this result.- Parameters:
result
- the result to copy
-
copy
public DetectResult<T,E> copy()
Description copied from interface:Copyable
Returns a deep copy of this object.- Specified by:
copy
in interfaceCopyable<T extends CollisionBody<E>>
- Returns:
- T
-
-