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

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

Свойство Тип Описание
Filter Filter
IsSensor bool
Proxies Box2D.Dynamics.FixtureProxy[]
ProxyCount int

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

Метод Описание
Create ( Body body, FixtureDef def ) : void
CreateProxies ( BroadPhase broadPhase, Transform xf ) : void
Destroy ( ) : void
DestroyProxies ( BroadPhase broadPhase ) : void

Internal method

Dump ( int bodyIndex ) : void

Dump this fixture to the log file.

Fixture ( ) : System
GetAABB ( int childIndex ) : AABB

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.

Raycast ( RayCastOutput output, RayCastInput input, int childIndex ) : bool

Cast a ray against this shape.

Refilter ( ) : void

Call this if you want to establish collision that was previously disabled by ContactFilter::ShouldCollide.

TestPoint ( Vec2 p ) : bool

Test a point for containment in this fixture. This only works for convex shapes.

Защищенные методы

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

Internal method

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

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

public Create ( Body body, FixtureDef def ) : void
body Body
def FixtureDef
Результат void

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

public CreateProxies ( BroadPhase broadPhase, Transform xf ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
xf Box2D.Common.Transform
Результат void

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

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

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

Internal method
public DestroyProxies ( BroadPhase broadPhase ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
Результат void

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

Dump this fixture to the log file.
public Dump ( int bodyIndex ) : void
bodyIndex int
Результат void

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

public Fixture ( ) : System
Результат 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 ( int childIndex ) : AABB
childIndex int
Результат Box2D.Collision.AABB

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

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

Cast a ray against this shape.
public Raycast ( RayCastOutput output, RayCastInput input, int childIndex ) : bool
output Box2D.Collision.RayCastOutput the ray-cast results.
input Box2D.Collision.RayCastInput the ray-cast input parameters.
childIndex int
Результат bool

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

Call this if you want to establish collision that was previously disabled by ContactFilter::ShouldCollide.
public Refilter ( ) : void
Результат void

Synchronize() защищенный Метод

Internal method
protected Synchronize ( BroadPhase broadPhase, Transform transform1, Transform transform2 ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
transform1 Box2D.Common.Transform
transform2 Box2D.Common.Transform
Результат void

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

Test a point for containment in this fixture. This only works for convex shapes.
public TestPoint ( Vec2 p ) : bool
p Box2D.Common.Vec2 a point in world coordinates.
Результат bool

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

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

public Filter,Box2D.Dynamics Filter
Результат Filter

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

public bool IsSensor
Результат bool

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

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

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

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