void SetupChapters() { var size = Constants.DefaultImageSize * m_SelectedScaleOption; m_ChaptersOneAndTwo = new ChaptersOneAndTwo(size.x, size.y); m_ChapterThree = new ChapterThree(size.x, size.y); m_ChapterFour = new ChapterFour(size.x, size.y); m_ChapterFive = new ChapterFive(size.x, size.y); m_ChapterFiveTwo = new ChapterFiveTwo(size.x, size.y); m_ChapterSix = new ChapterSix(size.x, size.y); m_ChapterSeven = new ChapterSeven(size.x, size.y); // from chapter 8 on, the same implementation is re-used m_ChapterEight = new BatchedTracer(ExampleSphereSets.ChapterEight(), CameraFrame.Default, size.x, size.y); m_ChapterNine = new BatchedTracer(ExampleSphereSets.FiveWithDielectric(), CameraFrame.Default, size.x, size.y); m_ChapterTen = new BatchedTracer(ExampleSphereSets.FiveWithDielectric(), CameraFrame.ChapterTen, size.x, size.y); m_ChapterEleven = new BatchedTracer(ExampleSphereSets.FiveWithDielectric(), CameraFrame.ChapterEleven, size.x, size.y); // make sure we get a random seed for our random scene var tempRng = new Unity.Mathematics.Random(); tempRng.InitState((uint)UnityEngine.Random.Range(1, 1000)); m_ChapterTwelve = new BatchedTracer(ExampleSphereSets.RandomScene(500, tempRng.NextUInt()), CameraFrame.ChapterTwelve, size.x, size.y); }
public ChapterFivePage(ConsoleProgram program) : base("Chapter Five", program) { AddOption(new Option("Regular", () => { var chapter = new ChapterFive(); chapter.NormalSphere(); Input.ReadString("Press [Enter] to navigate home"); Program.NavigateTo <ChapterFivePage>(); })); AddOption(new Option("Shrink it along the y axis", () => { var chapter = new ChapterFive(); chapter.ShrinkAlongYAxis(); Input.ReadString("Press [Enter] to navigate home"); Program.NavigateTo <ChapterFivePage>(); })); AddOption(new Option("Shrink it along the x axis", () => { var chapter = new ChapterFive(); chapter.ShrinkAlongXAxis(); Input.ReadString("Press [Enter] to navigate home"); Program.NavigateTo <ChapterFivePage>(); })); AddOption(new Option("Shrink and Rotate", () => { var chapter = new ChapterFive(); chapter.ShrinkAndRotate(); Input.ReadString("Press [Enter] to navigate home"); Program.NavigateTo <ChapterFivePage>(); })); AddOption(new Option("Shrink and skew", () => { var chapter = new ChapterFive(); chapter.ShrinkAndSkew(); Input.ReadString("Press [Enter] to navigate home"); Program.NavigateTo <ChapterFivePage>(); })); }