Class Contact
- Namespace
- Alis.Core.Physic.Dynamics.Contacts
- Assembly
- Alis.dll
The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.
public class ContactInheritance
Derived
Inherited Members
Constructors
Contact(Fixture, int, Fixture, int)
Initializes a new instance of the Alis.Core.Physic.Dynamics.Contacts.Contact class
protected Contact(Fixture fA, int indexA, Fixture fB, int indexB)Parameters
Fields
Manifold
Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.
public Manifold ManifoldField Value
_edge
The edge shape
private static readonly EdgeShape _edgeField Value
_nodeA
The contact edge
internal ContactEdge _nodeAField Value
_nodeB
The contact edge
internal ContactEdge _nodeBField Value
_registers
The not supported
private static readonly Contact.ContactType[,] _registersField Value
_toi
The toi
internal float _toiField Value
_toiCount
The toi count
internal int _toiCountField Value
_type
The type
private Contact.ContactType _typeField Value
Properties
ChildIndexA
Get the child primitive index for fixture A.
public int ChildIndexA { get; internal set; }Property Value
ChildIndexB
Get the child primitive index for fixture B.
public int ChildIndexB { get; internal set; }Property Value
Enabled
public bool Enabled { get; set; }Property Value
FilterFlag
Gets or sets the value of the filter flag
internal bool FilterFlag { get; set; }Property Value
FixtureA
Gets or sets the value of the fixture a
public Fixture FixtureA { get; internal set; }Property Value
FixtureB
Gets or sets the value of the fixture b
public Fixture FixtureB { get; internal set; }Property Value
Friction
Gets or sets the value of the friction
public float Friction { get; set; }Property Value
IsTouching
Determines whether this contact is touching.
public bool IsTouching { get; set; }Property Value
IslandFlag
Gets or sets the value of the island flag
internal bool IslandFlag { get; set; }Property Value
Next
Get the next contact in the world's contact list.
public Contact Next { get; internal set; }Property Value
Prev
Get the previous contact in the world's contact list.
public Contact Prev { get; internal set; }Property Value
Restitution
Gets or sets the value of the restitution
public float Restitution { get; set; }Property Value
TOIFlag
Gets or sets the value of the toi flag
internal bool TOIFlag { get; set; }Property Value
TangentSpeed
public float TangentSpeed { get; set; }Property Value
Methods
Create(ContactManager, Fixture, int, Fixture, int)
Creates the contact manager
internal static Contact Create(ContactManager contactManager, Fixture fixtureA, int indexA, Fixture fixtureB, int indexB)Parameters
contactManagerContactManager-
The contact manager
fixtureAFixture-
The fixture
indexAint-
The index
fixtureBFixture-
The fixture
indexBint-
The index
Returns
- Contact
-
The
Destroy()
Destroys this instance
internal void Destroy()Evaluate(ref Manifold, ref Transform, ref Transform)
Evaluate this contact with your own manifold and transforms.
private void Evaluate(ref Manifold manifold, ref Transform transformA, ref Transform transformB)Parameters
manifoldManifold-
The manifold.
transformATransform-
The first transform.
transformBTransform-
The second transform.
GetWorldManifold(out Vector2, out FixedArray2<Vector2>)
Gets the world manifold.
public void GetWorldManifold(out Vector2 normal, out FixedArray2<Vector2> points)Parameters
normalVector2pointsFixedArray2<Vector2>
Reset(Fixture, int, Fixture, int)
Resets the f a
private void Reset(Fixture fA, int indexA, Fixture fB, int indexB)Parameters
ResetFriction()
Resets the friction
public void ResetFriction()ResetRestitution()
Resets the restitution
public void ResetRestitution()Update(ContactManager)
Update the contact manifold and touching status. Note: do not assume the fixture AABBs are overlapping or are valid.
internal void Update(ContactManager contactManager)Parameters
contactManagerContactManager-
The contact manager.