示例#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
     this.bitCountPerElement = quaternionBitLength;
     this.totalBitCount      = 2 + (quaternionBitLength * 3);
     this.floatPacker        = new FloatPacker(MaxValue, quaternionBitLength);
     this.readMask           = (uint)BitMask.Mask(this.bitCountPerElement);
 }
示例#2
0
 public Vector3Packer(Vector3 max, Vector3 precision)
 {
     this.xPacker = new FloatPacker(max.x, precision.x);
     this.yPacker = new FloatPacker(max.y, precision.y);
     this.zPacker = new FloatPacker(max.z, precision.z);
 }
示例#3
0
 public Vector2Packer(Vector2 max, Vector2 precision)
 {
     this.xPacker = new FloatPacker(max.x, precision.x);
     this.yPacker = new FloatPacker(max.y, precision.y);
 }