Table of Contents

Struct GridEventInfo

Namespace
GridForge.Grids
Assembly
GridForge.dll

Immutable snapshot describing a grid at the time a world grid notification is raised.

public readonly struct GridEventInfo
Inherited Members

Constructors

GridEventInfo(long, ushort, long, GridConfiguration, uint, GridEventKind, VoxelIndex, Vector3d, Vector3d, GridChangeStamp, bool, bool, byte)

Initializes a new immutable grid event snapshot.

public GridEventInfo(long worldSpawnToken, ushort gridIndex, long gridSpawnToken, GridConfiguration configuration, uint gridVersion, GridEventKind changeKind = GridEventKind.Unspecified, VoxelIndex voxelIndex = default, Vector3d affectedBoundsMin = default, Vector3d affectedBoundsMax = default, GridChangeStamp changeStamp = default, bool hasVoxelState = false, bool isVoxelPresent = false, byte obstacleCount = 0)

Parameters

worldSpawnToken long
gridIndex ushort
gridSpawnToken long
configuration GridConfiguration
gridVersion uint
changeKind GridEventKind
voxelIndex VoxelIndex
affectedBoundsMin Vector3d
affectedBoundsMax Vector3d
changeStamp GridChangeStamp
hasVoxelState bool
isVoxelPresent bool
obstacleCount byte

Fields

AffectedBoundsMax

The maximum world-space bounds affected by this event.

public readonly Vector3d AffectedBoundsMax

Field Value

Vector3d

AffectedBoundsMin

The minimum world-space bounds affected by this event.

public readonly Vector3d AffectedBoundsMin

Field Value

Vector3d

ChangeKind

The reason this grid event was raised.

public readonly GridEventKind ChangeKind

Field Value

GridEventKind

ChangeStamp

The world-owned ordering and cause identity for this committed mutation.

public readonly GridChangeStamp ChangeStamp

Field Value

GridChangeStamp

Configuration

The snapped configuration for the grid when the notification was raised.

public readonly GridConfiguration Configuration

Field Value

GridConfiguration

GridIndex

The stable slot index assigned to the grid within ActiveGrids.

public readonly ushort GridIndex

Field Value

ushort

GridSpawnToken

The 64-bit world-local allocation generation for the grid occupying GridIndex.

public readonly long GridSpawnToken

Field Value

long

GridVersion

The per-grid version recorded when the notification was raised.

public readonly uint GridVersion

Field Value

uint

HasVoxelState

Whether this event contains an exact post-mutation voxel state.

public readonly bool HasVoxelState

Field Value

bool

IsVoxelPresent

Whether the addressed physical voxel exists after the mutation.

public readonly bool IsVoxelPresent

Field Value

bool

ObstacleCount

The addressed voxel's obstacle count after the mutation.

public readonly byte ObstacleCount

Field Value

byte

VoxelIndex

The changed voxel index for voxel-scoped grid events.

public readonly VoxelIndex VoxelIndex

Field Value

VoxelIndex

WorldSpawnToken

The process-unique 64-bit runtime allocation token of the owning GridWorld instance.

public readonly long WorldSpawnToken

Field Value

long

Properties

BoundsMax

The maximum snapped bounds of the grid.

public Vector3d BoundsMax { get; }

Property Value

Vector3d

BoundsMin

The minimum snapped bounds of the grid.

public Vector3d BoundsMin { get; }

Property Value

Vector3d

CauseId

The logical cause shared with exact notifications for the same mutation.

public ulong CauseId { get; }

Property Value

ulong

ChangeSequence

The world-local commit order of this event.

public ulong ChangeSequence { get; }

Property Value

ulong

Methods

ToBoundsKey()

Creates an exact bounds key from the stored grid configuration.

public BoundsKey ToBoundsKey()

Returns

BoundsKey