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.
Afficher le fichier Open project: gerich-home/box2dnet Class Usage Examples

Méthodes publiques

Свойство Type Description
Filter Filter
IsSensor bool
Proxies Box2D.Dynamics.FixtureProxy[]
ProxyCount int

Méthodes publiques

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

Méthodes protégées

Méthode Description
Synchronize ( BroadPhase broadPhase, Transform transform1, Transform transform2 ) : void

Internal method

Method Details

Create() public méthode

public Create ( Body body, FixtureDef def ) : void
body Body
def FixtureDef
Résultat void

CreateProxies() public méthode

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

Destroy() public méthode

public Destroy ( ) : void
Résultat void

DestroyProxies() public méthode

Internal method
public DestroyProxies ( BroadPhase broadPhase ) : void
broadPhase Box2D.Collision.Broadphase.BroadPhase
Résultat void

Dump() public méthode

Dump this fixture to the log file.
public Dump ( int bodyIndex ) : void
bodyIndex int
Résultat void

Fixture() public méthode

public Fixture ( ) : System
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 ( int childIndex ) : AABB
childIndex int
Résultat Box2D.Collision.AABB

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 Box2D.Collision.Shapes.MassData
Résultat void

Raycast() public méthode

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

Refilter() public méthode

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

Synchronize() protected méthode

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

TestPoint() public méthode

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

Property Details

Filter public_oe property

public Filter,Box2D.Dynamics Filter
Résultat Filter

IsSensor public_oe property

public bool IsSensor
Résultat bool

Proxies public_oe property

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

ProxyCount public_oe property

public int ProxyCount
Résultat int