Exemplo n.º 1
0
        public static FeatureHitTestResult[] HitTestWithFeatures(this ARSCNView self, CGPoint pt)
        {
            var results = new List <FeatureHitTestResult>();
            var ray     = self.HitTestRayFromScreenPos(pt);

            if (ray == null)
            {
                return(results.ToArray());
            }
            var result = self.HitTestFromOrigin(ray.Origin, ray.Direction);

            if (result != null)
            {
                results.Add(result);
            }
            return(results.ToArray());
        }
Exemplo n.º 2
0
        public static IList <FeatureHitTestResult> HitTestWithFeatures(this ARSCNView view, CGPoint point)
        {
            var results = new List <FeatureHitTestResult>();

            var ray = view.HitTestRayFromScreenPosition(point);

            if (ray.HasValue)
            {
                var result = view.HitTestFromOrigin(ray.Value.Origin, ray.Value.Direction);
                if (result.HasValue)
                {
                    results.Add(result.Value);
                }
            }

            return(results);
        }