/// <summary> /// Initializes a new instance of the <see cref="Path3D" /> class. /// </summary> /// <param name="start"> /// The starting point in a 3D plane /// </param> /// <param name="end"> /// The ending point in a 3D plane /// </param> /// <param name="duration"> /// The time in miliseconds that the animator must play this path /// </param> /// <param name="function"> /// The animation function /// </param> /// <exception cref="ArgumentOutOfRangeException"> /// Duration is less than zero /// </exception> public Path3D(Float3D start, Float3D end, ulong duration, AnimationFunctions.Function function) : this( new Path(start.X, end.X, duration, function), new Path(start.Y, end.Y, duration, function), new Path(start.Z, end.Z, duration, function)) { }
/// <summary> /// Initializes a new instance of the <see cref="Path3D" /> class. /// </summary> /// <param name="start"> /// The starting point in a 3D plane /// </param> /// <param name="end"> /// The ending point in a 3D plane /// </param> /// <param name="duration"> /// The time in miliseconds that the animator must play this path /// </param> /// <exception cref="ArgumentOutOfRangeException"> /// Duration is less than zero /// </exception> public Path3D(Float3D start, Float3D end, ulong duration) : this( new Path(start.X, end.X, duration), new Path(start.Y, end.Y, duration), new Path(start.Z, end.Z, duration)) { }
/// <summary> /// Continue the last paths with a new one /// </summary> /// <param name="paths">Array of paths</param> /// <param name="end">Next point to follow</param> /// <param name="duration">Duration of the animation</param> /// <param name="delay">Starting delay</param> /// <returns>An array of paths including the newly created one</returns> public static Path3D[] ContinueTo(this Path3D[] paths, Float3D end, ulong duration, ulong delay) { return(paths.Concat(new[] { new Path3D(paths.Last().End, end, duration, delay) }).ToArray()); }
/// <summary> /// Continue the last paths with a new one /// </summary> /// <param name="paths">Array of paths</param> /// <param name="end">Next point to follow</param> /// <param name="duration">Duration of the animation</param> /// <param name="function">Animation controller function</param> /// <returns>An array of paths including the newly created one</returns> public static Path3D[] ContinueTo(this Path3D[] paths, Float3D end, ulong duration, AnimationFunctions.Function function) { return(paths.Concat(new[] { new Path3D(paths.Last().End, end, duration, function) }).ToArray()); }
/// <summary> /// Continue the path with a new one /// </summary> /// <param name="path">The path to continue</param> /// <param name="end">Next point to follow</param> /// <param name="duration">Duration of the animation</param> /// <param name="delay">Starting delay</param> /// <param name="function">Animation controller function</param> /// <returns>An array of paths including the newly created one</returns> public static Path3D[] ContinueTo(this Path3D path, Float3D end, ulong duration, ulong delay, AnimationFunctions.Function function) { return(path.ToArray().ContinueTo(end, duration, delay, function)); }
/// <summary> /// Continue the path with a new one /// </summary> /// <param name="path">The path to continue</param> /// <param name="end">Next point to follow</param> /// <param name="duration">Duration of the animation</param> /// <param name="delay">Starting delay</param> /// <returns>An array of paths including the newly created one</returns> public static Path3D[] ContinueTo(this Path3D path, Float3D end, ulong duration, ulong delay) { return(path.ToArray().ContinueTo(end, duration, delay)); }
/// <summary> /// Creates and returns a new instance of the <see cref="Float3D" /> class from this instance /// </summary> /// <param name="color">The object to create the <see cref="Float3D" /> instance from</param> /// <returns>The newly created <see cref="Float3D" /> instance</returns> public static Float3D ToFloat3D(this Color color) { return(Float3D.FromColor(color)); }