/// <param name="quaternionBitLength">10 per "smallest 3" is good enough for most people</param> public QuaternionPacker(int quaternionBitLength = 10) { // (this.BitLength - 1) because pack sign by itself bitCountPerElement = quaternionBitLength; totalBitCount = 2 + (quaternionBitLength * 3); floatPacker = new FloatPacker(MaxValue, quaternionBitLength); readMask = (uint)BitMask.Mask(bitCountPerElement); }
/// <param name="quaternionBitLength">10 per "smallest 3" is good enough for most people</param> public QuaternionPacker(int quaternionBitLength = 10) { // (this.BitLength - 1) because pack sign by itself _bitCountPerElement = quaternionBitLength; _totalBitCount = 2 + (quaternionBitLength * 3); _floatPacker = new FloatPacker(MAX_VALUE, quaternionBitLength); _readMask = (uint)BitMask.Mask(_bitCountPerElement); }
public Vector3Packer(Vector3 max, Vector3 precision) { xPacker = new FloatPacker(max.x, precision.x); yPacker = new FloatPacker(max.y, precision.y); zPacker = new FloatPacker(max.z, precision.z); }
public Vector3Packer(float xMax, float yMax, float zMax, float xPrecision, float yPrecision, float zPrecision) { xPacker = new FloatPacker(xMax, xPrecision); yPacker = new FloatPacker(yMax, yPrecision); zPacker = new FloatPacker(zMax, zPrecision); }
public Vector3Packer(float xMax, float yMax, float zMax, int xBitCount, int yBitCount, int zBitCount) { xPacker = new FloatPacker(xMax, xBitCount); yPacker = new FloatPacker(yMax, yBitCount); zPacker = new FloatPacker(zMax, zBitCount); }
public Vector2Packer(Vector2 max, Vector2 precision) { xPacker = new FloatPacker(max.x, precision.x); yPacker = new FloatPacker(max.y, precision.y); }
public Vector2Packer(float xMax, float yMax, float xPrecision, float yPrecision) { xPacker = new FloatPacker(xMax, xPrecision); yPacker = new FloatPacker(yMax, yPrecision); }
public Vector2Packer(float xMax, float yMax, int xBitCount, int yBitCount) { xPacker = new FloatPacker(xMax, xBitCount); yPacker = new FloatPacker(yMax, yBitCount); }