/// <summary> /// /// </summary> /// <param name="startPosition">The starting position of the arc.</param> /// <param name="degrees">Number of degrees to extent. MUST be between -90 and 90 degrees, otherwise unpredictable consequences occur.</param> /// <param name="center">The center point of circle on which the Arc lies.</param> /// <param name="precision">The distance tolerance from which a point can be considered within the arc.</param> /// <param name="orientation">ARC_ORIENTATION enum, specifying which plane the arc resides in</param> public ArcCheck(Vector3 startPosition, float degrees, Vector3 center, float precision = 0.4f, ARC_ORIENTATION orientation = ARC_ORIENTATION.XY) { this.startPosition = startPosition; this.degrees = degrees; this.center = center; this.radius = Vector3.Distance(center, startPosition); this.precision = precision; this.orientation = orientation; }
/// <summary> /// Create an Arc Check used to determine whether a point fits inside the defined Arc. /// </summary> /// <param name="startPosition">The starting position of the arc.</param> /// <param name="degrees">Number of degrees to extent. MUST be between -90 and 90 degrees, otherwise unpredictable consequences occur.</param> /// <param name="center">The center point of circle on which the Arc lies.</param> /// <param name="tolerance">The distance tolerance from which a point can be considered within the arc</param> /// <param name="orientation">ARC_ORIENTATION enum, specifying which plane the arc resides in</param> public ArcCheck(Vector3 startPosition, float degrees, Vector3 center, float tolerance = 0.4f, ARC_ORIENTATION orientation = ARC_ORIENTATION.XY) { this.startPosition = startPosition; this.degrees = Mathf.Clamp(degrees, -90.0f, 90.0f); this.center = center; this.radius = Vector3.Distance(center, startPosition); this.tolerance = tolerance; this.orientation = orientation; }