Nebula
Containers

PortalAperture

The opening of a portal, on its face's z = 0 plane (docs/portals.md D3): an oriented box centred on the face's origin.

generated from the sources
[Serializable]
public struct PortalAperture

The opening of a portal, on its face's z = 0 plane (docs/portals.md D3): an oriented box centred on the face's origin. Any convex shape is a later Kind with the same contract, a cross-section test and a bounding box.

Fields

Kind

public PortalApertureKind Kind;

The shape. PortalApertureKind.Box today.

HalfWidth

public float HalfWidth;

Half the opening's width, along the face's x axis.

HalfHeight

public float HalfHeight;

Half the opening's height, along the face's y axis.

Methods

Box

public static PortalAperture Box(float halfWidth, float halfHeight);

A rectangular opening 2 × halfWidth wide and 2 × halfHeight high.

Contains

public bool Contains(double x, double y, float margin = 0f);

Whether the point (x, y) of the face's plane is in the opening, widened by margin on every side.

ToString

public override string ToString();

On this page