示例#1
0
        public SimulationSettings()
        {
            Constraints = new ConstraintSettings();
              Motion = new MotionSettings();
              Sleeping = new SleepingSettings();
              Timing = new TimingSettings();
              MaterialPropertyCombiner = new MaterialPropertyCombiner();
            #if WP7 || UNITY
              // Cannot access Environment.ProcessorCount in phone app. (Security issue).
              EnableMultithreading = false;
            #else
              // Enable multithreading by default if the current system has multiple processors.
              EnableMultithreading = Environment.ProcessorCount > 1;

              // Multithreading works but Parallel.For of Xamarin.Android/iOS is very inefficient.
              if (GlobalSettings.PlatformID == PlatformID.Android || GlobalSettings.PlatformID == PlatformID.iOS)
            EnableMultithreading = false;
            #endif
        }
        public SimulationSettings()
        {
            Constraints = new ConstraintSettings();
            Motion      = new MotionSettings();
            Sleeping    = new SleepingSettings();
            Timing      = new TimingSettings();
            MaterialPropertyCombiner = new MaterialPropertyCombiner();
#if WP7 || UNITY
            // Cannot access Environment.ProcessorCount in phone app. (Security issue).
            EnableMultithreading = false;
#else
            // Enable multithreading by default if the current system has multiple processors.
            EnableMultithreading = Environment.ProcessorCount > 1;

            // Multithreading works but Parallel.For of Xamarin.Android/iOS is very inefficient.
            if (GlobalSettings.PlatformID == PlatformID.Android || GlobalSettings.PlatformID == PlatformID.iOS)
            {
                EnableMultithreading = false;
            }
#endif
        }