public override void DidAddNode(ISCNSceneRenderer renderer, SCNNode node, ARAnchor anchor) { if (anchor is ARFaceAnchor) { var faceGeometry = ARSCNFaceGeometry.Create(renderer.GetDevice()); node.Geometry = faceGeometry; node.Geometry.FirstMaterial.FillMode = SCNFillMode.Fill; node.Opacity = 0.8f; } }
public void AddFaceToNode(SCNNode node) { var face = new FaceNode(ARSCNFaceGeometry.Create(SCNView.Device)); Faces.Add(face); SCNView.Scene.RootNode.Add(face); face.Position = SCNView.PointOfView.ConvertPositionToNode(new SCNVector3(0, 0, -1), SCNView.Scene.RootNode); }
public void AddFace() { var face = new FaceNode(ARSCNFaceGeometry.Create(SCNView.Device)); Faces.Add(face); SCNView.Scene.RootNode.Add(face); face.Position = SCNView.PointOfView.ConvertPositionToNode(new SCNVector3(0, 0, -1), SCNView.Scene.RootNode); var hover = 0.05f; face.RunAction(SCNAction.RepeatActionForever( SCNAction.Sequence(new[] { SCNAction.MoveBy(0, hover, 0, 2).Ease(SCNActionTimingMode.EaseInEaseOut), SCNAction.MoveBy(0, -hover, 0, 2).Ease(SCNActionTimingMode.EaseInEaseOut) }))); }
public override SCNScene GetInitialScene() { FaceNode = new FaceNode(ARSCNFaceGeometry.Create(SCNView.Device)); return(base.GetInitialScene()); }