public override void DidOrderIn(PresentationViewController presentationViewController) { SCNTransaction.Begin(); SCNTransaction.AnimationDuration = 1.0f; SlideSceneGraph.ScenegraphDiagramGoToStep(5); SceneGraphDiagramNode.Opacity = 1.0f; SCNTransaction.Commit(); }
public override void SetupSlide(PresentationViewController presentationViewController) { TextManager.SetTitle("Materials"); TextManager.AddBulletAtLevel("Determines the appearance of the geometry", 0); TextManager.AddBulletAtLevel("SCNMaterial", 0); TextManager.AddBulletAtLevel("Material properties", 0); TextManager.AddBulletAtLevel("SCNMaterialProperty", 1); TextManager.AddBulletAtLevel("Contents is a color or an image", 1); // Prepare the diagram but hide it for now SceneGraphDiagramNode = SlideSceneGraph.SharedScenegraphDiagramNode(); SlideSceneGraph.ScenegraphDiagramGoToStep(0); SceneGraphDiagramNode.Position = new SCNVector3(3.0f, 8.0f, 0); SceneGraphDiagramNode.Opacity = 0.0f; ContentNode.AddChildNode(SceneGraphDiagramNode); }
public override void PresentStep(int index, PresentationViewController presentationViewController) { var diagramNode = SlideSceneGraph.SharedScenegraphDiagramNode(); SlideSceneGraph.ScenegraphDiagramGoToStep(index); switch (index) { case 0: diagramNode.Opacity = 0.0f; diagramNode.Position = new SCNVector3(0.0f, 5.0f, 0.0f); diagramNode.Rotation = new SCNVector4(1, 0, 0, -(float)(Math.PI / 2)); break; case 1: SCNTransaction.Begin(); SCNTransaction.AnimationDuration = 0; TextManager.FlipOutText(SlideTextManager.TextType.Bullet); TextManager.FlipOutText(SlideTextManager.TextType.Subtitle); // Change the slide's subtitle and add some text TextManager.SetSubtitle("Node"); TextManager.AddBulletAtLevel("SCNNode", 0); TextManager.AddBulletAtLevel("A location in 3D space", 0); TextManager.AddBulletAtLevel("Position / Rotation / Scale", 1); TextManager.FlipInText(SlideTextManager.TextType.Subtitle); TextManager.FlipInText(SlideTextManager.TextType.Bullet); SCNTransaction.Commit(); break; case 2: TextManager.AddBulletAtLevel("Hierarchy of nodes", 0); TextManager.AddBulletAtLevel("Relative to the parent node", 1); break; case 3: SCNTransaction.Begin(); SCNTransaction.AnimationDuration = 0; TextManager.FlipOutText(SlideTextManager.TextType.Bullet); TextManager.FlipOutText(SlideTextManager.TextType.Subtitle); // Change the slide's subtitle and add some text TextManager.SetSubtitle("Node attributes"); TextManager.AddBulletAtLevel("Geometry", 0); TextManager.AddBulletAtLevel("Camera", 0); TextManager.AddBulletAtLevel("Light", 0); TextManager.AddBulletAtLevel("Can be shared", 0); TextManager.FlipInText(SlideTextManager.TextType.Subtitle); TextManager.FlipInText(SlideTextManager.TextType.Bullet); SCNTransaction.Commit(); SCNTransaction.Begin(); SCNTransaction.AnimationDuration = 1.0f; // move the diagram up otherwise it would intersect the floor diagramNode.Position = new SCNVector3(0.0f, diagramNode.Position.Y + 1.0f, 0.0f); SCNTransaction.Commit(); break; } }