Table of Contents

Struct DebugGrid

Namespace
Typhon.Protocol
Assembly
Typhon.Protocol.dll

A DEBUG GRID sub-block (09 § 15): the replication grid every push session's cells are keyed on. Sent to a debugging session with its first frame and with every RESET.

public readonly struct DebugGrid : IEquatable<DebugGrid>
Implements
Inherited Members

Remarks

GRID := f64 originX | f64 originY | f64 originZ | f64 cellM | varu dimX | varu dimY | varu dimZ      (dimZ = 1 in a flat grid)

Cell (cx, cy, cz) spans [origin + c·cell, origin + (c + 1)·cell) on each axis.

Constructors

DebugGrid(double, double, double, double, int, int, int)

A DEBUG GRID sub-block (09 § 15): the replication grid every push session's cells are keyed on. Sent to a debugging session with its first frame and with every RESET.

public DebugGrid(double OriginX, double OriginY, double OriginZ, double CellM, int DimX, int DimY, int DimZ)

Parameters

OriginX double

The grid's lowest x, in metres.

OriginY double

The grid's lowest y.

OriginZ double

The grid's lowest z.

CellM double

The cell side, in metres.

DimX int

Cells along x.

DimY int

Cells along y.

DimZ int

Cells along z; 1 in a flat grid.

Remarks

GRID := f64 originX | f64 originY | f64 originZ | f64 cellM | varu dimX | varu dimY | varu dimZ      (dimZ = 1 in a flat grid)

Cell (cx, cy, cz) spans [origin + c·cell, origin + (c + 1)·cell) on each axis.

Fields

MaxBytes

The largest payload Write(ref WireWriter) produces.

public const int MaxBytes = 47

Field Value

int

Properties

CellM

The cell side, in metres.

public double CellM { get; init; }

Property Value

double

DimX

Cells along x.

public int DimX { get; init; }

Property Value

int

DimY

Cells along y.

public int DimY { get; init; }

Property Value

int

DimZ

Cells along z; 1 in a flat grid.

public int DimZ { get; init; }

Property Value

int

OriginX

The grid's lowest x, in metres.

public double OriginX { get; init; }

Property Value

double

OriginY

The grid's lowest y.

public double OriginY { get; init; }

Property Value

double

OriginZ

The grid's lowest z.

public double OriginZ { get; init; }

Property Value

double

Methods

Deconstruct(out double, out double, out double, out double, out int, out int, out int)

public void Deconstruct(out double OriginX, out double OriginY, out double OriginZ, out double CellM, out int DimX, out int DimY, out int DimZ)

Parameters

OriginX double
OriginY double
OriginZ double
CellM double
DimX int
DimY int
DimZ int

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(DebugGrid)

public bool Equals(DebugGrid other)

Parameters

other DebugGrid

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Read(ReadOnlySpan<byte>)

Reads a payload.

public static DebugGrid Read(ReadOnlySpan<byte> payload)

Parameters

payload ReadOnlySpan<byte>

The sub-block's payload.

Returns

DebugGrid

The grid.

Exceptions

WireFormatException

The payload is truncated or has bytes left over.

ToString()

public override string ToString()

Returns

string

Write(ref WireWriter)

Writes the payload, without the sub-block's type and length.

public void Write(ref WireWriter w)

Parameters

w WireWriter

The writer.

Operators

operator ==(DebugGrid, DebugGrid)

public static bool operator ==(DebugGrid left, DebugGrid right)

Parameters

left DebugGrid
right DebugGrid

Returns

bool

operator !=(DebugGrid, DebugGrid)

public static bool operator !=(DebugGrid left, DebugGrid right)

Parameters

left DebugGrid
right DebugGrid

Returns

bool