Interface Point3DMapper<R>

Type Parameters:
R - the type of the objects returned with this mapper is applied
All Known Subinterfaces:
BezierGrid.Mapper
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Point3DMapper<R>
Functional interface for mapping one point in a two or three dimensional space to another object when creating a sequence of objects distinguished by an index.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Control-point types for Point3DMapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <V> Point3DMapper<V>
    andThen(Function<? super R,? extends V> after)
    Returns a composed mapping that first applies this mapping and then applies the argument mapping.
    default R
    apply(int n, Point2D p, Point3DMapper.Type type, Point2D... bounds)
    Applies this mapping to the given arguments.
    default R
    apply(int n, Point3D p, Point3D... bounds)
    Applies this mapping to the given arguments.
    apply(int n, Point3D p, Point3DMapper.Type type, Point3D... bounds)
    Applies this mapping to the given arguments.
  • Method Details

    • apply

      R apply(int n, Point3D p, Point3DMapper.Type type, Point3D... bounds)
      Applies this mapping to the given arguments.
      Parameters:
      n - the index
      p - the point to map to another point
      type - the type of control point that describes the second argument; null if not provided
      bounds - there are no optional arguments (any provided should be ignored) if p is a spline's knot or an end point of a Path3D line segment; otherwise (i.e., p is an intermediate control point) there are two arguments giving the initial and final points in that order for a segment
      Returns:
      the result of this mapping
      See Also:
    • apply

      default R apply(int n, Point3D p, Point3D... bounds)
      Applies this mapping to the given arguments. The default implementation calls apply(int,Point3D,Type,Point3D...) with its third argument set to null.
      Parameters:
      n - the index
      p - the point to map to another point
      bounds - there are no optional arguments if p is a spline's knot or an end point of a Path3D segment; otherwise (i.e., p is an intermediate control point) there are two arguments giving the initial and final points in that order for a segment.
      Returns:
      the result of this mapping
    • apply

      default R apply(int n, Point2D p, Point3DMapper.Type type, Point2D... bounds)
      Applies this mapping to the given arguments. The default implementation of this method first converts a Point2D argument to an instance of Point3D with the same X and Y values and with the Z value set to zero. It then calls apply(int,Point3D,Type,Point3D...).
      Parameters:
      n - the index
      p - the point to map to another point
      type - the type of control point that describes the second argument; null if not provided
      bounds - there are no optional arguments if p is a spline's knot or an end point of a Path3D segment; otherwise (i.e., p is an intermediate control point) there are two arguments giving the initial and final points in that order for a segment.
      Returns:
      the result of this mapping
      See Also:
    • andThen

      default <V> Point3DMapper<V> andThen(Function<? super R,? extends V> after)
      Returns a composed mapping that first applies this mapping and then applies the argument mapping. (This method is provided for consistency with the interfaces in the package java.util.function.)
      Type Parameters:
      V - the type of the object returned by the function after.
      Parameters:
      after - the function to apply on the result of this object's apply method
      Returns:
      the composed mapper