public ParcelID(GridVector location, Vector3 pos) { Location = location; RegionPosX = (uint)pos.X; RegionPosY = (uint)pos.Y; RegionPosZ = (uint)Math.Ceiling(pos.Z).Clamp(0, 65535); }
public ParcelID(byte[] data, int offset) { uint x; uint y; y = data[offset + 3]; y = (y << 8) | data[offset + 2]; y = (y << 8) | data[offset + 1]; y = (y << 8) | data[offset + 0]; x = data[offset + 7]; x = (x << 8) | data[offset + 6]; x = (x << 8) | data[offset + 5]; x = (x << 8) | data[offset + 4]; Location = new GridVector(x, y); RegionPosX = data[9]; RegionPosX = (RegionPosX << 8) | data[8]; RegionPosZ = data[11]; RegionPosZ = (RegionPosZ << 8) | data[10]; RegionPosY = data[13]; RegionPosY = (RegionPosY << 8) | data[12]; }
public uint Y; /* in m */ #region Constructors public GridVector(GridVector v) { X = v.X; Y = v.Y; }