Class Envelope1D

    • Field Detail

      • vmin

        public double vmin
      • vmax

        public double vmax
    • Constructor Detail

      • Envelope1D

        public Envelope1D()
      • Envelope1D

        public Envelope1D​(double _vmin,
                          double _vmax)
      • Envelope1D

        public Envelope1D​(Envelope1D other)
    • Method Detail

      • construct

        public static Envelope1D construct​(double _vmin,
                                           double _vmax)
      • setCoords

        public void setCoords​(double _vmin,
                              double _vmax)
      • setCoords

        public void setCoords​(Envelope1D other)
      • normalize

        public void normalize()
      • setEmpty

        public void setEmpty()
      • isEmpty

        public boolean isEmpty()
      • setInfinite

        public void setInfinite()
      • merge

        public void merge​(double v)
      • mergeNE

        public void mergeNE​(double v)
      • contains

        public boolean contains​(double v)
        Returns True if the envelope contains the coordinate (boundary inclusive). Works with NaNs.
        Parameters:
        v - The value to test for containment
        Returns:
        True when vmin <= v && v <= vmax.
      • contains_right_exclusive

        public boolean contains_right_exclusive​(double v)
        Returns True if the envelope contains the coordinate (left side inclusive, right side exclusive). Works with NaNs.
        Parameters:
        v - The value to test for containment
        Returns:
        True when vmin <= v && v < vmax.
      • contains

        public boolean contains​(Envelope1D other)
        Returns True if the envelope contains the other envelope (boundary inclusive). Note: Will return false if either envelope is empty.
        Parameters:
        other - The other envelope
      • move

        public void move​(double dv)
        Moves envelope by given distance.
        Parameters:
        dv - The distance by which the envelopoe is moved
      • isIntersecting

        public boolean isIntersecting​(Envelope1D other)
        Determines if this envelope intersects the other. Note, if this or other are empty, they do not intersect.
        Parameters:
        other - The other envelope
        Returns:
        Returns true if the envelopes intersect
      • intersect

        public void intersect​(Envelope1D other)
        Sets this envelope to be the intersection of this envelope and the other envelope.
        Parameters:
        other - The other envelope
      • inflate

        public void inflate​(double delta)
        Inflates this envelope
        Parameters:
        delta - The amount by which this envelope is inflated.
      • snapClip

        public double snapClip​(double v)
      • getWidth

        public double getWidth()
      • getCenter

        public double getCenter()
      • equals

        public boolean equals​(Envelope1D other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object