public abstract class BaseBounds extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BaseBounds.BoundsType
The different types of BaseBounds that are currently supported.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
add(float x,
float y,
float z) |
abstract void |
add(Point2D p) |
abstract boolean |
contains(float x,
float y) |
abstract boolean |
contains(Point2D p) |
abstract BaseBounds |
copy()
Duplicates this instance.
|
abstract BaseBounds |
deriveWithNewBounds(BaseBounds other) |
abstract BaseBounds |
deriveWithNewBounds(float minX,
float minY,
float minZ,
float maxX,
float maxY,
float maxZ) |
abstract BaseBounds |
deriveWithNewBounds(Rectangle other) |
abstract BaseBounds |
deriveWithNewBoundsAndSort(float minX,
float minY,
float minZ,
float maxX,
float maxY,
float maxZ) |
abstract BaseBounds |
deriveWithPadding(float h,
float v,
float d) |
abstract BaseBounds |
deriveWithUnion(BaseBounds other) |
abstract boolean |
disjoint(float x,
float y,
float width,
float height) |
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.
|
abstract BaseBounds.BoundsType |
getBoundsType() |
abstract float |
getDepth()
Convenience function for getting the depth of this bounds.
|
abstract float |
getHeight()
Convenience function for getting the height of this bounds.
|
static BaseBounds |
getInstance(float minX,
float minY,
float maxX,
float maxY) |
static BaseBounds |
getInstance(float minX,
float minY,
float minZ,
float maxX,
float maxY,
float maxZ) |
abstract Vec2f |
getMax(Vec2f max) |
abstract Vec3f |
getMax(Vec3f max) |
abstract float |
getMaxX() |
abstract float |
getMaxY() |
abstract float |
getMaxZ() |
abstract Vec2f |
getMin(Vec2f min) |
abstract Vec3f |
getMin(Vec3f min) |
abstract float |
getMinX() |
abstract float |
getMinY() |
abstract float |
getMinZ() |
abstract float |
getWidth()
Convenience function for getting the width of this bounds.
|
abstract boolean |
intersects(float x,
float y,
float width,
float height) |
abstract void |
intersectWith(BaseBounds other) |
abstract void |
intersectWith(float minX,
float minY,
float minZ,
float maxX,
float maxY,
float maxZ) |
abstract void |
intersectWith(Rectangle other) |
abstract boolean |
is2D()
Return true if this bounds is of a 2D BoundsType, else false.
|
abstract boolean |
isEmpty() |
abstract BaseBounds |
makeEmpty() |
abstract void |
roundOut() |
abstract void |
setBoundsAndSort(float minX,
float minY,
float minZ,
float maxX,
float maxY,
float maxZ) |
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).
|
protected abstract void |
sortMinMax() |
abstract void |
translate(float x,
float y,
float z) |
public abstract BaseBounds copy()
public abstract boolean is2D()
public abstract BaseBounds.BoundsType getBoundsType()
public abstract float getWidth()
public abstract float getHeight()
public abstract float getDepth()
public abstract float getMinX()
public abstract float getMinY()
public abstract float getMinZ()
public abstract float getMaxX()
public abstract float getMaxY()
public abstract float getMaxZ()
public abstract void translate(float x, float y, float z)
public abstract BaseBounds deriveWithUnion(BaseBounds other)
public abstract BaseBounds deriveWithNewBounds(Rectangle other)
public abstract BaseBounds deriveWithNewBounds(BaseBounds other)
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 void intersectWith(Rectangle other)
public abstract void intersectWith(BaseBounds other)
public abstract void intersectWith(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
public abstract void setBoundsAndSort(Point2D p1, Point2D p2)
public abstract void setBoundsAndSort(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
public abstract void add(Point2D p)
public abstract void add(float x, float y, float z)
public abstract boolean contains(Point2D p)
public abstract boolean contains(float x, float y)
public abstract boolean intersects(float x, float y, float width, float height)
public abstract boolean isEmpty()
public abstract void roundOut()
public abstract RectBounds flattenInto(RectBounds bounds)
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 returnedpublic abstract BaseBounds makeEmpty()
public abstract boolean disjoint(float x, float y, float width, float height)
protected abstract void sortMinMax()
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)
Copyright © 2020. All rights reserved.