Exemplo n.º 1
0
        public void Read(CompressedMatrixRB nonalloc, uint[] buffer, ref int bitposition, BitCullingLevel bcl = BitCullingLevel.NoCulling)
        {
            if (!cached)
            {
                CacheValues();
            }

            nonalloc.crusher = this;
            if (cached_pBits[(int)bcl] > 0)
            {
                posCrusher.Read(nonalloc.cPos, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
            if (cached_rBits[(int)bcl] > 0)
            {
                rotCrusher.Read(nonalloc.cRot, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
            if (cached_sBits[(int)bcl] > 0)
            {
                sclCrusher.Read(nonalloc.cScl, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }


            if (cached_vBits[(int)bcl] > 0)
            {
                velCrusher.Read(nonalloc.cVel, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
            if (cached_aBits[(int)bcl] > 0)
            {
                angCrusher.Read(nonalloc.cAng, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
        }
Exemplo n.º 2
0
        public void Write(CompressedMatrixRB cmRB, ulong[] buffer, ref int bitposition, BitCullingLevel bcl = BitCullingLevel.NoCulling)
        {
            if (!cached)
            {
                CacheValues();
            }

            if (cached_pBits[(int)bcl] > 0)
            {
                posCrusher.Write(cmRB.cPos, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
            if (cached_rBits[(int)bcl] > 0)
            {
                rotCrusher.Write(cmRB.cRot, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
            if (cached_sBits[(int)bcl] > 0)
            {
                sclCrusher.Write(cmRB.cScl, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }


            if (cached_vBits[(int)bcl] > 0)
            {
                velCrusher.Write(cmRB.cVel, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
            if (cached_aBits[(int)bcl] > 0)
            {
                angCrusher.Write(cmRB.cAng, buffer, ref bitposition, IncludedAxes.XYZ, bcl);
            }
        }
Exemplo n.º 3
0
 public void CopyFrom(CompressedMatrixRB copySource)
 {
     cPos.CopyFrom(copySource.cPos);
     cRot.CopyFrom(copySource.cRot);
     cScl.CopyFrom(copySource.cScl);
     cVel.CopyFrom(copySource.cVel);
     cAng.CopyFrom(copySource.cAng);
 }
Exemplo n.º 4
0
 public void CopyTo(CompressedMatrixRB copyTarget)
 {
     cPos.CopyTo(copyTarget.cPos);
     cRot.CopyTo(copyTarget.cRot);
     cScl.CopyTo(copyTarget.cScl);
     cVel.CopyTo(copyTarget.cVel);
     cAng.CopyTo(copyTarget.cAng);
 }