C# Класс 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.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
AfterCollision AfterCollisionEventHandler
BeforeCollision BeforeCollisionEventHandler
OnCollision OnCollisionEventHandler
OnSeparation OnSeparationEventHandler
Proxies Project290.Physics.Dynamics.FixtureProxy[]
ProxyCount int

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

Метод Описание
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.

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

Метод Описание
CreateProxies ( BroadPhase broadPhase, Transform &xf ) : void
Destroy ( ) : void
DestroyProxies ( BroadPhase broadPhase ) : void
Synchronize ( BroadPhase broadPhase, Transform &transform1, Transform &transform2 ) : void

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

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

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

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

public Fixture ( Body body, Shape shape ) : System
body Body
shape Project290.Physics.Collision.Shapes.Shape
Результат System

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

public Fixture ( Body body, Shape shape, Object userData ) : System
body Body
shape Project290.Physics.Collision.Shapes.Shape
userData Object
Результат System

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 Project290.Physics.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
Результат Project290.Physics.Collision.Shapes.MassData

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

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.
Результат bool

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

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

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

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

Fires after two shapes has collided and are solved. This gives you a chance to get the impact force.
public AfterCollisionEventHandler AfterCollision
Результат AfterCollisionEventHandler

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

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
Результат BeforeCollisionEventHandler

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 OnCollisionEventHandler OnCollision
Результат OnCollisionEventHandler

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 OnSeparationEventHandler OnSeparation
Результат OnSeparationEventHandler

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

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

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

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