APIdia Launch Partner
Top Description Inners Constructors Methods
com.sun.javafx.geom

public abstract Class BaseBounds

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.javafx.geom.BoxBounds, com.sun.javafx.geom.RectBounds

Base class for mutable bounds objects. There are two concrete specializations, BoxBounds (3D) and RectBounds (2D). Various "derive" methods exist which are used to mutate the bounds objects, such that they can be converted between the different types as appropriate, or modified in place if possible. This allows us to churn memory as little as possible without representing everything as if it were in 3D space (there are some computational cost savings to being able to ignore the Z values).

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
BaseBounds.BoundsType

The different types of BaseBounds that are currently supported.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public abstract void
public abstract void
add(float x, float y, float z)

public abstract boolean
public abstract boolean
contains(float x, float y)

public abstract BaseBounds
copy()

Duplicates this instance.

public abstract BaseBounds
public abstract BaseBounds
public abstract BaseBounds
deriveWithNewBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

public abstract BaseBounds
deriveWithNewBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

public abstract BaseBounds
deriveWithPadding(float h, float v, float d)

public abstract BaseBounds
public abstract boolean
disjoint(float x, float y, float width, float height)

public abstract RectBounds

Returns:

a non-null reference to a RectBounds containing the minX, minY, maxX, and maxY of this BoxBounds.
flattenInto
(RectBounds
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
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.

public abstract BaseBounds.BoundsType
public abstract float
getDepth()

Convenience function for getting the depth of this bounds.

public abstract float
getHeight()

Convenience function for getting the height of this bounds.

public static BaseBounds
getInstance(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

public static BaseBounds
getInstance(float minX, float minY, float maxX, float maxY)

public abstract Vec2f
public abstract Vec3f
public abstract float
public abstract float
public abstract float
public abstract Vec2f
public abstract Vec3f
public abstract float
public abstract float
public abstract float
public abstract float
getWidth()

Convenience function for getting the width of this bounds.

public abstract boolean
intersects(float x, float y, float width, float height)

public abstract void
public abstract void
public abstract void
intersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

public abstract boolean
is2D()

Return true if this bounds is of a 2D BoundsType, else false.

public abstract boolean
public abstract BaseBounds
public abstract void
public abstract void
setBoundsAndSort(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 (x1<=x2 and y1<=y2).

public abstract void
setBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)

protected abstract void
public abstract void
translate(float x, float y, float z)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BaseBoundsback to summary
pack-priv BaseBounds()

Method Detail

addback to summary
public abstract void add(Point2D p)
addback to summary
public abstract void add(float x, float y, float z)
containsback to summary
public abstract boolean contains(Point2D p)
containsback to summary
public abstract boolean contains(float x, float y)
copyback to summary
public abstract BaseBounds copy()

Duplicates 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.

deriveWithNewBoundsback to summary
public abstract BaseBounds deriveWithNewBounds(Rectangle other)
deriveWithNewBoundsback to summary
public abstract BaseBounds deriveWithNewBounds(BaseBounds other)
deriveWithNewBoundsback to summary
public abstract BaseBounds deriveWithNewBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
deriveWithNewBoundsAndSortback to summary
public abstract BaseBounds deriveWithNewBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
deriveWithPaddingback to summary
public abstract BaseBounds deriveWithPadding(float h, float v, float d)
deriveWithUnionback to summary
public abstract BaseBounds deriveWithUnion(BaseBounds other)
disjointback to summary
public abstract boolean disjoint(float x, float y, float width, float height)
flattenIntoback to summary
public abstract RectBounds flattenInto(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.

Parameters
bounds:RectBounds

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:RectBounds

a non-null reference to a RectBounds containing the minX, minY, maxX, and maxY of this BoxBounds.

getBoundsTypeback to summary
public abstract BaseBounds.BoundsType getBoundsType()
getDepthback to summary
public abstract float getDepth()

Convenience function for getting the depth of this bounds. The dimension along the Z-Axis.

getHeightback to summary
public abstract float getHeight()

Convenience function for getting the height of this bounds. The dimension along the Y-Axis.

getInstanceback to summary
public static BaseBounds getInstance(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
getInstanceback to summary
public static BaseBounds getInstance(float minX, float minY, float maxX, float maxY)
getMaxback to summary
public abstract Vec2f getMax(Vec2f max)
getMaxback to summary
public abstract Vec3f getMax(Vec3f max)
getMaxXback to summary
public abstract float getMaxX()
getMaxYback to summary
public abstract float getMaxY()
getMaxZback to summary
public abstract float getMaxZ()
getMinback to summary
public abstract Vec2f getMin(Vec2f min)
getMinback to summary
public abstract Vec3f getMin(Vec3f min)
getMinXback to summary
public abstract float getMinX()
getMinYback to summary
public abstract float getMinY()
getMinZback to summary
public abstract float getMinZ()
getWidthback to summary
public abstract float getWidth()

Convenience function for getting the width of this bounds. The dimension along the X-Axis.

intersectsback to summary
public abstract boolean intersects(float x, float y, float width, float height)
intersectWithback to summary
public abstract void intersectWith(Rectangle other)
intersectWithback to summary
public abstract void intersectWith(BaseBounds other)
intersectWithback to summary
public abstract void intersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
is2Dback to summary
public abstract boolean is2D()

Return true if this bounds is of a 2D BoundsType, else false.

isEmptyback to summary
public abstract boolean isEmpty()
makeEmptyback to summary
public abstract BaseBounds makeEmpty()
roundOutback to summary
public abstract void roundOut()
setBoundsAndSortback to summary
public abstract void setBoundsAndSort(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 (x1<=x2 and y1<=y2).

setBoundsAndSortback to summary
public abstract void setBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
sortMinMaxback to summary
protected abstract void sortMinMax()
translateback to summary
public abstract void translate(float x, float y, float z)
com.sun.javafx.geom back to summary

public final Enum BaseBounds.BoundsType

extends Enum<BaseBounds.BoundsType>
Class Inheritance

The different types of BaseBounds that are currently supported. We might support other types of bounds in the future (such as SPHERE) which are also 2D or 3D but are defined in some way other than with a bounding box. Such bounds can sometimes more accurately represent the pixels

Field Summary

Modifier and TypeField and Description
public static final BaseBounds.BoundsType
public static final BaseBounds.BoundsType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BaseBounds.BoundsType
public static BaseBounds.BoundsType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BOXback to summary
public static final BaseBounds.BoundsType BOX
RECTANGLEback to summary
public static final BaseBounds.BoundsType RECTANGLE

Constructor Detail

BoundsTypeback to summary
private BoundsType()

Method Detail

valueOfback to summary
public static BaseBounds.BoundsType valueOf(String name)
valuesback to summary
public static BaseBounds.BoundsType[] values()