• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SceneKitSessionWWDC2013.PresentationViewController类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SceneKitSessionWWDC2013.PresentationViewController的典型用法代码示例。如果您正苦于以下问题:C# PresentationViewController类的具体用法?C# PresentationViewController怎么用?C# PresentationViewController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PresentationViewController类属于SceneKitSessionWWDC2013命名空间,在下文中一共展示了PresentationViewController类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PresentStep

		public override void PresentStep (int index, PresentationViewController presentationViewController)
		{
			// Set the slide's title
			TextManager.SetTitle ("Labs");

			// Add two labs
			var lab1TitleNode = Utils.SCBoxNode ("Scene Kit Lab", new CGRect (-375, -35, 750, 70), NSColor.FromCalibratedWhite (0.15f, 1.0f), 0.0f, false);
			lab1TitleNode.Scale = new SCNVector3 (0.02f, 0.02f, 0.02f);
			lab1TitleNode.Position = new SCNVector3 (-2.8f, 30.7f, 10.0f);
			lab1TitleNode.Rotation = new SCNVector4 (1, 0, 0, (float)(Math.PI));
			lab1TitleNode.Opacity = 0.0f;

			var lab2TitleNode = (SCNNode)lab1TitleNode.Copy ();
			lab2TitleNode.Position = new SCNVector3 (-2.8f, 29.2f, 10.0f);

			ContentNode.AddChildNode (lab1TitleNode);
			ContentNode.AddChildNode (lab2TitleNode);

			var lab1InfoNode = AddLabInfoNode ("\nGraphics and Games Lab A\nTuesday 4:00PM", 30.7f);
			var lab2InfoNode = AddLabInfoNode ("\nGraphics and Games Lab A\nWednesday 9:00AM", 29.2f);

			var delayInSeconds = 0.75;
			var popTime = new DispatchTime (DispatchTime.Now, (long)(delayInSeconds * Utils.NSEC_PER_SEC));
			DispatchQueue.MainQueue.DispatchAfter (popTime, () => {
				SCNTransaction.Begin ();
				SCNTransaction.AnimationDuration = 1;
				lab1TitleNode.Opacity = lab2TitleNode.Opacity = 1.0f;
				lab1TitleNode.Rotation = lab2TitleNode.Rotation = new SCNVector4 (1, 0, 0, 0);
				lab1InfoNode.Opacity = lab2InfoNode.Opacity = 1.0f;
				lab1InfoNode.Rotation = lab2InfoNode.Rotation = new SCNVector4 (0, 1, 0, 0);
				SCNTransaction.Commit ();
			});
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:33,代码来源:SlideLabs.cs


示例2: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			TextManager.SetTitle ("Creating a Scene");

			TextManager.AddBulletAtLevel ("Creating programmatically", 0);
			TextManager.AddBulletAtLevel ("Loading a scene from a file", 0);
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:7,代码来源:SlideCreateAScene.cs


示例3: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			// Load the scene
			var intermediateNode = SCNNode.Create ();
			intermediateNode.Position = new SCNVector3 (6, 9, 0);
			intermediateNode.Scale = new SCNVector3 (1.4f, 1, 1);
			GroundNode.AddChildNode (intermediateNode);

			MapNode = Utils.SCAddChildNode (intermediateNode, "Map", "Scenes/map/foldingMap", 25);
			MapNode.Position = new SCNVector3 (0, 0, 0);
			MapNode.Opacity = 0.0f;

			// Use a bunch of shader modifiers to simulate ambient occlusion when the map is folded
			var geomFile = NSBundle.MainBundle.PathForResource ("Shaders/mapGeometry", "shader");
			var fragFile = NSBundle.MainBundle.PathForResource ("Shaders/mapFragment", "shader");
			var lightFile = NSBundle.MainBundle.PathForResource ("Shaders/mapLighting", "shader");
			var geometryModifier = File.ReadAllText (geomFile);
			var fragmentModifier = File.ReadAllText (fragFile);
			var lightingModifier = File.ReadAllText (lightFile);

			MapNode.Geometry.ShaderModifiers = new SCNShaderModifiers { 
				EntryPointGeometry = geometryModifier,
				EntryPointFragment = fragmentModifier,
				EntryPointLightingModel = lightingModifier
			};
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:26,代码来源:SlideMorphing.cs


示例4: WillOrderOut

		public override void WillOrderOut (PresentationViewController presentationViewController)
		{
			SCNTransaction.Begin ();
			// Switch the light off
			LightNode.Light = null;
			SCNTransaction.Commit ();
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:7,代码来源:SlideLight.cs


示例5: PresentStep

		public override void PresentStep (int index, PresentationViewController presentationViewController)
		{
			switch (index) {
			case 0:
				// Set the slide's title and subtitle and add some text.
				TextManager.SetTitle ("Performance");
				TextManager.SetSubtitle ("Flattening");

				TextManager.AddBulletAtLevel ("Flatten node tree into single node", 0);
				TextManager.AddBulletAtLevel ("Minimize draw calls", 0);

				TextManager.AddCode ("#// Flatten node hierarchy \n"
				+ "var flattenedNode = aNode.#FlattenedClone# ();#");

				break;
			case 1:
				// Discard the text and show a 2D image.
				// Animate the image's position when it appears.

				TextManager.FlipOutText (SlideTextManager.TextType.Code);
				TextManager.FlipOutText (SlideTextManager.TextType.Bullet);

				var imageNode = Utils.SCPlaneNode (NSBundle.MainBundle.PathForResource ("Images/flattening", "png"), 20, false);
				imageNode.Position = new SCNVector3 (0, 4.8f, 16);
				GroundNode.AddChildNode (imageNode);

				SCNTransaction.Begin ();
				SCNTransaction.AnimationDuration = 1;
				imageNode.Position = new SCNVector3 (0, 4.8f, 8);
				SCNTransaction.Commit ();
				break;
			}
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:33,代码来源:SlideFlattening.cs


示例6: PresentStep

		public override void PresentStep (int index, PresentationViewController presentationViewController)
		{
			switch (index) {
			case 0:
				// Set the slide's title
				// And make the bullets we will add later to fade in
				TextManager.SetTitle ("Outline");
				TextManager.FadesIn = true;
				break;
			case 1:
				TextManager.AddBulletAtLevel ("Scene graph", 0);
				break;
			case 2:
				TextManager.AddBulletAtLevel ("Build an application with Scene Kit", 0);
				break;
			case 3:
				TextManager.AddBulletAtLevel ("Extending with OpenGL", 0);
				break;
			case 4:
				TextManager.AddBulletAtLevel ("What’s new in OS X 10.9", 0);
				break;
			case 5:
				TextManager.AddBulletAtLevel ("Performance notes", 0);
				break;
			}
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:26,代码来源:SlideOutline.cs


示例7: PresentStep

		public override void PresentStep (int index, PresentationViewController presentationViewController)
		{
			// Animate by default
			SCNTransaction.Begin ();

			switch (index) {
			case 0:
				// Disable animations for first step
				SCNTransaction.AnimationDuration = 0;

				// Initially dim the torus
				AnimatedNode.Opacity = 0.25f;

				TextManager.HighlightCodeChunks (null);
				break;
			case 1:
				TextManager.HighlightCodeChunks (new int[] { 0, 1 });
				break;
			case 2:
				TextManager.HighlightCodeChunks (new int[] { 2, 3 });
				break;
			case 3:
				TextManager.HighlightCodeChunks (new int[] { 4 });

				// Animate implicitly
				SCNTransaction.AnimationDuration = 2.0f;
				AnimatedNode.Opacity = 1.0f;
				AnimatedNode.Rotation = new SCNVector4 (0, 1, 0, (float)(Math.PI * 4));
				break;
			}

			SCNTransaction.Commit ();
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:33,代码来源:SlideImplicitAnimations.cs


示例8: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			// Create a node to own the "sign" model, make it to be close to the camera, rotate by 90 degree because it's oriented with z as the up axis
			var intermediateNode = SCNNode.Create ();
			intermediateNode.Position = new SCNVector3 (0, 0, 7);
			intermediateNode.Rotation = new SCNVector4 (1, 0, 0, -(float)(Math.PI / 2));
			GroundNode.AddChildNode (intermediateNode);

			// Load the "sign" model
			var signNode = Utils.SCAddChildNode (intermediateNode, "sign", "Scenes/intersection/intersection", 30);
			signNode.Position = new SCNVector3 (4, -2, 0.05f);

			// Re-parent every node that holds a camera otherwise they would inherit the scale from the "sign" model.
			// This is not a problem except that the scale affects the zRange of cameras and so it would be harder to get the transition from one camera to another right
			var cameraNodes = new List<SCNNode> ();
			foreach (SCNNode child in signNode) {
				if (child.Camera != null)
					cameraNodes.Add (child);
			}

			for (var i = 0; i < cameraNodes.Count; i++) {
				var cameraNode = cameraNodes [i];
				var previousWorldTransform = cameraNode.WorldTransform;
				intermediateNode.AddChildNode (cameraNode); // re-parent
				cameraNode.Transform = intermediateNode.ConvertTransformFromNode (previousWorldTransform, null);
				cameraNode.Scale = new SCNVector3 (1, 1, 1);
			}
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:28,代码来源:SlideCamera.cs


示例9: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			// Create the font and the materials that will be shared among the features in the word cloud
			Font = NSFont.FromFontName ("Myriad Set BoldItalic", 50) != null ? NSFont.FromFontName ("Myriad Set BoldItalic", 50) : NSFont.FromFontName ("Avenir Heavy Oblique", 50);

			var frontAndBackMaterial = SCNMaterial.Create ();
			var sideMaterial = SCNMaterial.Create ();
			sideMaterial.Diffuse.Contents = NSColor.DarkGray;

			Materials = new SCNMaterial[] { frontAndBackMaterial, sideMaterial, frontAndBackMaterial };

			// Add different features to the word cloud
			PlaceFeature ("Export to DAE", new CGPoint (10, -8), 0);
			PlaceFeature ("OpenGL Core Profile", new CGPoint (-16, -7), 0.05f);
			PlaceFeature ("Warmup", new CGPoint (-12, -10), 0.1f);
			PlaceFeature ("Constraints", new CGPoint (-10, 6), 0.15f);
			PlaceFeature ("Custom projection", new CGPoint (4, 9), 0.2f);
			PlaceFeature ("Skinning", new CGPoint (-4, 8), 0.25f);
			PlaceFeature ("Morphing", new CGPoint (-3, -8), 0.3f);
			PlaceFeature ("Performance Statistics", new CGPoint (-1, 6), 0.35f);
			PlaceFeature ("CIFilters", new CGPoint (1, 5), 0.85f);
			PlaceFeature ("GLKit Math", new CGPoint (3, -10), 0.45f);
			PlaceFeature ("Depth of Field", new CGPoint (-0.5f, 0), 0.47f);
			PlaceFeature ("Animation Events", new CGPoint (5, 3), 0.50f);
			PlaceFeature ("Shader Modifiers", new CGPoint (7, 2), 0.95f);
			PlaceFeature ("GOBO", new CGPoint (-10, 1), 0.60f);
			PlaceFeature ("Ray testing", new CGPoint (-8, 0), 0.65f);
			PlaceFeature ("Skybox", new CGPoint (8, -1), 0.7f);
			PlaceFeature ("Fresnel", new CGPoint (6, -2), 0.75f);
			PlaceFeature ("SCNShape", new CGPoint (-6, -3), 0.8f);
			PlaceFeature ("Levels of detail", new CGPoint (-11, 3), 0.9f);
			PlaceFeature ("Animation blending", new CGPoint (-2, -5), 1);
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:33,代码来源:SlideAllNew.cs


示例10: PresentStep

		public override void PresentStep (int index, PresentationViewController presentationViewController)
		{
			SCNTransaction.Begin ();
			SCNTransaction.AnimationDuration = 0.5f;

			switch (index) {
			case 0:
				TextManager.SetTitle ("Materials");
				TextManager.SetSubtitle ("Code example");

				TextManager.AddCode ("#// Access the geometry attribute of a node \n"
				+ "var geometry = node.#Geometry#; \n\n"
				+ "// Create a new \"red\" material \n"
				+ "var aMaterial = #SCNMaterial.Create ()#; \n"
				+ "aMaterial.#Diffuse#.Contents = NSColor.Red; \n\n"
				+ "// Set this material to our geometry \n"
				+ "geometry.#FirstMaterial# = aMaterial;#");

				TextManager.HighlightCodeChunks (null);
				break;
			case 1:
				TextManager.HighlightCodeChunks (new int[] { 0 });
				break;
			case 2:
				TextManager.HighlightCodeChunks (new int[] { 1, 2 });
				break;
			case 3:
				TextManager.HighlightCodeChunks (new int[] { 3 });
				break;
			}

			SCNTransaction.Commit ();
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:33,代码来源:SlideMaterialConfigure.cs


示例11: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			// Set the slide's title and subtitle and add some text
			TextManager.SetTitle ("Animations");
			TextManager.SetSubtitle ("Implicit animations");

			TextManager.AddCode ("#// Begin a transaction \n"
			+ "#SCNTransaction#.Begin (); \n"
			+ "#SCNTransaction#.AnimationDuration = 2.0f; \n\n"
			+ "// Change properties \n"
			+ "aNode.#Opacity# = 1.0f; \n"
			+ "aNode.#Rotation# = \n"
			+ " new SCNVector4 (0, 1, 0, NMath.PI * 4); \n\n"
			+ "// Commit the transaction \n"
			+ "SCNTransaction.#Commit ()#;#");

			// A simple torus that we will animate to illustrate the code
			AnimatedNode = SCNNode.Create ();
			AnimatedNode.Position = new SCNVector3 (10, 7, 0);

			// Use an extra node that we can tilt it and cumulate that with the animation
			var torusNode = SCNNode.Create ();
			torusNode.Geometry = SCNTorus.Create (4.0f, 1.5f);
			torusNode.Rotation = new SCNVector4 (1, 0, 0, -(float)(Math.PI * 0.7f));
			torusNode.Geometry.FirstMaterial.Diffuse.Contents = NSColor.Cyan;
			torusNode.Geometry.FirstMaterial.Specular.Contents = NSColor.White;
			torusNode.Geometry.FirstMaterial.Reflective.Contents = new NSImage (NSBundle.MainBundle.PathForResource ("SharedTextures/envmap", "jpg"));
			torusNode.Geometry.FirstMaterial.FresnelExponent = 0.7f;

			AnimatedNode.AddChildNode (torusNode);
			ContentNode.AddChildNode (AnimatedNode);
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:32,代码来源:SlideImplicitAnimations.cs


示例12: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			// Load the character and add it to the scene
			var heroNode = Utils.SCAddChildNode (GroundNode, "heroGroup", "Scenes/hero/hero", 0.0f);

			heroNode.Scale = new SCNVector3 (0.023f, 0.023f, 0.023f);
			heroNode.Position = new SCNVector3 (0.0f, 0.0f, 15.0f);
			heroNode.Rotation = new SCNVector4 (1.0f, 0.0f, 0.0f, -(float)(Math.PI / 2));

			GroundNode.AddChildNode (heroNode);

			// Convert sceneTime-based animations into systemTime-based animations.
			// Animations loaded from DAE files will play according to the `currentTime` property of the scene renderer if this one is playing
			// (see the SCNSceneRenderer protocol). Here we don't play a specific DAE so we want the animations to animate as soon as we add
			// them to the scene (i.e have them to play according the time of the system when the animation was added).

			HeroSkeletonNode = heroNode.FindChildNode ("skeleton", true);

			foreach (var animationKey in HeroSkeletonNode.GetAnimationKeys ()) {
				// Find all the animations. Make them system time based and repeat forever.
				// And finally replace the old animation.

				var animation = HeroSkeletonNode.GetAnimation (animationKey);
				animation.UsesSceneTimeBase = false;
				animation.RepeatCount = float.MaxValue;

				HeroSkeletonNode.AddAnimation (animation, animationKey);
			}

			// Load other animations so that we will use them later
			SetAnimation (CharacterAnimation.Attack, "attackID", "attack");
			SetAnimation (CharacterAnimation.Die, "DeathID", "death");
			SetAnimation (CharacterAnimation.Walk, "WalkID", "walk");
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:34,代码来源:SlideAnimationEvents.cs


示例13: DidOrderIn

		public override void DidOrderIn (PresentationViewController presentationViewController)
		{
			SCNTransaction.Begin ();
			SCNTransaction.AnimationDuration = 1.0f;
			sceneGraphDiagramNode.Opacity = 1.0f;
			SCNTransaction.Commit ();
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:7,代码来源:SlideManipulation2.cs


示例14: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			// Set the slide's title and subtitle and add some text
			TextManager.SetTitle ("Animations");
			TextManager.SetSubtitle ("Explicit animations");

			TextManager.AddCode ("#// Create an animation \n"
			+ "animation = #CABasicAnimation#.FromKeyPath (\"rotation\"); \n\n"
			+ "// Configure the animation \n"
			+ "animation.#Duration# = 2.0f; \n"
			+ "animation.#To# = NSValue.FromVector (new SCNVector4 (0, 1, 0, NMath.PI * 2)); \n"
			+ "animation.#RepeatCount# = float.MaxValue; \n\n"
			+ "// Play the animation \n"
			+ "aNode.#AddAnimation #(animation, \"myAnimation\");#");

			// A simple torus that we will animate to illustrate the code
			AnimatedNode = SCNNode.Create ();
			AnimatedNode.Position = new SCNVector3 (9, 5.7f, 16);

			// Use an extra node that we can tilt it and cumulate that with the animation
			var torusNode = SCNNode.Create ();
			torusNode.Geometry = SCNTorus.Create (4.0f, 1.5f);
			torusNode.Rotation = new SCNVector4 (1, 0, 0, -(float)(Math.PI * 0.5f));
			torusNode.Geometry.FirstMaterial.Diffuse.Contents = NSColor.Cyan;
			torusNode.Geometry.FirstMaterial.Specular.Contents = NSColor.White;
			torusNode.Geometry.FirstMaterial.Reflective.Contents = new NSImage (NSBundle.MainBundle.PathForResource ("SharedTextures/envmap", "jpg"));
			torusNode.Geometry.FirstMaterial.FresnelExponent = 0.7f;

			AnimatedNode.AddChildNode (torusNode);
			ContentNode.AddChildNode (AnimatedNode);
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:31,代码来源:SlideExplicitAnimations.cs


示例15: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			TextManager.SetTitle ("Shader Modifiers");

			TextManager.AddBulletAtLevel ("Inject custom GLSL code", 0);
			TextManager.AddBulletAtLevel ("Combines with Scene Kit’s shaders", 0);
			TextManager.AddBulletAtLevel ("Inject at specific stages", 0);
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:8,代码来源:SlideShaderModifiers.cs


示例16: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			TextManager.SetTitle ("Scene Manipulation");
			TextManager.SetSubtitle ("Animating");

			TextManager.AddBulletAtLevel ("Properties are animatable", 0);
			TextManager.AddBulletAtLevel ("Implicit and explicit animations", 0);
			TextManager.AddBulletAtLevel ("Same programming model as Core Animation", 0);
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:9,代码来源:SlideManipulation4.cs


示例17: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			TextManager.SetTitle ("Rendering a Scene");

			TextManager.AddBulletAtLevel ("Assign the scene to the renderer", 0);
			TextManager.AddBulletAtLevel ("Modifications of the scene graph are automatically reflected", 0);

			TextManager.AddCode ("#// Assign the scene \nSCNView.#Scene# = aScene;#");
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:9,代码来源:SlideRenderAScene.cs


示例18: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			TextManager.SetTitle ("Loading a DAE");
			TextManager.SetSubtitle ("Sample code");

			TextManager.AddCode ("#// Load a DAE"
			+ "\n"
			+ "var scene = SCNScene.#FromFile# (\"yourPath\");#");
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:9,代码来源:SlideSampleLoadingDae.cs


示例19: SetupSlide

		public override void SetupSlide (PresentationViewController presentationViewController)
		{
			TextManager.SetTitle ("Extending Scene Kit with OpenGL");

			TextManager.AddBulletAtLevel ("Scene delegate rendering", 0);
			TextManager.AddBulletAtLevel ("Node delegate rendering", 0);
			TextManager.AddBulletAtLevel ("Material custom program", 0);
			TextManager.AddBulletAtLevel ("Shader modifiers", 0);
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:9,代码来源:SlideExtendingOutline.cs


示例20: PresentStep

		public override void PresentStep (int index, PresentationViewController presentationViewController)
		{
			SCNTransaction.Begin ();
			SCNTransaction.AnimationDuration = 1.5f;

			var cameraNode = presentationViewController.CameraNode;

			switch (index) {
			case 0:
				break;
			case 1:
				// Add a code snippet
				TextManager.AddCode ("#aCamera.#FocalDistance# = 16.0f; \n"
				+ "aCamera.#FocalBlurRadius# = 8.0f;#");
				break;
			case 2:
				// Turn on DOF to illustrate the code snippet
				cameraNode.Camera.FocalDistance = 16;
				cameraNode.Camera.FocalSize = 1.5f;
				cameraNode.Camera.Aperture = 0.3f;
				cameraNode.Camera.FocalBlurRadius = 8;
				break;
			case 3:
				// Focus far away
				cameraNode.Camera.FocalDistance = 35;
				cameraNode.Camera.FocalSize = 4;
				cameraNode.Camera.Aperture = 0.1f;

				// and update the code snippet
				TextManager.FadeOutText (SlideTextManager.TextType.Code);
				TextManager.AddEmptyLine ();
				TextManager.AddCode ("#aCamera.#FocalDistance# = #35.0f#; \n"
				+ "aCamera.#FocalBlurRadius# = 8.0f;#");
				break;
			case 4:
				// Remove the code
				TextManager.FadeOutText (SlideTextManager.TextType.Subtitle);
				TextManager.FadeOutText (SlideTextManager.TextType.Code);

				// Move the camera and adjust tje focal distance
				presentationViewController.CameraHandle.Position = presentationViewController.CameraHandle.ConvertPositionToNode (new SCNVector3 (0, -3, -6), presentationViewController.CameraHandle.ParentNode);
				cameraNode.Camera.FocalDistance = 27;

				// Move the light back a little
				presentationViewController.MainLight.Position = presentationViewController.MainLight.ConvertPositionToNode (new SCNVector3 (0, 3, 6), presentationViewController.MainLight.ParentNode);
				break;
			case 5:
				// Focus near
				cameraNode.Camera.FocalDistance = 10;
				cameraNode.Camera.FocalSize = 1;
				cameraNode.Camera.Aperture = 0.3f;
				break;
			}

			SCNTransaction.Commit ();
		}
开发者ID:RangoLee,项目名称:mac-samples,代码行数:56,代码来源:SlideDOF.cs



注:本文中的SceneKitSessionWWDC2013.PresentationViewController类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SceneLibrary.MatrixFixed类代码示例发布时间:2022-05-26
下一篇:
C# Dom.ChildInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap