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
Afficher le fichier Open project: scastle/Solitude Class Usage Examples

Méthodes publiques

Свойство Type Description
OnCollision CollisionEventHandler
OnSeparation SeparationEventHandler
PostSolve Action
Proxies FarseerPhysics.Dynamics.FixtureProxy[]
ProxyCount int

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat void

GetMassData() public méthode

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.
Résultat void

IgnoreCollisionWith() public méthode

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

IsFixtureIgnored() public méthode

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

RayCast() public méthode

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.
Résultat bool

RestoreCollisionWith() public méthode

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

TestPoint() public méthode

Test a point for containment in this fixture.
public TestPoint ( System.Vector2 &point ) : bool
point System.Vector2 A point in world coordinates.
Résultat 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
Résultat 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
Résultat SeparationEventHandler

PostSolve public_oe property

public Action PostSolve
Résultat Action

Proxies public_oe property

public FixtureProxy[],FarseerPhysics.Dynamics Proxies
Résultat FarseerPhysics.Dynamics.FixtureProxy[]

ProxyCount public_oe property

public int ProxyCount
Résultat int