PhysicsAPI reference
Struct ShapeId
Namespace: MicroEngine.Physics
Assembly: MicroEngine.Physics.dll
Guide: Physics worlds
A shape of an IPhysicsWorld2D (a box, a tile grid, or a shape of a declared capability), attached to one
body. Generation-checked like BodyId; default is None.
public readonly struct ShapeId : IEquatable<ShapeId>Implements
Constructors
ShapeId(uint, uint)
A shape of an IPhysicsWorld2D (a box, a tile grid, or a shape of a declared capability), attached to one
body. Generation-checked like BodyId; default is None.
public ShapeId(uint Index, uint Generation)Parameters
Index uint
The slot.
Generation uint
The generation of the slot’s shape; 0 only for None.
Properties
Generation
The generation of the slot’s shape; 0 only for None.
public uint Generation { get; init; }Property Value
Index
The slot.
public uint Index { get; init; }Property Value
IsNone
Whether this is None.
public bool IsNone { get; }Property Value
None
The id of no shape.
public static ShapeId None { get; }Property Value
Methods
Deconstruct(out uint, out uint)
public void Deconstruct(out uint Index, out uint Generation)Parameters
Index uint
Generation uint
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(ShapeId)
public bool Equals(ShapeId other)Parameters
other ShapeId
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(ShapeId, ShapeId)
public static bool operator ==(ShapeId left, ShapeId right)Parameters
left ShapeId
right ShapeId
Returns
operator !=(ShapeId, ShapeId)
public static bool operator !=(ShapeId left, ShapeId right)Parameters
left ShapeId
right ShapeId