Package com.sun.javafx.geom
Class BoxBounds
java.lang.Object
com.sun.javafx.geom.BaseBounds
com.sun.javafx.geom.BoxBounds
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.javafx.geom.BaseBounds
BaseBounds.BoundsType -
Constructor Summary
ConstructorsConstructorDescriptionCreate an axis aligned bounding box object, with an empty bounds where maxX invalid input: '<' minX, maxY invalid input: '<' minY and maxZ invalid input: '<' minZ.BoxBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) Creates an axis aligned bounding box based on the minX, minY, minZ, maxX, maxY, and maxZ values specified.Creates an axis aligned bounding box as a copy of the specified BoxBounds object. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(float x, float y, float z) voidbooleancontains(float x, float y) booleancontains(float x, float y, float z) booleancontains(float x, float y, float z, float width, float height, float depth) booleancopy()Duplicates this instance.deriveWithNewBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) deriveWithNewBounds(BaseBounds other) deriveWithNewBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) deriveWithPadding(float h, float v, float d) deriveWithUnion(BaseBounds other) booleandisjoint(float x, float y, float width, float height) booleandisjoint(float x, float y, float z, float width, float height, float depth) booleanflattenInto(RectBounds bounds) Sets the given RectBounds (or creates a new instance of bounds is null) to have the minX, minY, maxX, and maxY of this BoxBounds, dropping the Z values.floatgetDepth()Convenience function for getting the depth of this bounds.floatConvenience function for getting the height of this bounds.floatgetMaxX()floatgetMaxY()floatgetMaxZ()floatgetMinX()floatgetMinY()floatgetMinZ()floatgetWidth()Convenience function for getting the width of this bounds.voidgrow(float h, float v, float d) inthashCode()booleanintersects(float x, float y, float width, float height) booleanintersects(float x, float y, float z, float width, float height, float depth) booleanintersects(BaseBounds other) voidintersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) voidintersectWith(BaseBounds other) booleanis2D()Return true if this bounds is of a 2D BoundsType, else false.booleanisEmpty()voidroundOut()Adjusts the edges of this BoxBounds "outward" toward integral boundaries, such that the rounded bounding box will always full enclose the original bounding box.final voidsetBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) Set the bounds to the given values.final voidsetBounds(BaseBounds other) Set the bounds to match that of the BaseBounds object specified.voidsetBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) voidsetBoundsAndSort(Point2D p1, Point2D p2) Sets the bounds based on the given points, and also ensures that after having done so that this bounds instance is sorted (x1invalid input: '<'=x2 and y1invalid input: '<'=y2).voidsetMaxX(float maxX) voidsetMaxY(float maxY) voidsetMaxZ(float maxZ) voidsetMinX(float minX) voidsetMinY(float minY) voidsetMinZ(float minZ) protected voidtoString()voidtranslate(float x, float y, float z) voidunionWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) voidunionWith(BaseBounds other) Methods inherited from class com.sun.javafx.geom.BaseBounds
getInstance, getInstance
-
Constructor Details
-
BoxBounds
public BoxBounds()Create an axis aligned bounding box object, with an empty bounds where maxX invalid input: '<' minX, maxY invalid input: '<' minY and maxZ invalid input: '<' minZ. -
BoxBounds
public BoxBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) Creates an axis aligned bounding box based on the minX, minY, minZ, maxX, maxY, and maxZ values specified. -
BoxBounds
Creates an axis aligned bounding box as a copy of the specified BoxBounds object.
-
-
Method Details
-
copy
Description copied from class:BaseBoundsDuplicates this instance. This differs from deriveWithNewBounds(other) where "other" would be this, in that derive methods may return the same instance, whereas copy will always return a new instance.- Specified by:
copyin classBaseBounds
-
getBoundsType
- Specified by:
getBoundsTypein classBaseBounds
-
is2D
public boolean is2D()Description copied from class:BaseBoundsReturn true if this bounds is of a 2D BoundsType, else false.- Specified by:
is2Din classBaseBounds
-
getWidth
public float getWidth()Convenience function for getting the width of this bounds. The dimension along the X-Axis.- Specified by:
getWidthin classBaseBounds
-
getHeight
public float getHeight()Convenience function for getting the height of this bounds. The dimension along the Y-Axis.- Specified by:
getHeightin classBaseBounds
-
getDepth
public float getDepth()Convenience function for getting the depth of this bounds. The dimension along the Z-Axis.- Specified by:
getDepthin classBaseBounds
-
getMinX
public float getMinX()- Specified by:
getMinXin classBaseBounds
-
setMinX
public void setMinX(float minX) -
getMinY
public float getMinY()- Specified by:
getMinYin classBaseBounds
-
setMinY
public void setMinY(float minY) -
getMinZ
public float getMinZ()- Specified by:
getMinZin classBaseBounds
-
setMinZ
public void setMinZ(float minZ) -
getMaxX
public float getMaxX()- Specified by:
getMaxXin classBaseBounds
-
setMaxX
public void setMaxX(float maxX) -
getMaxY
public float getMaxY()- Specified by:
getMaxYin classBaseBounds
-
setMaxY
public void setMaxY(float maxY) -
getMaxZ
public float getMaxZ()- Specified by:
getMaxZin classBaseBounds
-
setMaxZ
public void setMaxZ(float maxZ) -
deriveWithUnion
- Specified by:
deriveWithUnionin classBaseBounds
-
deriveWithNewBounds
- Specified by:
deriveWithNewBoundsin classBaseBounds
-
deriveWithNewBounds
public BaseBounds deriveWithNewBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) - Specified by:
deriveWithNewBoundsin classBaseBounds
-
deriveWithNewBoundsAndSort
public BaseBounds deriveWithNewBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) - Specified by:
deriveWithNewBoundsAndSortin classBaseBounds
-
flattenInto
Description copied from class:BaseBoundsSets the given RectBounds (or creates a new instance of bounds is null) to have the minX, minY, maxX, and maxY of this BoxBounds, dropping the Z values.- Specified by:
flattenIntoin classBaseBounds- Parameters:
bounds- The bounds to fill with values, or null. If null, a new RectBounds is returned. If not null, the given bounds will be populated and then returned- Returns:
- a non-null reference to a RectBounds containing the minX, minY, maxX, and maxY of this BoxBounds.
-
setBounds
Set the bounds to match that of the BaseBounds object specified. The specified bounds object must not be null. -
setBounds
public final void setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) Set the bounds to the given values. -
setBoundsAndSort
public void setBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) - Specified by:
setBoundsAndSortin classBaseBounds
-
setBoundsAndSort
Description copied from class:BaseBoundsSets the bounds based on the given points, and also ensures that after having done so that this bounds instance is sorted (x1invalid input: '<'=x2 and y1invalid input: '<'=y2).- Specified by:
setBoundsAndSortin classBaseBounds
-
unionWith
-
unionWith
public void unionWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) -
add
public void add(float x, float y, float z) - Specified by:
addin classBaseBounds
-
add
- Specified by:
addin classBaseBounds
-
intersectWith
- Specified by:
intersectWithin classBaseBounds
-
intersectWith
public void intersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) - Specified by:
intersectWithin classBaseBounds
-
contains
- Specified by:
containsin classBaseBounds
-
contains
public boolean contains(float x, float y) - Specified by:
containsin classBaseBounds
-
contains
public boolean contains(float x, float y, float z) -
contains
public boolean contains(float x, float y, float z, float width, float height, float depth) -
intersects
public boolean intersects(float x, float y, float width, float height) - Specified by:
intersectsin classBaseBounds
-
intersects
public boolean intersects(float x, float y, float z, float width, float height, float depth) -
intersects
-
disjoint
public boolean disjoint(float x, float y, float width, float height) - Specified by:
disjointin classBaseBounds
-
disjoint
public boolean disjoint(float x, float y, float z, float width, float height, float depth) -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin classBaseBounds
-
roundOut
public void roundOut()Adjusts the edges of this BoxBounds "outward" toward integral boundaries, such that the rounded bounding box will always full enclose the original bounding box.- Specified by:
roundOutin classBaseBounds
-
grow
public void grow(float h, float v, float d) -
deriveWithPadding
- Specified by:
deriveWithPaddingin classBaseBounds
-
makeEmpty
- Specified by:
makeEmptyin classBaseBounds
-
sortMinMax
protected void sortMinMax()- Specified by:
sortMinMaxin classBaseBounds
-
translate
public void translate(float x, float y, float z) - Specified by:
translatein classBaseBounds
-
equals
-
hashCode
public int hashCode() -
toString
-