Example #1
0
        /// <summary>
        /// Contructs a point on the normal of a given surface at a given offset
        /// </summary>
        /// <param name="contextSurface">Input surface</param>
        /// <param name="u">U parameter value</param>
        /// <param name="v">V parameter value</param>
        /// <param name="offset">Offset in the direction of normal</param>
        /// <returns>Point</returns>
        internal static Point AtParameter(Surface contextSurface, double u, double v, double offset)
        {
            if (contextSurface == null)
            {
                return(null);
            }

            var pt = contextSurface.PointAtParametersCore(ref u, ref v, offset);

            if (null == pt)
            {
                return(null);
            }

            pt.Context  = contextSurface;
            pt.U        = u;
            pt.V        = v;
            pt.Distance = offset;
            pt.Persist();
            return(pt);
        }
Example #2
0
        /// <summary>
        /// Contructs a point on the normal of a given surface at a given offset
        /// </summary>
        /// <param name="contextSurface">Input surface</param>
        /// <param name="u">U parameter value</param>
        /// <param name="v">V parameter value</param>
        /// <param name="offset">Offset in the direction of normal</param>
        /// <returns>Point</returns>
        internal static Point AtParameter(Surface contextSurface, double u, double v, double offset)
        {
            if (contextSurface == null)
            return null;

              var pt = contextSurface.PointAtParametersCore(ref u, ref v, offset);
              if (null == pt)
            return null;

              pt.Context = contextSurface;
              pt.U = u;
              pt.V = v;
              pt.Distance = offset;
              pt.Persist();
              return pt;
        }