public override void DidOrderIn (PresentationViewController presentationViewController) { var banana = Utils.SCAddChildNode (ContentNode, "banana", "Scenes.scnassets/banana/banana", 5); banana.Rotation = new SCNVector4 (1, 0, 0, -(float)(Math.PI / 2)); banana.RunAction (SCNAction.RepeatActionForever (SCNAction.RotateBy (0, NMath.PI * 2, 0, 1.5f))); banana.Position = new SCNVector3 (2.5f, 5, 10); var gaussianBlurFilter = new CIGaussianBlur () { Radius = 10 }; gaussianBlurFilter.SetDefaults (); banana.Filters = new CIFilter[] { gaussianBlurFilter }; banana = (SCNNode)banana.Copy (); ContentNode.AddChildNode (banana); banana.Position = new SCNVector3 (6, 5, 10); var pixellateFilter = new CIPixellate (); pixellateFilter.SetDefaults (); banana.Filters = new CIFilter[] { pixellateFilter }; banana = (SCNNode)banana.Copy (); ContentNode.AddChildNode (banana); banana.Position = new SCNVector3 (9.5f, 5, 10); var edgeWorkFilter = new CIEdgeWork (); edgeWorkFilter.SetDefaults (); banana.Filters = new CIFilter[] { edgeWorkFilter }; }
public override void DidOrderIn(PresentationViewController presentationViewController) { var banana = Utils.SCAddChildNode(ContentNode, "banana", "Scenes.scnassets/banana/banana", 5); banana.Rotation = new SCNVector4(1, 0, 0, -(float)(Math.PI / 2)); banana.RunAction(SCNAction.RepeatActionForever(SCNAction.RotateBy(0, NMath.PI * 2, 0, 1.5f))); banana.Position = new SCNVector3(2.5f, 5, 10); var gaussianBlurFilter = new CIGaussianBlur() { Radius = 10 }; gaussianBlurFilter.SetDefaults(); banana.Filters = new CIFilter[] { gaussianBlurFilter }; banana = (SCNNode)banana.Copy(); ContentNode.AddChildNode(banana); banana.Position = new SCNVector3(6, 5, 10); var pixellateFilter = new CIPixellate(); pixellateFilter.SetDefaults(); banana.Filters = new CIFilter[] { pixellateFilter }; banana = (SCNNode)banana.Copy(); ContentNode.AddChildNode(banana); banana.Position = new SCNVector3(9.5f, 5, 10); var filter = CIFilter.FromName("CIEdgeWork"); filter.SetDefaults(); banana.Filters = new CIFilter[] { filter }; }
/// <summary> /// Pixelates the original image. /// </summary> /// <returns>The altered image.</returns> CIImage Pixellate () { var pixellate = new CIPixellate () { Image = flower, }; return pixellate.OutputImage; }