Beispiel #1
0
 public void Render(AbstractScene scene, int nbThreads = -1, bool shuffle = true)
 {
     Render(scene.CameraParameters[0], new RenderParameters
     {
         NbThreads = nbThreads >= 0 ? nbThreads : Environment.ProcessorCount, Shuffle = shuffle
     }, scene.World);
 }
Beispiel #2
0
        public AbstractScene Render(Type sceneType, int nbThreads = -1, bool shuffle = false)
        {
            AbstractScene scene = Activator.CreateInstance(sceneType) as AbstractScene;

            if (scene == null)
            {
                throw new InvalidOperationException($"Wrong scene type: {sceneType}");
            }
            scene.InitWorld();
            Render(scene, nbThreads, shuffle);
            return(scene);
        }