예제 #1
0
        public void CacheValues()
        {
            cache_xEnabled  = xcrusher.Enabled;
            cache_yEnabled  = ycrusher.Enabled;
            cache_zEnabled  = zcrusher.Enabled;
            cache_uEnabled  = ucrusher.Enabled;
            cache_qEnabled  = qcrusher.enabled && qcrusher.Bits > 0;
            cache_xBits     = new int[4];
            cache_yBits     = new int[4];
            cache_zBits     = new int[4];
            cache_uBits     = new int[4];
            cache_qBits     = qcrusher.Bits;
            cache_TotalBits = new int[4];

            for (int i = 0; i < 4; ++i)
            {
                cache_xBits[i]     = xcrusher.GetBitsAtCullLevel((BitCullingLevel)i);
                cache_yBits[i]     = ycrusher.GetBitsAtCullLevel((BitCullingLevel)i);
                cache_zBits[i]     = zcrusher.GetBitsAtCullLevel((BitCullingLevel)i);
                cache_uBits[i]     = ucrusher.GetBitsAtCullLevel((BitCullingLevel)i);
                cache_TotalBits[i] = TallyBits((BitCullingLevel)i);
            }

            cache_mustCorrectRotationX = _trsType == TRSType.Euler && xcrusher.UseHalfRangeX;
            cache_isUniformScale       = _trsType == TRSType.Scale && uniformAxes != UniformAxes.NonUniform;

            cached = true;
        }