Nebula
Protocol

PortalRecord

A portal as the network gateway and a client learn it (MsgId.Portals, protocol 28): the near face, the far side, the aperture and the sizes of the regions derived from it.

generated from the sources
public struct PortalRecord

A portal as the network gateway and a client learn it (MsgId.Portals, protocol 28): the near face, the far side, the aperture and the sizes of the regions derived from it. The record is the portal's definition only; the state of each party's link travels separately (PortalLinkRecord).

Fields

PortalId

public ulong PortalId;

The derived id (PortalIds.Of).

Id

public string Id;

The authored id, unique within the near container.

NearScope

public ulong NearScope;

The near face's scope.

NearContainerId

public string NearContainerId;

The container the near face is fixed in, by id (how a gateway matches the rows a client holds) and by reference.

NearContainer

public ContainerRef NearContainer;

NearOrigin

public Double3 NearOrigin;

The near face, absolute in its scope.

NearRotation

public Quaternion NearRotation;

FarKind

public PortalFarKind FarKind;

FarScope

public ulong FarScope;

A fixed far side's scope; 0 for a template, whose far scope belongs to each link.

FarOrigin

public Double3 FarOrigin;

The far face, absolute in the far scope. A template's far face is the near face's origin read in the instance's own upright space, with the identity rotation, or the near face's when the portal does not turn with its face (docs/portals.md D5), so it is the same for every party's far scope and the network gateway can place the far window without a link's help (D21).

FarRotation

public Quaternion FarRotation;

TemplateId

public string TemplateId;

A template far side's template id; empty for a fixed one.

ApertureKind

public PortalApertureKind ApertureKind;

HalfWidth, HalfHeight

public float HalfWidth, HalfHeight;

BandMargin, BandDepth

public float BandMargin, BandDepth;

The band: the cross-section grown sideways by BandMargin, |z| ≤ BandDepth.

WindowMargin, WindowDepth

public float WindowMargin, WindowDepth;

The window, per side: the cross-section grown by WindowMargin, extruded WindowDepth into that side.

Flags

public byte Flags;

Flags: ObservationOnlyFlag (docs/portals.md §17).

ObservationOnlyFlag

public const byte ObservationOnlyFlag = 1;

The portal is a window in a wall: it admits nothing and its aperture collider is solid for everyone (docs/portals.md D28).

Properties

ObservationOnly

public bool ObservationOnly { get; }

Whether the portal admits nothing (ObservationOnlyFlag).

NearWindow

public PortalWindow NearWindow { get; }

The near side's window: the aperture grown by WindowMargin sideways and WindowDepth deep into the near scope (docs/portals.md D3).

Methods

FarWindow

public PortalWindow FarWindow(ulong farScope = 0UL);

The far side's window in farScope (a link's far scope; a fixed far side's own when 0): the aperture grown by WindowMargin sideways and WindowDepth deep into the far scope, in the far face's axes.

On this page