Vixen
02b45cc4
csharp
public readonly record struct ShapeId

A registered shape, as a number small enough to live in a component.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

An id and not a reference, so Collider stays blittable and lives in a chunk column rather than in the world's managed store — see ManagedComponentStore on why that matters. It is also what a network message and a scene file can carry, because the same description registered into a fresh registry in the same order gets the same id.

Ids are only meaningful against the PhysicsShapes that issued them. Using one against a different registry is caught: the registry checks the range, and the description it finds there is almost never the one the caller meant.

Fields and properties (3)

  • public int Value

    The one-based index into the registry. Zero is no shape.

  • public static ShapeId None

    No shape.

  • public bool IsNone

    Whether this names a shape at all.

Methods (7)

  • public ShapeId(int Value)

    A registered shape, as a number small enough to live in a component.

  • public int CompareTo(ShapeId other)

    Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

  • public static bool operator <(ShapeId left, ShapeId right)

    Whether sorts before .

  • public static bool operator <=(ShapeId left, ShapeId right)

    Whether sorts before or equal to .

  • public static bool operator >(ShapeId left, ShapeId right)

    Whether sorts after .

  • public static bool operator >=(ShapeId left, ShapeId right)

    Whether sorts after or equal to .

  • public override string ToString()

    Renders the id.

Used by (31)

  • ArenaThirdPersonShooter
  • PlayerRigThirdPersonShooter
  • BodyDescriptionVixen.Physics
  • BodySlotVixen.Physics
  • CharacterBodyVixen.Physics
  • CharacterControllerVixen.Physics
  • CharacterControllerSettingsVixen.Physics
  • CharacterControllerTestsVixen.Physics.Tests
  • CharacterMotionVixen.Physics
  • CharacterMotionTestsVixen.Physics.Tests
  • CharacterMovementVixen.Physics
  • CharacterSceneTestsVixen.Physics.Tests
  • ColliderVixen.Physics
  • CompoundChildVixen.Physics
  • HeightFieldShapeTestsVixen.Physics.Tests
  • PhysicsBodyVixen.Physics
  • PhysicsDebugDrawVixen.Physics
  • PhysicsDeterminismTestsVixen.Physics.Tests
  • PhysicsQueryTestsVixen.Physics.Tests
  • PhysicsSceneVixen.Physics
  • PhysicsSceneComponentTestsVixen.Physics.Tests
  • PhysicsShapeTestsVixen.Physics.Tests
  • PhysicsShapesVixen.Physics
  • PhysicsWorldVixen.Physics
  • PhysicsWorldTestsVixen.Physics.Tests
  • Vixen_Physics_Bodies_BodyDescriptionSerializerVixen.Physics
  • Vixen_Physics_Characters_CharacterControllerSettingsSerializerVixen.Physics
  • Vixen_Physics_Characters_CharacterMovementSerializerVixen.Physics
  • Vixen_Physics_Ecs_ColliderSerializerVixen.Physics
  • Vixen_Physics_Shapes_CompoundChildSerializerVixen.Physics
  • Vixen_Physics_Shapes_ShapeIdSerializerVixen.Physics