C# Class 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.
Inheritance: IDisposable
Mostrar archivo Open project: scastle/Solitude Class Usage Examples

Public Properties

Property Type Description
OnCollision CollisionEventHandler
OnSeparation SeparationEventHandler
PostSolve Action
Proxies FarseerPhysics.Dynamics.FixtureProxy[]
ProxyCount int

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

GetAABB() public method

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.
return void

GetMassData() public method

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.
return void

IgnoreCollisionWith() public method

Ignores collisions between this fixture and the provided fixture.
public IgnoreCollisionWith ( Fixture fixture ) : void
fixture Fixture The fixture.
return void

IsFixtureIgnored() public method

Determines whether collisions are ignored between this fixture and the provided fixture.
public IsFixtureIgnored ( Fixture fixture ) : bool
fixture Fixture The fixture.
return bool

RayCast() public method

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.
return bool

RestoreCollisionWith() public method

Restores collisions between this fixture and the provided fixture.
public RestoreCollisionWith ( Fixture fixture ) : void
fixture Fixture The fixture.
return void

TestPoint() public method

Test a point for containment in this fixture.
public TestPoint ( System.Vector2 &point ) : bool
point System.Vector2 A point in world coordinates.
return bool

Property Details

OnCollision public_oe property

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
return CollisionEventHandler

OnSeparation public_oe property

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
return SeparationEventHandler

PostSolve public_oe property

public Action PostSolve
return Action

Proxies public_oe property

public FixtureProxy[],FarseerPhysics.Dynamics Proxies
return FarseerPhysics.Dynamics.FixtureProxy[]

ProxyCount public_oe property

public int ProxyCount
return int