Table of Contents

Struct CollisionManifold

Namespace
Jitter2.Collision
Assembly
Jitter2.dll

Represents a contact manifold between two convex shapes.

public struct CollisionManifold
Inherited Members

Remarks

The manifold is constructed from support points sampled around the collision normal, then reduced to a small contact set suitable for the solver.

Properties

Count

Gets the number of contact points in the manifold.

public readonly int Count { get; }

Property Value

int

ManifoldA

Gets the contact points on shape A.

public Span<JVector> ManifoldA { get; }

Property Value

Span<JVector>

ManifoldB

Gets the contact points on shape B.

public Span<JVector> ManifoldB { get; }

Property Value

Span<JVector>

Methods

BuildManifold<Ta, Tb>(Ta, Tb, in JQuaternion, in JQuaternion, in JVector, in JVector, in JVector, in JVector, in JVector)

Builds the contact manifold between two shapes given their transforms and initial contact.

public void BuildManifold<Ta, Tb>(Ta shapeA, Tb shapeB, in JQuaternion quaternionA, in JQuaternion quaternionB, in JVector positionA, in JVector positionB, in JVector pA, in JVector pB, in JVector normal) where Ta : ISupportMappable where Tb : ISupportMappable

Parameters

shapeA Ta

The first shape.

shapeB Tb

The second shape.

quaternionA JQuaternion

Orientation of shape A.

quaternionB JQuaternion

Orientation of shape B.

positionA JVector

Position of shape A.

positionB JVector

Position of shape B.

pA JVector

Initial contact point on shape A.

pB JVector

Initial contact point on shape B.

normal JVector

The collision normal (from B to A).

Type Parameters

Ta

The type of support shape A.

Tb

The type of support shape B.

BuildManifold<Ta, Tb>(Ta, Tb, in JVector, in JVector, in JVector)

Builds the contact manifold between two rigid body shapes using their current transforms.

public void BuildManifold<Ta, Tb>(Ta shapeA, Tb shapeB, in JVector pA, in JVector pB, in JVector normal) where Ta : RigidBodyShape where Tb : RigidBodyShape

Parameters

shapeA Ta

The first rigid body shape.

shapeB Tb

The second rigid body shape.

pA JVector

Initial contact point on shape A.

pB JVector

Initial contact point on shape B.

normal JVector

The collision normal (from B to A).

Type Parameters

Ta

The type of shape A.

Tb

The type of shape B.