Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
 public Vector2Packer(Vector2 max, Vector2 precision)
 {
     xPacker = new FloatPacker(max.x, precision.x);
     yPacker = new FloatPacker(max.y, precision.y);
 }
Ejemplo n.º 7
0
 public Vector2Packer(float xMax, float yMax, float xPrecision, float yPrecision)
 {
     xPacker = new FloatPacker(xMax, xPrecision);
     yPacker = new FloatPacker(yMax, yPrecision);
 }
Ejemplo n.º 8
0
 public Vector2Packer(float xMax, float yMax, int xBitCount, int yBitCount)
 {
     xPacker = new FloatPacker(xMax, xBitCount);
     yPacker = new FloatPacker(yMax, yBitCount);
 }