Class Interval

Represents an interval in one-dimensional space that is defined as two extrema or bounds.

Hierarchy

  • Interval

Constructors

  • Initializes a new instance of the Interval class.

    Parameters

    • t0: number

      The first bound of the interval.

    • t1: number

      The second bound of the interval.

    Returns Interval

Properties

t0: number
t1: number

Accessors

  • get IsDecreasing(): boolean
  • Returns true if T0 > T1.

    Returns boolean

  • get IsIncreasing(): boolean
  • Returns true if T0 < T1.

    Returns boolean

  • get IsSingleton(): boolean
  • Returns true if T0 == T1.

    Returns boolean

  • get IsValid(): boolean
  • Gets a value indicating whether or not this Interval is valid. Valid intervals must contain valid numbers.

    Returns boolean

  • get Length(): number
  • Gets the signed length of the numeric range. If the interval is not valid, 0 is returned.

    Remarks

    If the interval is decreasing, a negative length will be returned.

    Returns number

  • get Max(): number
  • Gets the larger of T0 and T1. If the interval is not valid, NaN is returned.

    Returns number

  • get Mid(): number
  • Gets the average of T0 and T1. If the interval is not valid, NaN is returned.

    Returns number

  • get Min(): number
  • Gets the smaller of T0 and T1. If the interval is not valid, NaN is returned.

    Returns number

  • get T0(): number
  • Gets or sets the lower bound of the Interval.

    Returns number

  • set T0(value: number): void
  • Gets or sets the lower bound of the Interval.

    Parameters

    • value: number

    Returns void

  • get T1(): number
  • Gets or sets the upper bound of the Interval.

    Returns number

  • set T1(value: number): void
  • Gets or sets the upper bound of the Interval.

    Parameters

    • value: number

    Returns void

  • get Empty(): Interval
  • returns an empty interval that goes from 0 to 0.

    Returns Interval

  • get Invalid(): Interval
  • returns an invalid interval that goes from NaN to NaN.

    Remarks

    An invalid interval is not valid and cannot be used for any calculations.

    Returns Interval

Methods

  • Shifts a interval by a specific amount (addition).

    Returns

    A new interval where T0 and T1 are summed with number.

    Parameters

    • value: number

    Returns Interval

  • Clones this instance and returns a new Interval.

    Returns

    A new Interval with the same values as this instance.

    Returns Interval

  • Compares this interval with another interval. The lower bound has first evaluation priority.

    Returns

    0: if this is identical to other; -1: if this is less than other; 1: if this is greater than other.

    Remarks

    if either interval is invalid, the comparison is invalid and returns NaN.

    Parameters

    Returns number

  • Check that all values in other are within epsilon of the values in this

    Returns

    Parameters

    • other: Interval
    • epsilon: number = Open3d.EPSILON

    Returns boolean

  • Determines whether the specified interval is equal to the current interval,

    Parameters

    Returns boolean

  • Check if the interval is greater than another interval.

    Returns

    Parameters

    Returns boolean

  • Determines whether the first specified Interval comes after (has superior sorting value than) the second Interval, or is equal to it.

    Returns

    Parameters

    Returns boolean

  • Grows the interval to include the given number.

    Returns

    A new Interval that includes the given number.

    Parameters

    • value: number

      Number to include in this interval.

    Returns Interval

  • Tests a parameter for Interval inclusion.

    Returns

    true if the other interval is contained within or is coincident with the limits of this Interval; otherwise false.

    Parameters

    • other: Interval
    • strict: boolean = false

      If true, the parameter must be fully on the inside of the Interval. default is false.

    Returns boolean

  • Tests a parameter for Interval inclusion.

    Returns

    true if t is contained within the limits of this Interval.

    Parameters

    • parameter: number
    • strict: boolean = false

      If true, the parameter must be fully on the inside of the Interval. default is false.

    Returns boolean

  • Intersection of two intervals.

    Returns

    A new Interval that is the intersection of this and other.

    Parameters

    Returns Interval

  • Check if the interval is less than another interval.

    Returns

    Parameters

    Returns boolean

  • Determines whether the first specified Interval comes before (has inferior sorting value than) the second Interval, or is equal to it.

    Returns

    Parameters

    Returns boolean

  • Returns a ensured increasing interval.

    Returns Interval

  • Converts interval value, or pair of values, to normalized parameter.

    Returns

    Normalized parameter x so that min*(1.0-x) + max*x = intervalParameter.

    Parameters

    Returns Interval

  • Converts interval value, or pair of values, to normalized parameter.

    Returns

    Normalized parameter x so that min*(1.0-x) + max*x = intervalParameter.

    Parameters

    • intervalParameter: number

    Returns number

  • Converts normalized parameter to interval value, or pair of values.

    Returns

    Interval parameter min*(1.0-normalizedParameter) + max*normalizedParameter.

    Parameters

    • normalizedParameter: number

    Returns number

  • Converts normalized parameter to interval value, or pair of values.

    Returns

    Interval parameter min*(1.0-normalizedParameter) + max*normalized_paramete.

    Parameters

    Returns Interval

  • Changes interval to [-T1, -T0].

    Returns

    A new Interval with [-T1, -T0].

    Remarks

    If the interval is not valid, an empty interval will be returned.

    Returns Interval

  • Shifts an interval by a specific amount (subtraction).

    Returns

    A new interval with [T0-number, T1-number].

    Parameters

    • value: number

    Returns Interval

  • Exchanges T0 and T1.

    Returns

    A new Interval with T0 and T1 swapped.

    Returns Interval

  • Returns string

  • Union of two intervals.

    Returns

    A new Interval that is the union of this and other.

    Parameters

    Returns Interval

  • Initializes a new instance copying the other instance values.

    Returns

    Parameters

    Returns Interval

Generated using TypeDoc