Table of Contents

Class AABBProximity

Namespace
Uncreated.Warfare.Proximity
Assembly
Uncreated.Warfare.dll

Defines an 'axis-aligned bounding box' proximity.

public class AABBProximity : IAABBProximity, INearestPointProximity, IAttachableProximity<IAttachedAABBProximity>, IProximity, IShapeVolume, ICloneable, IFormattable
Inheritance
AABBProximity
Implements
IShapeVolume
Inherited Members
Extension Methods

Constructors

AABBProximity(IAABBProximity)

Create a bounding box from another IAABBProximity.

public AABBProximity(IAABBProximity other)

Parameters

other IAABBProximity

AABBProximity(in Bounds)

Create a 3D bounding box.

public AABBProximity(in Bounds bounds)

Parameters

bounds Bounds

AABBProximity(in Vector2, in Vector2)

Create a 2D bounding box with an infinite height.

public AABBProximity(in Vector2 center, in Vector2 size)

Parameters

center Vector2
size Vector2

AABBProximity(in Vector3, in Vector3)

Create a 3D bounding box.

public AABBProximity(in Vector3 center, in Vector3 size)

Parameters

center Vector3
size Vector3

Properties

Dimensions

The position and dimensions of the bounding box in world space.

public Bounds Dimensions { get; }

Property Value

Bounds

Remarks

Any size/extents components may be PositiveInfinity.

worldBounds

Axis-aligned bounds of the rectange.

public Bounds worldBounds { get; }

Property Value

Bounds

Remarks

Equal to Dimensions in this case.

Methods

Clone()

Creates a new object that is a copy of the current instance.

public object Clone()

Returns

object

A new object that is a copy of this instance.

TestPoint(in Vector2)

Check if a position is within the proximity while ignoring Y position.

public bool TestPoint(in Vector2 position)

Parameters

position Vector2

Returns

bool

TestPoint(in Vector3)

Check if a position is within the proximity.

public bool TestPoint(in Vector3 position)

Parameters

position Vector3

Returns

bool

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToString(string?, IFormatProvider?)

Formats the value of the current instance using the specified format.

public string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string

The format to use.
-or-
A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.
-or-
A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.