C# Класс FarseerPhysics.Dynamics.Fixture

A fixture is used to attach a Shape to a body for collision detection. A fixture inherits its transform from its parent. Fixtures hold additional non-geometric data such as friction, collision filters, etc. Fixtures are created via Body.CreateFixture. Warning: You cannot reuse fixtures.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
OnCollision CollisionEventHandler
OnSeparation SeparationEventHandler
PostSolve Action
Proxies FarseerPhysics.Dynamics.FixtureProxy[]
ProxyCount int

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

Метод Описание
GetAABB ( AABB &aabb, int childIndex ) : void

Get the fixture's AABB. This AABB may be enlarge and/or stale. If you need a more accurate AABB, compute it using the Shape and the body transform.

GetMassData ( MassData &massData ) : void

Get the mass data for this fixture. The mass data is based on the density and the Shape. The rotational inertia is about the Shape's origin.

IgnoreCollisionWith ( Fixture fixture ) : void

Ignores collisions between this fixture and the provided fixture.

IsFixtureIgnored ( Fixture fixture ) : bool

Determines whether collisions are ignored between this fixture and the provided fixture.

RayCast ( RayCastOutput &output, RayCastInput &input, int childIndex ) : bool

Cast a ray against this Shape.

RestoreCollisionWith ( Fixture fixture ) : void

Restores collisions between this fixture and the provided fixture.

TestPoint ( System.Vector2 &point ) : bool

Test a point for containment in this fixture.

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

Метод Описание
CreateProxies ( BroadPhase broadPhase, Transform &xf ) : void
Destroy ( ) : void
DestroyProxies ( BroadPhase broadPhase ) : void
FilterChanged ( ) : void
Fixture ( Body body, Shape shape, float density ) : System
Synchronize ( BroadPhase broadPhase, Transform &transform1, Transform &transform2 ) : void

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

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

Get the fixture's AABB. This AABB may be enlarge and/or stale. If you need a more accurate AABB, compute it using the Shape and the body transform.
public GetAABB ( AABB &aabb, int childIndex ) : void
aabb FarseerPhysics.Collision.AABB The aabb.
childIndex int Index of the child.
Результат void

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

Get the mass data for this fixture. The mass data is based on the density and the Shape. The rotational inertia is about the Shape's origin.
public GetMassData ( MassData &massData ) : void
massData FarseerPhysics.Collision.Shapes.MassData The mass data.
Результат void

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

Ignores collisions between this fixture and the provided fixture.
public IgnoreCollisionWith ( Fixture fixture ) : void
fixture Fixture The fixture.
Результат void

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

Determines whether collisions are ignored between this fixture and the provided fixture.
public IsFixtureIgnored ( Fixture fixture ) : bool
fixture Fixture The fixture.
Результат bool

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

Cast a ray against this Shape.
public RayCast ( RayCastOutput &output, RayCastInput &input, int childIndex ) : bool
output FarseerPhysics.Collision.RayCastOutput The ray-cast results.
input FarseerPhysics.Collision.RayCastInput The ray-cast input parameters.
childIndex int Index of the child.
Результат bool

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

Restores collisions between this fixture and the provided fixture.
public RestoreCollisionWith ( Fixture fixture ) : void
fixture Fixture The fixture.
Результат void

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

Test a point for containment in this fixture.
public TestPoint ( System.Vector2 &point ) : bool
point System.Vector2 A point in world coordinates.
Результат bool

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

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

Fires when two shapes collide and a contact is created between them. Note that the first fixture argument is always the fixture that the delegate is subscribed to.
public CollisionEventHandler OnCollision
Результат CollisionEventHandler

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

Fires when two shapes separate and a contact is removed between them. Note that the first fixture argument is always the fixture that the delegate is subscribed to.
public SeparationEventHandler OnSeparation
Результат SeparationEventHandler

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

public Action PostSolve
Результат Action

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

public FixtureProxy[],FarseerPhysics.Dynamics Proxies
Результат FarseerPhysics.Dynamics.FixtureProxy[]

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

public int ProxyCount
Результат int