Table of Contents

Class AttachedAABBProximity

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

An axis-aligned bounding box attached to a transform. Scale, position, and rotation are applied.

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

Constructors

AttachedAABBProximity(Transform, IAABBProximity)

Create an axis-aligned bounding box from another IAABBProximity attached to attachmentRoot.

public AttachedAABBProximity(Transform attachmentRoot, IAABBProximity aabb)

Parameters

attachmentRoot Transform
aabb IAABBProximity

AttachedAABBProximity(Transform, in Bounds)

Create a 3D bounding box attached to attachmentRoot.

public AttachedAABBProximity(Transform attachmentRoot, in Bounds bounds)

Parameters

attachmentRoot Transform
bounds Bounds

AttachedAABBProximity(Transform, in Vector2, in Vector2)

Create a 2D bounding box with an infinite height attached to attachmentRoot.

public AttachedAABBProximity(Transform attachmentRoot, in Vector2 center, in Vector2 size)

Parameters

attachmentRoot Transform
center Vector2
size Vector2

AttachedAABBProximity(Transform, in Vector3, in Vector3)

Create an axis-aligned bounding box attached to attachmentRoot.

public AttachedAABBProximity(Transform attachmentRoot, in Vector3 center, in Vector3 size)

Parameters

attachmentRoot Transform
center Vector3
size Vector3

Properties

AttachmentRoot

The transform this proximity is attached to.

public Transform? AttachmentRoot { get; }

Property Value

Transform

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.