C# Class Box2D.Collision.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.
Mostrar archivo Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
LocalNormal Box2D.Common.Vec2
LocalPoint Box2D.Common.Vec2
PointCount int
Points Box2D.Collision.ManifoldPoint[]
Type ManifoldType

Public Methods

Method Description
Manifold ( ) : Box2D.Common

creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints.

Manifold ( Manifold other ) : Box2D.Common

Creates this manifold as a copy of the other

Set ( Manifold cp ) : void

copies this manifold from the given one

Method Details

Manifold() public method

creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints.
public Manifold ( ) : Box2D.Common
return Box2D.Common

Manifold() public method

Creates this manifold as a copy of the other
public Manifold ( Manifold other ) : Box2D.Common
other Manifold
return Box2D.Common

Set() public method

copies this manifold from the given one
public Set ( Manifold cp ) : void
cp Manifold manifold to copy from
return void

Property Details

LocalNormal public_oe property

not use for Type::e_points
public Vec2,Box2D.Common LocalNormal
return Box2D.Common.Vec2

LocalPoint public_oe property

usage depends on manifold type
public Vec2,Box2D.Common LocalPoint
return Box2D.Common.Vec2

PointCount public_oe property

The number of manifold points.
public int PointCount
return int

Points public_oe property

The points of contact.
public ManifoldPoint[],Box2D.Collision Points
return Box2D.Collision.ManifoldPoint[]

Type public_oe property

public ManifoldType Type
return ManifoldType