Table of Contents

Class PhysicsHandler2D

Namespace
LibGFX.Physics
Assembly
LibGFX.dll

Represents a physics handler for 2D physics

public class PhysicsHandler2D : PhysicsHandler
Inheritance
PhysicsHandler2D
Inherited Members

Constructors

PhysicsHandler2D(Vector2)

Creates a new physics handler

public PhysicsHandler2D(Vector2 gravity)

Parameters

gravity Vector2

Properties

PhysicsWorld

The physics world

public DiscreteDynamicsWorld PhysicsWorld { get; set; }

Property Value

DiscreteDynamicsWorld

Methods

DebugDraw(IRenderDevice)

Debug draws the physics handler

public override void DebugDraw(IRenderDevice renderer)

Parameters

renderer IRenderDevice

GetDebugDrawer()

Gets the debug drawer

public override DebugDrawer GetDebugDrawer()

Returns

DebugDrawer

HasDebugDrawer()

Determines if the physics handler has a debug drawer

public override bool HasDebugDrawer()

Returns

bool

ManageElement(PhysicsBehavior, int, int)

Adds a physics behavior to the physics world

public override void ManageElement(PhysicsBehavior physicsBehavior, int collisionGroup = -1, int collisionMask = -1)

Parameters

physicsBehavior PhysicsBehavior
collisionGroup int
collisionMask int

Process(BaseScene)

Processes the physics world

public override void Process(BaseScene scene)

Parameters

scene BaseScene

RemoveElement(PhysicsBehavior)

Removes a physics behavior from the physics world

public override void RemoveElement(PhysicsBehavior physicsBehavior)

Parameters

physicsBehavior PhysicsBehavior

SetDebugDrawer(DebugDrawer)

Sets the debug drawer

public override void SetDebugDrawer(DebugDrawer debugDrawer)

Parameters

debugDrawer DebugDrawer