Table of Contents

Class ByteDataMap2D

Namespace
Vintagestory.API.Datastructures
Assembly
VintagestoryAPI.dll

A datastructure to hold 2 dimensional data in the form of ints. Can be used to perfrom bilinear interpolation between individual values Open in GitHub

[ProtoContract]
public class ByteDataMap2D
Inheritance
ByteDataMap2D
Inherited Members
Extension Methods

Fields

BottomRightPadding

Bottom and Right padding

[ProtoMember(4)]
public int BottomRightPadding

Field Value

int

Data

[ProtoMember(1, IsPacked = true)]
public byte[] Data

Field Value

byte[]

Size

Full Width and Length of the map (square)

[ProtoMember(2)]
public int Size

Field Value

int

TopLeftPadding

Top and Left padding

[ProtoMember(3)]
public int TopLeftPadding

Field Value

int

Properties

InnerSize

Width and Length of the map excluding any padding

public int InnerSize { get; }

Property Value

int

Methods

CreateEmpty()

public static ByteDataMap2D CreateEmpty()

Returns

ByteDataMap2D

Get(int, int)

public byte Get(int x, int z)

Parameters

x int
z int

Returns

byte

GetLerpedCorrectly(float, float)

public float GetLerpedCorrectly(float x, float z)

Parameters

x float
z float

Returns

float

GetUnpadded(int, int)

public byte GetUnpadded(int x, int z)

Parameters

x int
z int

Returns

byte

GetUnpaddedLerped(float, float)

public float GetUnpaddedLerped(float x, float z)

Parameters

x float
z float

Returns

float

Set(int, int, byte)

public void Set(int x, int z, byte value)

Parameters

x int
z int
value byte