Nebula
Interest

InterestQuery

What a policy fills in for one client: where it is looking, and any entities it must have whatever the distance.

generated from the sources
public sealed class InterestQuery

What a policy fills in for one client: where it is looking, and any entities it must have whatever the distance. Reused between evaluations, so a policy that adds the same things every pass allocates nothing.

Properties

MaxFoci

public int MaxFoci { get; } = InterestSettings.Default.MaxFoci;

Foci beyond this are dropped (InterestSettings.MaxFoci).

MaxEntities

public int MaxEntities { get; } = InterestSettings.Default.MaxExplicitPerClient;

Explicit entities beyond this are dropped (InterestSettings.MaxExplicitPerClient).

Overflowed

public bool Overflowed { get; }

A policy asked for more than the caps allow; the gateway logs this once per client rather than growing the set.

BoxesClamped

public bool BoxesClamped { get; }

A box focus was wider than InterestSettings.MaxRadius on some axis and was shrunk to it about its center. Everything downstream of a focus enumerates cells across it — the region subscription, the container window — so an unbounded box is an unbounded loop, and MaxRadius is already the mesh's answer to "how far may one thing reach".

Foci

public IReadOnlyList<InterestFocus> Foci { get; }

Entities

public IReadOnlyList<ulong> Entities { get; }

MaxBoxHalf

public double MaxBoxHalf { get; } = InterestSettings.Default.MaxRadius;

The widest half extent a box focus may have on one axis (InterestSettings.MaxRadius).

Methods

Reset

public void Reset(in InterestSettings settings);

Empty the query for a new evaluation and apply the caps that are in force.

AddFocus

public bool AddFocus(in InterestFocus focus);
public bool AddFocus(double x, double y, double z, float radiusScale = 1f, ulong sourceNetId = 0, ulong space = 0);

AddEntity

public bool AddEntity(ulong netId);

Always send this entity to the client (a party member, a quest target), wherever it is.

On this page