C# Class Project290.Physics.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
AfterCollision AfterCollisionEventHandler
BeforeCollision BeforeCollisionEventHandler
OnCollision OnCollisionEventHandler
OnSeparation OnSeparationEventHandler
Proxies Project290.Physics.Dynamics.FixtureProxy[]
ProxyCount int

Méthodes publiques

Méthode Description
Dispose ( ) : void
Fixture ( Body body, Shape shape ) : System
Fixture ( Body body, Shape shape, Object userData ) : System
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

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.

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

Cast a ray against this Shape.

TestPoint ( 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
Synchronize ( BroadPhase broadPhase, Transform &transform1, Transform &transform2 ) : void

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Fixture() public méthode

public Fixture ( Body body, Shape shape ) : System
body Body
shape Project290.Physics.Collision.Shapes.Shape
Résultat System

Fixture() public méthode

public Fixture ( Body body, Shape shape, Object userData ) : System
body Body
shape Project290.Physics.Collision.Shapes.Shape
userData Object
Résultat System

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 Project290.Physics.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
Résultat Project290.Physics.Collision.Shapes.MassData

RayCast() public méthode

Cast a ray against this Shape.
public RayCast ( RayCastOutput &output, RayCastInput &input, int childIndex ) : bool
output Project290.Physics.Collision.RayCastOutput The ray-cast results.
input Project290.Physics.Collision.RayCastInput The ray-cast input parameters.
childIndex int Index of the child.
Résultat bool

TestPoint() public méthode

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

Property Details

AfterCollision public_oe property

Fires after two shapes has collided and are solved. This gives you a chance to get the impact force.
public AfterCollisionEventHandler AfterCollision
Résultat AfterCollisionEventHandler

BeforeCollision public_oe property

Fires when two fixtures are close to each other. Due to how the broadphase works, this can be quite inaccurate as shapes are approximated using AABBs.
public BeforeCollisionEventHandler BeforeCollision
Résultat BeforeCollisionEventHandler

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 OnCollisionEventHandler OnCollision
Résultat OnCollisionEventHandler

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 OnSeparationEventHandler OnSeparation
Résultat OnSeparationEventHandler

Proxies public_oe property

public FixtureProxy[],Project290.Physics.Dynamics Proxies
Résultat Project290.Physics.Dynamics.FixtureProxy[]

ProxyCount public_oe property

public int ProxyCount
Résultat int