Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class Manifold
- Object
- Manifold
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)
The local point usage depends on the manifold type:
e_circles: the local center of circleA
e_faceA: the center of faceA
e_faceB: the center of faceB
Similarly the local normal usage:
e_circles: not used
e_faceA: the normal on polygonA
e_faceB: the normal on polygonB
We store contacts in this way so that position correction can account for movement, which is critical for continuous physics. All contact scenarios must be expressed in one of these types. This structure is stored across time steps, so we keep it small.
Nested types
enum Manifold.ManifoldType |
Fields
public final ManifoldPoint[] points | The points of contact. |
public final Vec2 localNormal | not use for Type::e_points |
public final Vec2 localPoint | usage depends on manifold type |
public Manifold.ManifoldType type | |
public int pointCount | The number of manifold points. |
Constructors
public Manifold() | creates a manifold with 0 points, with it’s points array full of instantiated ManifoldPoints. |
public Manifold(Manifold other) | Creates this manifold as a copy of the other |
Methods
public void set(Manifold cp) | copies this manifold from the given one |
Inherited methods
Field details
points
public final ManifoldPoint[] pointslocalNormal
public final Vec2 localNormallocalPoint
public final Vec2 localPointtype
public Manifold.ManifoldType typepointCount
public int pointCountConstructor details
Manifold
public Manifold()Manifold
public Manifold(Manifold other)Method details
set
public void set(Manifold cp)Parameters
cpManifold- manifold to copy from