Class PhysicsHandler2D
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
gravityVector2
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
rendererIRenderDevice
GetDebugDrawer()
Gets the debug drawer
public override DebugDrawer GetDebugDrawer()
Returns
HasDebugDrawer()
Determines if the physics handler has a debug drawer
public override bool HasDebugDrawer()
Returns
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
physicsBehaviorPhysicsBehaviorcollisionGroupintcollisionMaskint
Process(BaseScene)
Processes the physics world
public override void Process(BaseScene scene)
Parameters
sceneBaseScene
RemoveElement(PhysicsBehavior)
Removes a physics behavior from the physics world
public override void RemoveElement(PhysicsBehavior physicsBehavior)
Parameters
physicsBehaviorPhysicsBehavior
SetDebugDrawer(DebugDrawer)
Sets the debug drawer
public override void SetDebugDrawer(DebugDrawer debugDrawer)
Parameters
debugDrawerDebugDrawer