Class QuadDimension
java.lang.Object
dev.prozilla.pine.common.math.dimension.DualDimension
dev.prozilla.pine.common.math.dimension.QuadDimension
- All Implemented Interfaces:
Cloneable<DualDimension>,Printable
Represents four dimensions (X, Y, Z and W) for a UI element. Each dimension is defined using a
DimensionBase.- See Also:
-
Field Summary
FieldsFields inherited from class dev.prozilla.pine.common.math.dimension.DualDimension
DEFAULT_VALUE, x, y -
Constructor Summary
ConstructorsConstructorDescriptionCreates four default dimensions with all values set to 0 pixels.QuadDimension(int xyzw) QuadDimension(int xz, int yw) QuadDimension(int x, int y, int z, int w) QuadDimension(DimensionBase xyzw) Creates four dimensions with equal values.QuadDimension(DimensionBase xz, DimensionBase yw) Creates four dimensions with two pairs of equal values. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a new object that is equal to this object.floatComputes the W-dimension for a given element.floatComputes the sum of the X- and Z-dimensions for a given element.floatComputes the sum of the Y- and W-dimensions for a given element.floatComputes the Z-dimension for a given element.booleanChecks whether this pair of dimensions computes to0for a given element.voidset(int xyzw) voidset(int xz, int yw) voidset(int x, int y, int z, int w) voidset(DimensionBase xyzw) voidset(DimensionBase xz, DimensionBase yw) voidset(DimensionBase x, DimensionBase y, DimensionBase z, DimensionBase w) @NotNull StringtoString()Returns a string representation of this object.Methods inherited from class dev.prozilla.pine.common.math.dimension.DualDimension
compute, computeX, computeY, equals, equals, fullscreen, hashCode, parentHeight, parentSize, parentWidth, parse, reset, set, set, zero
-
Field Details
-
z
-
w
-
-
Constructor Details
-
QuadDimension
public QuadDimension()Creates four default dimensions with all values set to 0 pixels. -
QuadDimension
public QuadDimension(int xyzw) -
QuadDimension
Creates four dimensions with equal values. -
QuadDimension
public QuadDimension(int xz, int yw) -
QuadDimension
Creates four dimensions with two pairs of equal values. The X- and Z-dimensions and the Y- and W-dimensions will respectively be assigned equal values. -
QuadDimension
public QuadDimension(int x, int y, int z, int w) -
QuadDimension
-
-
Method Details
-
set
public void set(int xyzw) - Overrides:
setin classDualDimension
-
set
- Overrides:
setin classDualDimension
-
set
public void set(int xz, int yw) - Overrides:
setin classDualDimension
-
set
- Overrides:
setin classDualDimension
-
set
public void set(int x, int y, int z, int w) -
set
-
computeZ
Computes the Z-dimension for a given element. -
computeW
Computes the W-dimension for a given element. -
computeXZ
Computes the sum of the X- and Z-dimensions for a given element. -
computeYW
Computes the sum of the Y- and W-dimensions for a given element. -
isZero
Description copied from class:DualDimensionChecks whether this pair of dimensions computes to0for a given element.- Overrides:
isZeroin classDualDimension
-
clone
Description copied from interface:CloneableReturns a new object that is equal to this object.- Specified by:
clonein interfaceCloneable<DualDimension>- Overrides:
clonein classDualDimension- Returns:
- Clone of this object
-
toString
Description copied from interface:PrintableReturns a string representation of this object.- Specified by:
toStringin interfacePrintable- Overrides:
toStringin classDualDimension- Returns:
- String representation of this object.
-