Class PhysicsWorld
- Namespace
- Game.Shared.Physics
- Assembly
- Game.dll
public static class PhysicsWorld
- Inheritance
-
PhysicsWorld
- Inherited Members
-
Properties
Simulation
public static Simulation Simulation { get; }
Property Value
- Simulation
Methods
CreateBody(in Transform, PhysicsShape)
public static PhysicsBody CreateBody(in Transform worldTransform, PhysicsShape shape)
Parameters
worldTransform Transform
shape PhysicsShape
Returns
- PhysicsBody
CreateKinematicBody(in Transform, PhysicsShape)
public static PhysicsBody CreateKinematicBody(in Transform worldTransform, PhysicsShape shape)
Parameters
worldTransform Transform
shape PhysicsShape
Returns
- PhysicsBody
CreateMeshShape(Buffer<Triangle>, float)
public static PhysicsShape CreateMeshShape(Buffer<Triangle> triangles, float mass = -1)
Parameters
triangles Buffer<Triangle>
mass float
Returns
- PhysicsShape
CreateMeshShape(CollisionMesh, float)
public static PhysicsShape CreateMeshShape(CollisionMesh collisionMesh, float mass = -1)
Parameters
collisionMesh CollisionMesh
mass float
Returns
- PhysicsShape
CreateMeshShape(Model, float)
public static PhysicsShape CreateMeshShape(Model model, float mass = -1)
Parameters
model Model
mass float
Returns
- PhysicsShape
CreateShape<TShape>(TShape, float)
public static PhysicsShape CreateShape<TShape>(TShape shape, float mass = 1) where TShape : unmanaged, IConvexShape
Parameters
shape TShape
mass float
Returns
- PhysicsShape
Type Parameters
TShape
CreateStaticBody(in Transform, PhysicsShape)
public static PhysicsBody CreateStaticBody(in Transform worldTransform, PhysicsShape shape)
Parameters
worldTransform Transform
shape PhysicsShape
Returns
- PhysicsBody
DebugDrawBody(PhysicsBody)
public static void DebugDrawBody(PhysicsBody body)
Parameters
body PhysicsBody
Init()
public static void Init()
Shutdown()
public static void Shutdown()
UpdateSimulation(float)
public static void UpdateSimulation(float deltaTime)
Parameters
deltaTime float