- 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.
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 ClassesModifier and TypeInterfaceDescriptionstatic enum
Control-point types for Point3DMapper. -
Method Summary
Modifier and TypeMethodDescriptiondefault <V> Point3DMapper<V>
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
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
Applies this mapping to the given arguments.- Parameters:
n
- the indexp
- the point to map to another pointtype
- the type of control point that describes the second argument; null if not providedbounds
- 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
Applies this mapping to the given arguments. The default implementation callsapply(int,Point3D,Type,Point3D...)
with its third argument set to null.- Parameters:
n
- the indexp
- the point to map to another pointbounds
- 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
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 callsapply(int,Point3D,Type,Point3D...)
.- Parameters:
n
- the indexp
- the point to map to another pointtype
- the type of control point that describes the second argument; null if not providedbounds
- 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
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 packagejava.util.function
.)- Type Parameters:
V
- the type of the object returned by the functionafter
.- Parameters:
after
- the function to apply on the result of this object's apply method- Returns:
- the composed mapper
-