Table of Contents

Class LSAABBoxCollider2D

Namespace
Gravitas.Colliders
Assembly
Gravitas.dll

Pure 2D axis-aligned box collider.

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

Constructors

LSAABBoxCollider2D(Vector2d)

Creates a pure 2D axis-aligned box with an authored size.

public LSAABBoxCollider2D(Vector2d size)

Parameters

size Vector2d

LSAABBoxCollider2D(ColliderShapeDefinition2D)

Creates a runtime box from an authored shape definition.

public LSAABBoxCollider2D(ColliderShapeDefinition2D definition)

Parameters

definition ColliderShapeDefinition2D

Properties

HalfExtents

Gets half of the authored unscaled size.

public Vector2d HalfExtents { get; }

Property Value

Vector2d

ScaledHalfExtents

Gets the half extents after owner and compound-part scaling.

public Vector2d ScaledHalfExtents { get; }

Property Value

Vector2d

Shape

Gets the runtime pure 2D shape family.

public override ColliderType2D Shape { get; }

Property Value

ColliderType2D

Size

Gets or sets the unscaled full box size.

public Vector2d Size { get; set; }

Property Value

Vector2d

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

GetSupportPoint(Vector2d)

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

public override Vector2d GetSupportPoint(Vector2d direction)

Parameters

direction Vector2d

Returns

Vector2d

RecordShapeData(IChronicler)

Records derived authored shape data.

protected override void RecordShapeData(IChronicler chronicler)

Parameters

chronicler IChronicler