Beispiel #1
0
        /// <summary>
        ///     Gets the point.
        /// </summary>
        /// <returns>The point.</returns>
        /// <param name="point">Point.</param>
        /// <param name="index">Index.</param>
        private static IBezierPoint GetPoint(ref BezierPointSerializedProperty point, int index)
        {
            if (point == null)
            {
                point = new BezierPointSerializedProperty();
            }

            int  arraySize = s_PointsProp.arraySize;
            bool repeat    = s_ClosedProp.boolValue;

            if (!repeat && (index < 0 || index >= arraySize))
            {
                return(null);
            }

            index = HydraMathUtils.Repeat(index, arraySize);
            point.serializedProperty = s_PointsProp.GetArrayElementAtIndex(index);

            return(point);
        }
		/// <summary>
		/// 	Gets the point.
		/// </summary>
		/// <returns>The point.</returns>
		/// <param name="point">Point.</param>
		/// <param name="index">Index.</param>
		private static IBezierPoint GetPoint(ref BezierPointSerializedProperty point, int index)
		{
			if (point == null)
				point = new BezierPointSerializedProperty();

			int arraySize = s_PointsProp.arraySize;
			bool repeat = s_ClosedProp.boolValue;

			if (!repeat && (index < 0 || index >= arraySize))
				return null;

			index = HydraMathUtils.Repeat(index, arraySize);
			point.serializedProperty = s_PointsProp.GetArrayElementAtIndex(index);

			return point;
		}