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
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
TopLeftPadding
Top and Left padding
[ProtoMember(3)]
public int TopLeftPadding
Field Value
Properties
InnerSize
Width and Length of the map excluding any padding
public int InnerSize { get; }
Property Value
Methods
CreateEmpty()
public static ByteDataMap2D CreateEmpty()
Returns
Get(int, int)
public byte Get(int x, int z)
Parameters
Returns
GetLerpedCorrectly(float, float)
public float GetLerpedCorrectly(float x, float z)
Parameters
Returns
GetUnpadded(int, int)
public byte GetUnpadded(int x, int z)
Parameters
Returns
GetUnpaddedLerped(float, float)
public float GetUnpaddedLerped(float x, float z)
Parameters
Returns
Set(int, int, byte)
public void Set(int x, int z, byte value)