C# Класс FarseerPhysics.Dynamics.Contacts.Contact

The public 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
enabled bool
fixtureA Fixture
fixtureB Fixture
friction float
manifold FarseerPhysics.Collision.Manifold
restitution float
tangentSpeed float

Открытые методы

Метод Описание
Contact ( Fixture fA, int indexA, Fixture fB, int indexB ) : System.Collections.Generic
evaluate ( Manifold &manifold, Transform &transformA, Transform &transformB ) : void

Evaluate this contact with your own manifold and transforms.

getWorldManifold ( System.Vector2 &normal, FixedArray2 &points ) : void

Gets the world manifold.

reset ( Fixture fA, int indexA, Fixture fB, int indexB ) : void
resetFriction ( ) : void
resetRestitution ( ) : void

Приватные методы

Метод Описание
create ( Fixture fixtureA, int indexA, Fixture fixtureB, int indexB ) : Contact
destroy ( ) : void
update ( ContactManager contactManager ) : void

Update the contact manifold and touching status. Note: do not assume the fixture AABBs are overlapping or are valid.

Описание методов

Contact() публичный Метод

public Contact ( Fixture fA, int indexA, Fixture fB, int indexB ) : System.Collections.Generic
fA Fixture
indexA int
fB Fixture
indexB int
Результат System.Collections.Generic

evaluate() публичный Метод

Evaluate this contact with your own manifold and transforms.
public evaluate ( Manifold &manifold, Transform &transformA, Transform &transformB ) : void
manifold FarseerPhysics.Collision.Manifold The manifold.
transformA Transform The first transform.
transformB Transform The second transform.
Результат void

getWorldManifold() публичный Метод

Gets the world manifold.
public getWorldManifold ( System.Vector2 &normal, FixedArray2 &points ) : void
normal System.Vector2
points FixedArray2
Результат void

reset() публичный Метод

public reset ( Fixture fA, int indexA, Fixture fB, int indexB ) : void
fA Fixture
indexA int
fB Fixture
indexB int
Результат void

resetFriction() публичный Метод

public resetFriction ( ) : void
Результат void

resetRestitution() публичный Метод

public resetRestitution ( ) : void
Результат void

Описание свойств

enabled публичное свойство

Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the current time step (or sub-step in continuous collisions). NOTE: If you are setting Enabled to a constant true or false, use the explicit Enable() or Disable() functions instead to save the CPU from doing a branch operation.
public bool enabled
Результат bool

fixtureA публичное свойство

public Fixture fixtureA
Результат Fixture

fixtureB публичное свойство

public Fixture fixtureB
Результат Fixture

friction публичное свойство

public float friction
Результат float

manifold публичное свойство

Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.
public Manifold,FarseerPhysics.Collision manifold
Результат FarseerPhysics.Collision.Manifold

restitution публичное свойство

public float restitution
Результат float

tangentSpeed публичное свойство

public float tangentSpeed
Результат float