Package org.jbox2d.collision
Class Manifold
- java.lang.Object
-
- org.jbox2d.collision.Manifold
-
public class Manifold extends java.lang.Object
A manifold for two touching convex shapes. Box2D supports multiple types of contact:- clip point versus plane with radius
- point versus point with radius (circles)
- e_circles: the local center of circleA
- e_faceA: the center of faceA
- e_faceB: the center of faceB
- e_circles: not used
- e_faceA: the normal on polygonA
- e_faceB: the normal on polygonB
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Manifold.ManifoldType
-
Field Summary
Fields Modifier and Type Field Description Vec2
localNormal
not use for Type::e_pointsVec2
localPoint
usage depends on manifold typeint
pointCount
The number of manifold points.ManifoldPoint[]
points
The points of contact.Manifold.ManifoldType
type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
set(Manifold cp)
copies this manifold from the given one
-
-
-
Field Detail
-
points
public final ManifoldPoint[] points
The points of contact.
-
localNormal
public final Vec2 localNormal
not use for Type::e_points
-
localPoint
public final Vec2 localPoint
usage depends on manifold type
-
type
public Manifold.ManifoldType type
-
pointCount
public int pointCount
The number of manifold points.
-
-
Constructor Detail
-
Manifold
public Manifold()
creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints.
-
Manifold
public Manifold(Manifold other)
Creates this manifold as a copy of the other- Parameters:
other
-
-
-
Method Detail
-
set
public void set(Manifold cp)
copies this manifold from the given one- Parameters:
cp
- manifold to copy from
-
-