Interface Tuple3D<RT extends Tuple3D<? super RT>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void absolute()
      Sets each component of this tuple to its absolute value.
      default void absolute​(Tuple3D<?> tuple)
      Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
      default void add​(double x, double y, double z)
      Sets the value of this tuple to the sum of itself and x and y.
      default void add​(int x, int y, int z)
      Sets the value of this tuple to the sum of itself and x and y.
      default void addX​(double x)
      Sets the x value of this tuple to the sum of itself and x.
      default void addX​(int x)
      Sets the x value of this tuple to the sum of itself and x.
      default void addY​(double y)
      Sets the y value of this tuple to the sum of itself and y.
      default void addY​(int y)
      Sets the y value of this tuple to the sum of itself and y.
      default void addZ​(double z)
      Sets the z value of this tuple to the sum of itself and z.
      default void addZ​(int z)
      Sets the z value of this tuple to the sum of itself and z.
      default void clamp​(double min, double max)
      Clamps this tuple to the range [low, high].
      default void clamp​(double min, double max, Tuple3D<?> tuple)
      Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
      default void clamp​(int min, int max)
      Clamps this tuple to the range [low, high].
      default void clamp​(int min, int max, Tuple3D<?> tuple)
      Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
      default void clampMax​(double max)
      Clamps the maximum value of this tuple to the max parameter.
      default void clampMax​(double max, Tuple3D<?> tuple)
      Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
      default void clampMax​(int max)
      Clamps the maximum value of this tuple to the max parameter.
      default void clampMax​(int max, Tuple3D<?> tuple)
      Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
      default void clampMin​(double min)
      Clamps the minimum value of this tuple to the min parameter.
      default void clampMin​(double min, Tuple3D<?> tuple)
      Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
      default void clampMin​(int min)
      Clamps the minimum value of this tuple to the min parameter.
      default void clampMin​(int min, Tuple3D<?> tuple)
      Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
      RT clone()
      Clone this point.
      default boolean epsilonEquals​(Tuple3D<?> tuple, double epsilon)
      Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false.
      boolean equals​(Object t1)
      Returns true if the Object t1 is of type Tuple2f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f.
      default boolean equals​(Tuple3D<?> tuple)
      Returns true if all of the data members of Tuple2f t1 are equal to the corresponding data members in this Tuple2f.
      default void get​(double[] tuple)
      Copies the value of the elements of this tuple into the array tuple.
      default void get​(int[] tuple)
      Copies the value of the elements of this tuple into the array tuple.
      default void get​(Tuple3D<?> tuple)
      Copies the values of this tuple into the tuple tuple.
      double getX()
      Get the x coordinate.
      double getY()
      Get the y coordinate.
      double getZ()
      Get the z coordinate.
      int hashCode()
      Returns a hash code value based on the data values in this object.
      default void interpolate​(Tuple3D<?> tuple, double alpha)
      Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.
      default void interpolate​(Tuple3D<?> tuple1, Tuple3D<?> tuple2, double alpha)
      Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.
      int ix()
      Get the x coordinate.
      int iy()
      Get the y coordinate.
      int iz()
      Get the z coordinate.
      default void negate()
      Negates the value of this tuple in place.
      default void negate​(Tuple3D<?> tuple)
      Sets the value of this tuple to the negation of tuple t1.
      default void scale​(double scale)
      Sets the value of this tuple to the scalar multiplication of the scale factor with this.
      default void scale​(double scale, Tuple3D<?> tuple)
      Sets the value of this tuple to the scalar multiplication of tuple t1.
      default void scale​(int scale)
      Sets the value of this tuple to the scalar multiplication of the scale factor with this.
      default void scale​(int scale, Tuple3D<?> tuple)
      Sets the value of this tuple to the scalar multiplication of tuple t1.
      default void set​(double[] tuple)
      Sets the value of this tuple from the 2 values specified in the array.
      default void set​(double x, double y, double z)
      Sets the value of this tuple to the specified x and y and z coordinates.
      default void set​(int[] tuple)
      Sets the value of this tuple from the 3 values specified in the array.
      default void set​(int x, int y, int z)
      Sets the value of this tuple to the specified x and y and z coordinates.
      default void set​(Tuple3D<?> tuple)
      Sets the value of this tuple to the value of tuple t1.
      void setX​(double x)
      Set the x coordinate.
      void setX​(int x)
      Set the x coordinate.
      void setY​(double y)
      Set the y coordinate.
      void setY​(int y)
      Set the y coordinate.
      void setZ​(double z)
      Set the z coordinate.
      void setZ​(int z)
      Set the z coordinate.
      default void sub​(double x, double y, double z)
      Sets the value of this tuple to the difference of itself and x, y and z.
      default void sub​(int x, int y, int z)
      Sets the value of this tuple to the difference of itself and x, y and z.
      default void subX​(double x)
      Sets the x value of this tuple to the difference of itself and x.
      default void subX​(int x)
      Sets the x value of this tuple to the difference of itself and x.
      default void subY​(double y)
      Sets the y value of this tuple to the difference of itself and y.
      default void subY​(int y)
      Sets the y value of this tuple to the difference of itself and y.
      default void subZ​(double z)
      Sets the z value of this tuple to the difference of itself and z.
      default void subZ​(int z)
      Sets the z value of this tuple to the difference of itself and z.
    • Method Detail

      • clone

        @Pure
        RT clone()
        Clone this point.
        Returns:
        the clone.
      • absolute

        default void absolute()
        Sets each component of this tuple to its absolute value.
      • absolute

        default void absolute​(Tuple3D<?> tuple)
        Sets each component of the tuple parameter to its absolute value and places the modified values into this tuple.
        Parameters:
        tuple - the source tuple, which will not be modified
      • add

        default void add​(int x,
                         int y,
                         int z)
        Sets the value of this tuple to the sum of itself and x and y.
        Parameters:
        x - x coordinate to add.
        y - y coordinate to add.
        z - z coordinate to add.
      • add

        default void add​(double x,
                         double y,
                         double z)
        Sets the value of this tuple to the sum of itself and x and y.
        Parameters:
        x - x coordinate to add.
        y - y coordinate to add.
        z - z coordinate to add.
      • addX

        default void addX​(int x)
        Sets the x value of this tuple to the sum of itself and x.
        Parameters:
        x - x coordinate to add.
      • addX

        default void addX​(double x)
        Sets the x value of this tuple to the sum of itself and x.
        Parameters:
        x - x coordinate to add.
      • addY

        default void addY​(int y)
        Sets the y value of this tuple to the sum of itself and y.
        Parameters:
        y - y coordinate to add.
      • addY

        default void addY​(double y)
        Sets the y value of this tuple to the sum of itself and y.
        Parameters:
        y - y coordinate to add.
      • addZ

        default void addZ​(int z)
        Sets the z value of this tuple to the sum of itself and z.
        Parameters:
        z - z coordinate to add.
      • addZ

        default void addZ​(double z)
        Sets the z value of this tuple to the sum of itself and z.
        Parameters:
        z - z coordinate to add.
      • clamp

        default void clamp​(int min,
                           int max)
        Clamps this tuple to the range [low, high].
        Parameters:
        min - the lowest value in this tuple after clamping
        max - the highest value in this tuple after clamping
      • clamp

        default void clamp​(int min,
                           int max,
                           Tuple3D<?> tuple)
        Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
        Parameters:
        min - the lowest value in the tuple after clamping
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clamp

        default void clamp​(double min,
                           double max)
        Clamps this tuple to the range [low, high].
        Parameters:
        min - the lowest value in this tuple after clamping
        max - the highest value in this tuple after clamping
      • clamp

        default void clamp​(double min,
                           double max,
                           Tuple3D<?> tuple)
        Clamps the tuple parameter to the range [low, high] and places the values into this tuple.
        Parameters:
        min - the lowest value in the tuple after clamping
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMin

        default void clampMin​(int min)
        Clamps the minimum value of this tuple to the min parameter.
        Parameters:
        min - the lowest value in this tuple after clamping
      • clampMin

        default void clampMin​(double min)
        Clamps the minimum value of this tuple to the min parameter.
        Parameters:
        min - the lowest value in this tuple after clamping
      • clampMin

        default void clampMin​(int min,
                              Tuple3D<?> tuple)
        Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
        Parameters:
        min - the lowest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMin

        default void clampMin​(double min,
                              Tuple3D<?> tuple)
        Clamps the minimum value of the tuple parameter to the min parameter and places the values into this tuple.
        Parameters:
        min - the lowest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMax

        default void clampMax​(int max)
        Clamps the maximum value of this tuple to the max parameter.
        Parameters:
        max - the highest value in the tuple after clamping
      • clampMax

        default void clampMax​(double max)
        Clamps the maximum value of this tuple to the max parameter.
        Parameters:
        max - the highest value in the tuple after clamping
      • clampMax

        default void clampMax​(int max,
                              Tuple3D<?> tuple)
        Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
        Parameters:
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • clampMax

        default void clampMax​(double max,
                              Tuple3D<?> tuple)
        Clamps the maximum value of the tuple parameter to the max parameter and places the values into this tuple.
        Parameters:
        max - the highest value in the tuple after clamping
        tuple - the source tuple, which will not be modified
      • get

        default void get​(Tuple3D<?> tuple)
        Copies the values of this tuple into the tuple tuple.
        Parameters:
        tuple - is the target tuple
      • get

        default void get​(int[] tuple)
        Copies the value of the elements of this tuple into the array tuple.
        Parameters:
        tuple - the array that will contain the values of the vector
      • get

        default void get​(double[] tuple)
        Copies the value of the elements of this tuple into the array tuple.
        Parameters:
        tuple - the array that will contain the values of the vector
      • negate

        default void negate​(Tuple3D<?> tuple)
        Sets the value of this tuple to the negation of tuple t1.
        Parameters:
        tuple - the source tuple
      • negate

        default void negate()
        Negates the value of this tuple in place.
      • scale

        default void scale​(int scale,
                           Tuple3D<?> tuple)
        Sets the value of this tuple to the scalar multiplication of tuple t1.
        Parameters:
        scale - the scalar value
        tuple - the source tuple
      • scale

        default void scale​(double scale,
                           Tuple3D<?> tuple)
        Sets the value of this tuple to the scalar multiplication of tuple t1.
        Parameters:
        scale - the scalar value
        tuple - the source tuple
      • scale

        default void scale​(int scale)
        Sets the value of this tuple to the scalar multiplication of the scale factor with this.
        Parameters:
        scale - the scalar value
      • scale

        default void scale​(double scale)
        Sets the value of this tuple to the scalar multiplication of the scale factor with this.
        Parameters:
        scale - the scalar value
      • set

        default void set​(Tuple3D<?> tuple)
        Sets the value of this tuple to the value of tuple t1.
        Parameters:
        tuple - the tuple to be copied
      • set

        default void set​(int x,
                         int y,
                         int z)
        Sets the value of this tuple to the specified x and y and z coordinates.
        Parameters:
        x - the x coordinate
        y - the y coordinate
        z - the z coordinate
      • set

        default void set​(double x,
                         double y,
                         double z)
        Sets the value of this tuple to the specified x and y and z coordinates.
        Parameters:
        x - the x coordinate
        y - the y coordinate
        z - the z coordinate
      • set

        default void set​(int[] tuple)
        Sets the value of this tuple from the 3 values specified in the array.
        Parameters:
        tuple - the array of length 2 containing xyz in order
      • set

        default void set​(double[] tuple)
        Sets the value of this tuple from the 2 values specified in the array.
        Parameters:
        tuple - the array of length 2 containing xy in order
      • getX

        @Pure
        double getX()
        Get the x coordinate.
        Returns:
        the x coordinate.
      • ix

        @Pure
        int ix()
        Get the x coordinate.
        Returns:
        the x coordinate.
      • setX

        void setX​(int x)
        Set the x coordinate.
        Parameters:
        x - value to x coordinate.
      • setX

        void setX​(double x)
        Set the x coordinate.
        Parameters:
        x - value to x coordinate.
      • getY

        @Pure
        double getY()
        Get the y coordinate.
        Returns:
        the y coordinate.
      • iy

        @Pure
        int iy()
        Get the y coordinate.
        Returns:
        the y coordinate.
      • setY

        void setY​(int y)
        Set the y coordinate.
        Parameters:
        y - value to y coordinate.
      • setY

        void setY​(double y)
        Set the y coordinate.
        Parameters:
        y - value to y coordinate.
      • getZ

        @Pure
        double getZ()
        Get the z coordinate.
        Returns:
        the z coordinate.
      • iz

        @Pure
        int iz()
        Get the z coordinate.
        Returns:
        the z coordinate.
      • setZ

        void setZ​(int z)
        Set the z coordinate.
        Parameters:
        z - value to z coordinate.
      • setZ

        void setZ​(double z)
        Set the z coordinate.
        Parameters:
        z - value to z coordinate.
      • sub

        default void sub​(int x,
                         int y,
                         int z)
        Sets the value of this tuple to the difference of itself and x, y and z.
        Parameters:
        x - x coordinate to substract.
        y - y coordinate to substract.
        z - y coordinate to substract.
      • sub

        default void sub​(double x,
                         double y,
                         double z)
        Sets the value of this tuple to the difference of itself and x, y and z.
        Parameters:
        x - x coordinate to substract.
        y - y coordinate to substract.
        z - y coordinate to substract.
      • subX

        default void subX​(int x)
        Sets the x value of this tuple to the difference of itself and x.
        Parameters:
        x - x coordinate to substract.
      • subX

        default void subX​(double x)
        Sets the x value of this tuple to the difference of itself and x.
        Parameters:
        x - x coordinate to substract.
      • subY

        default void subY​(int y)
        Sets the y value of this tuple to the difference of itself and y.
        Parameters:
        y - y coordinate to substract.
      • subY

        default void subY​(double y)
        Sets the y value of this tuple to the difference of itself and y.
        Parameters:
        y - y coordinate to substract.
      • subZ

        default void subZ​(int z)
        Sets the z value of this tuple to the difference of itself and z.
        Parameters:
        z - y coordinate to substract.
      • subZ

        default void subZ​(double z)
        Sets the z value of this tuple to the difference of itself and z.
        Parameters:
        z - y coordinate to substract.
      • interpolate

        default void interpolate​(Tuple3D<?> tuple1,
                                 Tuple3D<?> tuple2,
                                 double alpha)
        Linearly interpolates between tuples t1 and t2 and places the result into this tuple: this = (1-alpha)*t1 + alpha*t2.
        Parameters:
        tuple1 - the first tuple
        tuple2 - the second tuple
        alpha - the alpha interpolation parameter
      • interpolate

        default void interpolate​(Tuple3D<?> tuple,
                                 double alpha)
        Linearly interpolates between this tuple and tuple t1 and places the result into this tuple: this = (1-alpha)*this + alpha*t1.
        Parameters:
        tuple - the first tuple
        alpha - the alpha interpolation parameter
      • equals

        @Pure
        default boolean equals​(Tuple3D<?> tuple)
        Returns true if all of the data members of Tuple2f t1 are equal to the corresponding data members in this Tuple2f.
        Parameters:
        tuple - the vector with which the comparison is made
        Returns:
        true or false
      • equals

        @Pure
        boolean equals​(Object t1)
        Returns true if the Object t1 is of type Tuple2f and all of the data members of t1 are equal to the corresponding data members in this Tuple2f.
        Overrides:
        equals in class Object
        Parameters:
        t1 - the object with which the comparison is made
        Returns:
        true or false
      • epsilonEquals

        @Pure
        default boolean epsilonEquals​(Tuple3D<?> tuple,
                                      double epsilon)
        Returns true if the L-infinite distance between this tuple and tuple t1 is less than or equal to the epsilon parameter, otherwise returns false. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].
        Parameters:
        tuple - the tuple to be compared to this tuple
        epsilon - the threshold value
        Returns:
        true or false
      • hashCode

        @Pure
        int hashCode()
        Returns a hash code value based on the data values in this object. Two different Tuple2f objects with identical data values (i.e., Tuple2f.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code value