50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using Engine.Core;
|
|
|
|
namespace Engine.Physics2D;
|
|
|
|
/// <summary>
|
|
/// Represents a 2D rigid body in the engine.
|
|
/// </summary>
|
|
public interface IRigidBody2D : IBehaviour2D
|
|
{
|
|
/// <summary>
|
|
/// The physics material of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
IPhysicsMaterial2D Material { get; set; }
|
|
|
|
/// <summary>
|
|
/// The velocity of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
Vector2D Velocity { get; set; }
|
|
|
|
/// <summary>
|
|
/// The angular velocity (rotation rate) of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
float AngularVelocity { get; set; }
|
|
|
|
/// <summary>
|
|
/// The mass of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
float Mass { get; set; }
|
|
|
|
/// <summary>
|
|
/// The inverse mass (1 / Mass) of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
float InverseMass { get; }
|
|
|
|
/// <summary>
|
|
/// The Invertia of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
float Inertia { get; }
|
|
|
|
/// <summary>
|
|
/// The inverse Invertia (1 / Invertia) of the <see cref="IRigidBody2D"/>.
|
|
/// </summary>
|
|
float InverseInertia { get; }
|
|
|
|
/// <summary>
|
|
/// The value indicating whether the <see cref="IRigidBody2D"/> is static/immovable.
|
|
/// </summary>
|
|
bool IsStatic { get; set; }
|
|
}
|