Table of Contents

Class LSCompoundCollider2D

Namespace
Gravitas.Colliders
Assembly
Gravitas.dll

Represents one pure 2D collider identity whose collision shape is composed from deterministic internal primitive and convex-polygon parts.

public sealed class LSCompoundCollider2D : LSCollider2D, IRecordable
Inheritance
LSCompoundCollider2D
Implements
IRecordable
Inherited Members

Constructors

LSCompoundCollider2D(params CompoundColliderPart2D[])

Creates a runtime compound collider from authored pure 2D parts.

public LSCompoundCollider2D(params CompoundColliderPart2D[] parts)

Parameters

parts CompoundColliderPart2D[]

Properties

PartCount

Gets the number of authored compound parts.

public int PartCount { get; }

Property Value

int

Parts

Gets the authored parts in stable source order.

public ReadOnlySpan<CompoundColliderPart2D> Parts { get; }

Property Value

ReadOnlySpan<CompoundColliderPart2D>

Priority

Gets the deterministic pure 2D narrow-phase ordering priority.

public override int Priority { get; }

Property Value

int

ScaledRadius

Gets the radius of a circle that conservatively contains the current aggregate shape.

public Fixed64 ScaledRadius { get; }

Property Value

Fixed64

Shape

Gets the runtime pure 2D shape family.

public override ColliderType2D Shape { get; }

Property Value

ColliderType2D

Methods

ContainsPoint(Vector2d)

Gets whether a planar world-space point lies inside this collider.

public override bool ContainsPoint(Vector2d point)

Parameters

point Vector2d

Returns

bool

GetClosestPoint(Vector2d)

Gets the closest representable point on this collider to a planar world-space point.

public override Vector2d GetClosestPoint(Vector2d point)

Parameters

point Vector2d

Returns

Vector2d

GetPartId(int)

Gets the stable runtime part identifier for a source-order index.

public int GetPartId(int index)

Parameters

index int

Returns

int

GetSupportPoint(Vector2d)

Gets the farthest representable point along a planar world-space direction.

public override Vector2d GetSupportPoint(Vector2d direction)

Parameters

direction Vector2d

Returns

Vector2d

OnMaterialChanged()

Updates derived material state after Material changes.

protected override void OnMaterialChanged()