Esempio n. 1
0
        public static string Shot(string acRoot, string carName, string showroomName, bool manualMode,
                double dx, double dy, double distance, string filter, bool disableSweetFx, bool slowMode) {
            var s = new ClassicShooter {
                AcRoot = acRoot,
                CarId = carName,
                ShowroomId = showroomName,
                UseBmp = true,
                DisableWatermark = true,
                DisableSweetFx = disableSweetFx,
                Filter = filter
            };

            s.SetRotate(dx, dy);
            s.SetDistance(distance);

            if (slowMode) {
                s.SlowMode();
            }

            try {
                s.ShotAll(manualMode);
                return s.OutputDirectory;
            } finally {
                s.Dispose();
            }
        }
Esempio n. 2
0
        public static string Shot(string acRoot, string carName, string showroomName, bool manualMode,
                                  double dx, double dy, double distance, string filter, bool disableSweetFx, bool slowMode)
        {
            var s = new ClassicShooter {
                AcRoot           = acRoot,
                CarId            = carName,
                ShowroomId       = showroomName,
                UseBmp           = true,
                DisableWatermark = true,
                DisableSweetFx   = disableSweetFx,
                Filter           = filter
            };

            s.SetRotate(dx, dy);
            s.SetDistance(distance);

            if (slowMode)
            {
                s.SlowMode();
            }

            try {
                s.ShotAll(manualMode);
                return(s.OutputDirectory);
            } finally {
                s.Dispose();
            }
        }
Esempio n. 3
0
        private static BaseShotter CreateShooter(ShotProperties properties)
        {
            BaseShotter shooter;

            switch (properties.Mode)
            {
            case ShotMode.Classic: {
                var classicShooter = new ClassicShooter();
                classicShooter.SetRotate(properties.ClassicCameraDx, properties.ClassicCameraDy);
                classicShooter.SetDistance(properties.ClassicCameraDistance);
                shooter = classicShooter;
                break;
            }

            case ShotMode.ClassicManual: {
                var classicShooter = new ClassisManualShooter();
                classicShooter.SetRotate(properties.ClassicCameraDx, properties.ClassicCameraDy);
                classicShooter.SetDistance(properties.ClassicCameraDistance);
                shooter = classicShooter;
                break;
            }

            case ShotMode.Fixed: {
                var kunosShooter = new KunosShotter();
                kunosShooter.SetCamera(properties.FixedCameraPosition, properties.FixedCameraLookAt,
                                       properties.FixedCameraFov, properties.FixedCameraExposure);
                shooter = kunosShooter;
                break;
            }

            default:
                throw new ArgumentOutOfRangeException();
            }

            shooter.AcRoot                = properties.AcRoot;
            shooter.CarId                 = properties.CarId;
            shooter.SkinIds               = properties.SkinIds;
            shooter.ShowroomId            = properties.ShowroomId;
            shooter.DisableWatermark      = properties.DisableWatermark;
            shooter.DisableSweetFx        = properties.DisableSweetFx;
            shooter.Filter                = properties.Filter;
            shooter.Fxaa                  = properties.Fxaa;
            shooter.SpecialResolution     = properties.SpecialResolution;
            shooter.MaximizeVideoSettings = properties.MaximizeVideoSettings;
            shooter.TemporaryDirectory    = properties.TemporaryDirectory;

            return(shooter);
        }