Esempio n. 1
0
        public static IEnumerable <Plane> VisibilityBoundaries(this IImageModel @this)
        {
            var vertices = @this.Domain.Vertices;

            for (var i = 0; i < 4; i++)
            {
                var los1 = @this.LineOfSight(vertices[i]);
                var los2 = @this.LineOfSight(vertices.ElementAtCyclic(i + 1));

                yield return(Plane.Parametric(@this.OpticalCenter, los2, los1));
            }
        }
Esempio n. 2
0
        public static Ray3?Ray(this IImageModel @this, Vector2 imagePoint)
        {
            var los = @this.LineOfSight(imagePoint);

            if (los == null)
            {
                return(null);
            }
            else
            {
                return(new Ray3(@this.OpticalCenter, los));
            }
        }