public final class PAreasF extends Object
Functions over areas.
These functions operate using the concepts of minimum-x, maximum-x, minimum-y, and maximum-y edges. It is up to individual applications to assign meaning to these edges such as "left" for minimum-x and "top" for minimum-y.
| Modifier and Type | Method and Description |
|---|---|
static <S> PAreaF<S> |
alignCenter(PAreaF<S> outer,
PAreaF<S> inner)
Align the area
inner such that the center of the area is equal to
the center of outer. |
static <S> PAreaF<S> |
alignHorizontallyCenter(PAreaF<S> outer,
PAreaF<S> inner)
Deprecated.
|
static <S> PAreaF<S> |
alignHorizontallyMaxX(PAreaF<S> outer,
PAreaF<S> inner)
Deprecated.
|
static <S> PAreaF<S> |
alignHorizontallyMaxXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Deprecated.
|
static <S> PAreaF<S> |
alignHorizontallyMinX(PAreaF<S> outer,
PAreaF<S> inner)
Deprecated.
|
static <S> PAreaF<S> |
alignHorizontallyMinXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Deprecated.
|
static <S> PAreaF<S> |
alignMaxYMaxX(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignMaxYMaxXOffset(PAreaF, PAreaF,
float, float) with zero offsets. |
static <S> PAreaF<S> |
alignMaxYMaxXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset_x,
float offset_y)
Align the area
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer. |
static <S> PAreaF<S> |
alignMaxYMinX(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignMaxYMinXOffset(PAreaF, PAreaF,
float, float) with zero offsets. |
static <S> PAreaF<S> |
alignMaxYMinXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset_x,
float offset_y)
Align the area
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer. |
static <S> PAreaF<S> |
alignMinYMaxX(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignMinYMaxXOffset(PAreaF, PAreaF,
float, float) with zero offsets. |
static <S> PAreaF<S> |
alignMinYMaxXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset_x,
float offset_y)
Align the area
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer. |
static <S> PAreaF<S> |
alignMinYMinX(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignMinYMinXOffset(PAreaF, PAreaF,
float, float) with zero offsets. |
static <S> PAreaF<S> |
alignMinYMinXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset_x,
float offset_y)
Align the area
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer. |
static <S> PAreaF<S> |
alignOnXCenter(PAreaF<S> outer,
PAreaF<S> inner)
Align the area
inner along the X axis in the center of outer. |
static <S> PAreaF<S> |
alignOnXMaxX(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignOnXMaxXOffset(PAreaF,
PAreaF, float) with a zero offset. |
static <S> PAreaF<S> |
alignOnXMaxXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Align the area
inner along the X axis against the inside maximum-x edge
of outer. |
static <S> PAreaF<S> |
alignOnXMinX(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignOnXMinXOffset(PAreaF, PAreaF,
float) with a zero offset. |
static <S> PAreaF<S> |
alignOnXMinXOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Align the area
inner along the X axis against the inside minimum-x edge
of outer. |
static <S> PAreaF<S> |
alignOnYCenter(PAreaF<S> outer,
PAreaF<S> inner)
Align the area
inner along the Y axis in the center of outer. |
static <S> PAreaF<S> |
alignOnYMaxY(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignOnYMaxYOffset(PAreaF, PAreaF,
float) with a zero offset. |
static <S> PAreaF<S> |
alignOnYMaxYOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Align the area
inner along the Y axis against the inside maximum-y edge
of outer. |
static <S> PAreaF<S> |
alignOnYMinY(PAreaF<S> outer,
PAreaF<S> inner)
Equivalent to calling
alignOnYMinYOffset(PAreaF, PAreaF,
float) with a zero offset. |
static <S> PAreaF<S> |
alignOnYMinYOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Align the area
inner along the Y axis against the inside minimum-y edge
of outer. |
static <S> PAreaF<S> |
alignVerticallyCenter(PAreaF<S> outer,
PAreaF<S> inner)
Deprecated.
|
static <S> PAreaF<S> |
alignVerticallyMaxY(PAreaF<S> outer,
PAreaF<S> inner)
Deprecated.
|
static <S> PAreaF<S> |
alignVerticallyMaxYOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Deprecated.
|
static <S> PAreaF<S> |
alignVerticallyMinY(PAreaF<S> outer,
PAreaF<S> inner)
Deprecated.
|
static <S> PAreaF<S> |
alignVerticallyMinYOffset(PAreaF<S> outer,
PAreaF<S> inner,
float offset)
Deprecated.
|
static <S,T> PAreaF<T> |
cast(PAreaF<S> area)
Brand a given area as belonging to a different coordinate space.
|
static <S> PAreaF<S> |
containing(PAreaF<S> a,
PAreaF<S> b)
Construct a area that will contain both
a and b. |
static <S> boolean |
contains(PAreaF<S> a,
PAreaF<S> b)
Determine whether or not one area contains another.
|
static <S> boolean |
containsPoint(PAreaF<S> a,
float x,
float y)
Determine whether or not a area contains a given point.
|
static <S> boolean |
couldFitInside(PAreaF<S> a,
PAreaF<S> b)
Determine whether or not one area could fit inside another.
|
static <S> PAreaF<S> |
create(float x,
float y,
float size_x,
float size_y)
Create an area of size
size_x on the X axis and size size_y
on the Y axis, placing the minimum corner at (x, y). |
static <S> PAreaF<S> |
fitBetweenHorizontal(PAreaF<S> fit,
PAreaF<S> a,
PAreaF<S> b)
Deprecated.
|
static <S> PAreaF<S> |
fitBetweenOnX(PAreaF<S> fit,
PAreaF<S> a,
PAreaF<S> b)
Attempt to fit
fit between a and b, horizontally. |
static <S> PAreaF<S> |
fitBetweenOnY(PAreaF<S> fit,
PAreaF<S> a,
PAreaF<S> b)
Attempt to fit
fit between a and b, vertically. |
static <S> PAreaF<S> |
fitBetweenVertical(PAreaF<S> fit,
PAreaF<S> a,
PAreaF<S> b)
Deprecated.
|
static <S> PAreaF<S> |
hollowOut(PAreaF<S> outer,
float min_x_offset,
float max_x_offset,
float min_y_offset,
float max_y_offset)
Construct a new area that fits inside
outer based on the given
offsets from each edge. |
static <S> PAreaF<S> |
hollowOutEvenly(PAreaF<S> outer,
float offset)
Equivalent to calling
hollowOut(PAreaF, float, float,
float, float) with offset for all offset parameters. |
static <S> PAreaF<S> |
moveAbsolute(PAreaF<S> area,
float x,
float y)
Move the given area to
(x, y). |
static <S> PAreaF<S> |
moveRelative(PAreaF<S> area,
float x,
float y)
Move the given area by
(x, y). |
static <S> PAreaF<S> |
moveToOrigin(PAreaF<S> area)
Move the given area to
(0, 0). |
static <S> boolean |
overlaps(PAreaF<S> a,
PAreaF<S> b)
Determine whether or not two areas overlap.
|
static <S> PAreaF<S> |
scaleFromCenter(PAreaF<S> area,
float x_diff,
float y_diff)
Scale
area by adding x_diff to the sizeX, and y_diff to the sizeY. |
static <S> PAreaF<S> |
scaleFromMaxYMaxX(PAreaF<S> area,
float x_diff,
float y_diff)
Scale
area by adding x_diff to the sizeX, and y_diff to the sizeY. |
static <S> PAreaF<S> |
scaleFromMaxYMinX(PAreaF<S> area,
float x_diff,
float y_diff)
Scale
area by adding x_diff to the sizeX, and y_diff to the sizeY. |
static <S> PAreaF<S> |
scaleFromMinYMaxX(PAreaF<S> area,
float x_diff,
float y_diff)
Scale
area by adding x_diff to the sizeX, and y_diff to the sizeY. |
static <S> PAreaF<S> |
scaleFromMinYMinX(PAreaF<S> area,
float x_diff,
float y_diff)
Scale
area by adding x_diff to the sizeX, and y_diff to the sizeY. |
static <S> PAreaF<S> |
setSizeFromCenter(PAreaF<S> area,
float sizeX,
float sizeY)
Set the sizeX and sizeY of
area to sizeX and sizeY, respectively. |
static <S> PAreaF<S> |
setSizeFromMaxYMaxX(PAreaF<S> area,
float sizeX,
float sizeY)
Set the sizeX and sizeY of
area to sizeX and sizeY, respectively. |
static <S> PAreaF<S> |
setSizeFromMaxYMinX(PAreaF<S> area,
float sizeX,
float sizeY)
Set the sizeX and sizeY of
area to sizeX and sizeY, respectively. |
static <S> PAreaF<S> |
setSizeFromMinYMaxX(PAreaF<S> area,
float sizeX,
float sizeY)
Set the sizeX and sizeY of
area to sizeX and sizeY, respectively. |
static <S> PAreaF<S> |
setSizeFromMinYMinX(PAreaF<S> area,
float sizeX,
float sizeY)
Set the sizeX and sizeY of
area to sizeX and sizeY, respectively. |
static <S> String |
show(PAreaF<S> area) |
static <S> String |
showToBuilder(PAreaF<S> area,
StringBuilder sb) |
static <S> PAreaSizeF<S> |
size(PAreaF<S> area) |
static <S> PAreaXSplitF<S,PAreaF<S>> |
splitAlongParallelToX(PAreaF<S> area,
float y)
Split
area along a line parallel to the X axis placed at
y units from its own minimum-y edge. |
static <S> PAreaYSplitF<S,PAreaF<S>> |
splitAlongParallelToY(PAreaF<S> area,
float x)
Split
area along a line parallel to the Y axis placed at
x units from its own minimum-x edge. |
static <S> PAreaXYSplitF<S,PAreaF<S>> |
splitAlongXY(PAreaF<S> area,
float x,
float y)
Split
area along a two axis-aligned perpendicular lines that intercept at (x, y). |
public static <S> PAreaF<S> create(float x, float y, float size_x, float size_y)
size_x on the X axis and size size_y
on the Y axis, placing the minimum corner at (x, y).S - The coordinate space of the areasx - The X value of the minimum cornery - The Y value of the minimum cornersize_x - The size of the area on the X axissize_y - The size of the area on the Y axispublic static <S> boolean contains(PAreaF<S> a, PAreaF<S> b)
Determine whether or not one area contains another.
Containing is reflexive: contains(a, a) == true.
Containing is transitive: contains(a, b) → contains(b, c) →
contains(a, c).
Containing is not necessarily symmetric.
S - The coordinate space of the areasa - Area Ab - Area Btrue iff a contains bpublic static <S> PAreaF<S> moveRelative(PAreaF<S> area, float x, float y)
(x, y).S - The coordinate space of the areaarea - The areax - The amount to move on the X axisy - The amount to move on the Y axispublic static <S> PAreaF<S> moveAbsolute(PAreaF<S> area, float x, float y)
(x, y).S - The coordinate space of the areaarea - The areax - The position to which to move on the X axisy - The position to which to move on the Y axispublic static <S> PAreaF<S> moveToOrigin(PAreaF<S> area)
(0, 0).S - The coordinate space of the areaarea - The areapublic static <S,T> PAreaF<T> cast(PAreaF<S> area)
S - The starting coordinate spaceT - The resulting coordinate spacearea - An areaarea@Deprecated public static <S> PAreaF<S> alignHorizontallyCenter(PAreaF<S> outer, PAreaF<S> inner)
alignOnXCenter(PAreaF, PAreaF)inner horizontally in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaF<S> alignHorizontallyMinX(PAreaF<S> outer, PAreaF<S> inner)
alignOnXMinX(PAreaF, PAreaF)alignHorizontallyMinXOffset(PAreaF, PAreaF,
float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaF<S> alignHorizontallyMinXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
alignOnXMinXOffset(PAreaF, PAreaF, float)inner horizontally against the inside minimum-x edge
of outer. The area will be at least offset units from the
minimum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaF<S> alignHorizontallyMaxX(PAreaF<S> outer, PAreaF<S> inner)
alignOnXMaxX(PAreaF, PAreaF)alignHorizontallyMaxXOffset(PAreaF,
PAreaF, float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaF<S> alignHorizontallyMaxXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
alignOnXMaxXOffset(PAreaF, PAreaF, float)inner horizontally against the inside maximum-x edge
of outer. The area will be at least offset units from the
maximum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaF<S> alignVerticallyMinY(PAreaF<S> outer, PAreaF<S> inner)
alignOnYMinY(PAreaF, PAreaF)alignVerticallyMinYOffset(PAreaF, PAreaF,
float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaF<S> alignVerticallyMinYOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
alignOnYMinYOffset(PAreaF, PAreaF, float)inner vertically against the inside minimum-y edge
of outer. The area will be at least offset units from the
minimum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaF<S> alignVerticallyMaxY(PAreaF<S> outer, PAreaF<S> inner)
alignOnYMaxY(PAreaF, PAreaF)alignVerticallyMaxYOffset(PAreaF, PAreaF,
float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner area@Deprecated public static <S> PAreaF<S> alignVerticallyMaxYOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
alignOnYMaxYOffset(PAreaF, PAreaF, float)inner vertically against the inside maximum-y edge
of outer. The area will be at least offset units from the
maximum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edge@Deprecated public static <S> PAreaF<S> alignVerticallyCenter(PAreaF<S> outer, PAreaF<S> inner)
alignOnYCenter(PAreaF, PAreaF)inner vertically in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignOnXCenter(PAreaF<S> outer, PAreaF<S> inner)
inner along the X axis in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignOnXMinX(PAreaF<S> outer, PAreaF<S> inner)
alignOnXMinXOffset(PAreaF, PAreaF,
float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignOnXMinXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
inner along the X axis against the inside minimum-x edge
of outer. The area will be at least offset units from the
minimum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaF<S> alignOnXMaxX(PAreaF<S> outer, PAreaF<S> inner)
alignOnXMaxXOffset(PAreaF,
PAreaF, float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignOnXMaxXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
inner along the X axis against the inside maximum-x edge
of outer. The area will be at least offset units from the
maximum-x edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaF<S> alignOnYMinY(PAreaF<S> outer, PAreaF<S> inner)
alignOnYMinYOffset(PAreaF, PAreaF,
float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignOnYMinYOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
inner along the Y axis against the inside minimum-y edge
of outer. The area will be at least offset units from the
minimum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaF<S> alignOnYMaxY(PAreaF<S> outer, PAreaF<S> inner)
alignOnYMaxYOffset(PAreaF, PAreaF,
float) with a zero offset.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignOnYMaxYOffset(PAreaF<S> outer, PAreaF<S> inner, float offset)
inner along the Y axis against the inside maximum-y edge
of outer. The area will be at least offset units from the
maximum-y edge.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset - The offset from the edgepublic static <S> PAreaF<S> alignOnYCenter(PAreaF<S> outer, PAreaF<S> inner)
inner along the Y axis in the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignMinYMinX(PAreaF<S> outer, PAreaF<S> inner)
alignMinYMinXOffset(PAreaF, PAreaF,
float, float) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignMinYMinXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset_x, float offset_y)
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the minimum-x edgeoffset_y - The offset from the minimum-y edgepublic static <S> PAreaF<S> alignMinYMaxX(PAreaF<S> outer, PAreaF<S> inner)
alignMinYMaxXOffset(PAreaF, PAreaF,
float, float) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignMinYMaxXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset_x, float offset_y)
inner such that the minimum-y edge is at least
offset_y from the inside minimum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the maximum-x edgeoffset_y - The offset from the minimum-y edgepublic static <S> PAreaF<S> alignMaxYMinX(PAreaF<S> outer, PAreaF<S> inner)
alignMaxYMinXOffset(PAreaF, PAreaF,
float, float) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignMaxYMinXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset_x, float offset_y)
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
minimum-x edge is at least offset_x from the inside minimum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the minimum-x edgeoffset_y - The offset from the maximum-y edgepublic static <S> PAreaF<S> alignMaxYMaxX(PAreaF<S> outer, PAreaF<S> inner)
alignMaxYMaxXOffset(PAreaF, PAreaF,
float, float) with zero offsets.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> alignMaxYMaxXOffset(PAreaF<S> outer, PAreaF<S> inner, float offset_x, float offset_y)
inner such that the maximum-y edge is at least
offset_y from the inside maximum-y edge of outer and the
maximum-x edge is at least offset_x from the inside maximum-x edge
of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areaoffset_x - The offset from the maximum-x edgeoffset_y - The offset from the maximum-y edgepublic static <S> PAreaF<S> alignCenter(PAreaF<S> outer, PAreaF<S> inner)
inner such that the center of the area is equal to
the center of outer.S - The coordinate space of the areasouter - The outer areainner - The inner areapublic static <S> PAreaF<S> hollowOut(PAreaF<S> outer, float min_x_offset, float max_x_offset, float min_y_offset, float max_y_offset)
outer based on the given
offsets from each edge.S - The coordinate space of the areasouter - The containing areamin_x_offset - The offset from the minimum-x edge (must be
non-negative)max_x_offset - The offset from the maximum-x edge (must be
non-negative)min_y_offset - The offset from the minimum-y edge (must be
non-negative)max_y_offset - The offset from the maximum-y edge (must be
non-negative)public static <S> PAreaF<S> hollowOutEvenly(PAreaF<S> outer, float offset)
hollowOut(PAreaF, float, float,
float, float) with offset for all offset parameters.S - The coordinate space of the areasouter - The containing areaoffset - The offset from each edge (must be non-negative)public static <S> PAreaF<S> setSizeFromCenter(PAreaF<S> area, float sizeX, float sizeY)
Set the sizeX and sizeY of area to sizeX and sizeY, respectively.
The area is resized from its own center.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaF<S> setSizeFromMinYMinX(PAreaF<S> area, float sizeX, float sizeY)
Set the sizeX and sizeY of area to sizeX and sizeY, respectively.
The area is resized by moving its minimum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaF<S> setSizeFromMinYMaxX(PAreaF<S> area, float sizeX, float sizeY)
Set the sizeX and sizeY of area to sizeX and sizeY, respectively.
The area is resized by moving its minimum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaF<S> setSizeFromMaxYMaxX(PAreaF<S> area, float sizeX, float sizeY)
Set the sizeX and sizeY of area to sizeX and sizeY, respectively.
The area is resized by moving its maximum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaF<S> setSizeFromMaxYMinX(PAreaF<S> area, float sizeX, float sizeY)
Set the sizeX and sizeY of area to sizeX and sizeY, respectively.
The area is resized by moving its maximum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areasizeX - The new sizeX (must be non-negative)sizeY - The new sizeY (must be non-negative)public static <S> PAreaF<S> scaleFromMinYMinX(PAreaF<S> area, float x_diff, float y_diff)
Scale area by adding x_diff to the sizeX, and y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its minimum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaF<S> scaleFromMinYMaxX(PAreaF<S> area, float x_diff, float y_diff)
Scale area by adding x_diff to the sizeX, and y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its minimum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaF<S> scaleFromMaxYMinX(PAreaF<S> area, float x_diff, float y_diff)
Scale area by adding x_diff to the sizeX, and y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its maximum-y-minimum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaF<S> scaleFromMaxYMaxX(PAreaF<S> area, float x_diff, float y_diff)
Scale area by adding x_diff to the sizeX, and y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized by moving its maximum-y-maximum-x corner.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> PAreaF<S> scaleFromCenter(PAreaF<S> area, float x_diff, float y_diff)
Scale area by adding x_diff to the sizeX, and y_diff to the sizeY. The size of the resulting area is clamped so that
its sizeX and sizeY are always non-negative.
The area is resized from its own center.
S - The coordinate space of the areaarea - The areax_diff - The X differencey_diff - The Y differencepublic static <S> boolean overlaps(PAreaF<S> a, PAreaF<S> b)
Determine whether or not two areas overlap.
Overlapping is reflexive: overlaps(a, a) == true.
Overlapping is symmetric: overlaps(a, b) == overlaps(b, a).
Overlapping is not necessarily transitive.
S - The coordinate space of the areasa - An areab - An areatrue iff a overlaps bpublic static <S> boolean couldFitInside(PAreaF<S> a, PAreaF<S> b)
Determine whether or not one area could fit inside another.
Fitting is reflexive: couldFitInside(a, a) == true.
Fitting is transitive: couldFitInside(a, b) → couldFitInside(b,
c) → couldFitInside(a, c).
Fitting is not necessarily symmetric.
S - The coordinate space of the areasa - An areab - An areatrue iff a could fit inside bpublic static <S> PAreaF<S> containing(PAreaF<S> a, PAreaF<S> b)
a and b.S - The coordinate space of the areasa - An areab - An areaa and bpublic static <S> boolean containsPoint(PAreaF<S> a, float x, float y)
Determine whether or not a area contains a given point.
S - The coordinate space of the areaa - An areax - The X coordinate of the pointy - The Y coordinate of the pointtrue iff a contains (x, y)@Deprecated public static <S> PAreaF<S> fitBetweenHorizontal(PAreaF<S> fit, PAreaF<S> a, PAreaF<S> b)
fitBetweenOnX(PAreaF, PAreaF, PAreaF)fit between a and b, horizontally.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An area@Deprecated public static <S> PAreaF<S> fitBetweenVertical(PAreaF<S> fit, PAreaF<S> a, PAreaF<S> b)
fitBetweenOnY(PAreaF, PAreaF, PAreaF)fit between a and b, vertically.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An areapublic static <S> PAreaF<S> fitBetweenOnX(PAreaF<S> fit, PAreaF<S> a, PAreaF<S> b)
fit between a and b, horizontally.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An areapublic static <S> PAreaF<S> fitBetweenOnY(PAreaF<S> fit, PAreaF<S> a, PAreaF<S> b)
fit between a and b, vertically.S - The coordinate space of the areasfit - The area to be fitteda - An areab - An areapublic static <S> PAreaXSplitF<S,PAreaF<S>> splitAlongParallelToX(PAreaF<S> area, float y)
area along a line parallel to the X axis placed at
y units from its own minimum-y edge.S - The coordinate space of the areasarea - The area to be splity - The relative Y coordinate of the splitting edgepublic static <S> PAreaYSplitF<S,PAreaF<S>> splitAlongParallelToY(PAreaF<S> area, float x)
area along a line parallel to the Y axis placed at
x units from its own minimum-x edge.S - The coordinate space of the areasarea - The area to be splitx - The relative X coordinate of the splitting edgepublic static <S> PAreaXYSplitF<S,PAreaF<S>> splitAlongXY(PAreaF<S> area, float x, float y)
area along a two axis-aligned perpendicular lines that intercept at (x, y).S - The coordinate space of the areasarea - The area to be splitx - The relative X coordinate of the splitting edgey - The relative Y coordinate of the splitting edgepublic static <S> String show(PAreaF<S> area)
S - The coordinate space of the areaarea - The areapublic static <S> PAreaSizeF<S> size(PAreaF<S> area)
S - The coordinate space of the areaarea - The areapublic static <S> String showToBuilder(PAreaF<S> area, StringBuilder sb)
S - The coordinate space of the areaarea - The areasb - A string builderCopyright © 2017 <code@io7m.com> http://io7m.com