C# Class 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.
Datei anzeigen Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
Filter Filter
IsSensor bool
Proxies Box2D.Dynamics.FixtureProxy[]
ProxyCount int

Public Methods

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

Protected Methods

Method Description
Synchronize ( BroadPhase broadPhase, Transform transform1, Transform transform2 ) : void

Internal method

Method Details

Create() public method

public Create ( Body body, FixtureDef def ) : void
body Body
def FixtureDef
return void

CreateProxies() public method

public CreateProxies ( BroadPhase broadPhase, Transform xf ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
xf Box2D.Common.Transform
return void

Destroy() public method

public Destroy ( ) : void
return void

DestroyProxies() public method

Internal method
public DestroyProxies ( BroadPhase broadPhase ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
return void

Dump() public method

Dump this fixture to the log file.
public Dump ( int bodyIndex ) : void
bodyIndex int
return void

Fixture() public method

public Fixture ( ) : System
return System

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 ( int childIndex ) : AABB
childIndex int
return Box2D.Collision.AABB

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 Box2D.Collision.Shapes.MassData
return void

Raycast() public method

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

Refilter() public method

Call this if you want to establish collision that was previously disabled by ContactFilter::ShouldCollide.
public Refilter ( ) : void
return void

Synchronize() protected method

Internal method
protected Synchronize ( BroadPhase broadPhase, Transform transform1, Transform transform2 ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
transform1 Box2D.Common.Transform
transform2 Box2D.Common.Transform
return void

TestPoint() public method

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

Property Details

Filter public_oe property

public Filter,Box2D.Dynamics Filter
return Filter

IsSensor public_oe property

public bool IsSensor
return bool

Proxies public_oe property

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

ProxyCount public_oe property

public int ProxyCount
return int