- Object
-
- Manifold
-
public class Manifold extends Object implements Shiftable, Copyable<Manifold>
Represents a contactManifold
for a collision between twoConvex
Shape
s.A
Manifold
has a list ofManifoldPoint
s for a givenPenetration
normal. In two dimensions there will only be 1 or 2 contact points.All
ManifoldPoint
s are in world space coordinates.- Since:
- 1.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Constructor Summary
Constructors Constructor Description Manifold()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears theManifold
information.Manifold
copy()
Returns a deep copy of this object.void
copy(Manifold manifold)
Vector2
getNormal()
Returns the normal.List<ManifoldPoint>
getPoints()
Returns the list of manifold points.void
setNormal(Vector2 normal)
Sets the manifold normal.void
setPoints(List<ManifoldPoint> points)
Sets the point list of thisManifold
.void
shift(Vector2 shift)
Translates the object to match the given coordinate shift.String
toString()
-
-
-
Method Detail
-
clear
public void clear()
Clears theManifold
information.
-
getPoints
public List<ManifoldPoint> getPoints()
Returns the list of manifold points.- Returns:
- List<
ManifoldPoint
>
-
setPoints
public void setPoints(List<ManifoldPoint> points)
Sets the point list of thisManifold
.- Parameters:
points
- the point list
-
setNormal
public void setNormal(Vector2 normal)
Sets the manifold normal.Must be normalized.
- Parameters:
normal
- the manifold normal
-
copy
public void copy(Manifold manifold)
- Parameters:
manifold
- the manifold to copy- Since:
- 4.0.0
-
shift
public void shift(Vector2 shift)
Description copied from interface:Shiftable
Translates the object to match the given coordinate shift.
-
-