mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
45 lines
1.3 KiB
C#
45 lines
1.3 KiB
C#
using System;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Shared.Physics.Components;
|
|
|
|
namespace Robust.Shared.Physics.Collision.Shapes
|
|
{
|
|
public enum ShapeType : sbyte
|
|
{
|
|
Unknown = -1,
|
|
Circle = 0,
|
|
Edge = 1,
|
|
Polygon = 2,
|
|
Chain = 3,
|
|
TypeCount = 4, // Obviously increment this if you add something
|
|
}
|
|
|
|
/// <summary>
|
|
/// A primitive physical shape that is used by a <see cref="PhysicsComponent"/>.
|
|
/// </summary>
|
|
[NotContentImplementable]
|
|
public interface IPhysShape : IEquatable<IPhysShape>
|
|
{
|
|
/// <summary>
|
|
/// Get the number of child primitives. Only relevant for chain shape.
|
|
/// </summary>
|
|
int ChildCount { get; }
|
|
|
|
/// <summary>
|
|
/// Radius of the Shape
|
|
/// Changing the radius causes a recalculation of shape properties.
|
|
/// </summary>
|
|
float Radius { get; set; }
|
|
|
|
// Sloth: I removed density because mass is way easier to work with.
|
|
// If you really want it back then code it yaself (and also probably put it on the fixture).
|
|
|
|
ShapeType ShapeType { get; }
|
|
|
|
/// <summary>
|
|
/// Calculate the AABB of the shape.
|
|
/// </summary>
|
|
Box2 ComputeAABB(Transform transform, int childIndex);
|
|
}
|
|
}
|