// Instant caching into meshes
        public static void CacheInstant(RayfireRigid scr)
        {
            // Timestamp
            float t1 = Time.realtimeSinceStartup;

            // Input mesh, setup
            if (RFFragment.InputMesh(scr) == false)
            {
                return;
            }

            // Timestamp
            float t2 = Time.realtimeSinceStartup;

            //Debug.Log (scr.gameObject.name +  " Input time: " + (t2 - t1));

            // Create fragments
            RFFragment.CacheMeshesInst(ref scr.meshes, ref scr.pivots, ref scr.subIds, scr);

            // Timestamp
            float t3 = Time.realtimeSinceStartup;

            //Debug.Log (t2 - t1);
            //Debug.Log (scr.gameObject.name +  " Cache time: " + (t3 - t1));
        }
Beispiel #2
0
        // Instant caching into meshes
        public static void CacheInstant(RayfireRigid scr)
        {
            // Input mesh, setup
            if (RFFragment.InputMesh(scr) == false)
            {
                return;
            }

            // Create fragments
            RFFragment.CacheMeshesInst(ref scr.meshes, ref scr.pivots, ref scr.subIds, scr);
        }