Class BepuPhysicsSetup
Bepu as the physics engine of a SceneSetup: CreatePrimitive gives its entities a
BodyComponent (a Body2DComponent for a flat shape) with the collider fitted to the
shape, and the grounds a StaticComponent. Chosen with UseBepu<T>(T).
public sealed class BepuPhysicsSetup : PhysicsSetupBase
- Inheritance
-
BepuPhysicsSetup
- Inherited Members
Remarks
A Bepu3DPhysicsOptions or Bepu2DPhysicsOptions passed to CreatePrimitive is read
back here, so Component and Mass
mean what they mean on AddBepuPhysics(Entity, Primitive3D, Bepu3DPhysicsOptions) and AddBepuPhysics(Entity, Primitive2D, Bepu2DPhysicsOptions).
Methods
AddBody(Entity, Primitive2D, Primitive2DEntityOptions?)
Attaches a dynamic body with the collider that matches shape.
public override void AddBody(Entity entity, Primitive2D shape, Primitive2DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive2DThe shape the model was built from.
optionsPrimitive2DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.
AddBody(Entity, Primitive3D, Primitive3DEntityOptions?)
Attaches a dynamic body with the collider that matches shape.
public override void AddBody(Entity entity, Primitive3D shape, Primitive3DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive3DThe shape the model was built from.
optionsPrimitive3DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.
AddStatic(Entity, Primitive2D, Primitive2DEntityOptions?)
Attaches a static collider that matches shape: a ground, a wall.
public override void AddStatic(Entity entity, Primitive2D shape, Primitive2DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive2DThe shape the model was built from.
optionsPrimitive2DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.
AddStatic(Entity, Primitive3D, Primitive3DEntityOptions?)
Attaches a static collider that matches shape: a ground, a wall.
public override void AddStatic(Entity entity, Primitive3D shape, Primitive3DEntityOptions? options)
Parameters
entityEntityThe entity with the shape's model.
shapePrimitive3DThe shape the model was built from.
optionsPrimitive3DEntityOptionsThe options the entity was created with; a package reads its own derived options back from them.