public interface P2DBoundingBoxInterface extends FwkInterface
Modifier and Type | Method and Description |
---|---|
P2DBoundingBoxInterface |
closestIntersection(P2DBoundingBoxInterface[] bounds)
Finds closest bounding object which intersects this bounding box
|
boolean |
contains(P2DBoundingBoxInterface box)
Checks whether the complete bounding box is inside this one.
|
boolean |
contains(java.awt.geom.Point2D p)
Test for intersection with a point
|
double |
getArea()
Returns the square of the enclosed area.
|
double |
getHeight()
Retrieves the height of the box.
|
java.awt.geom.AffineTransform |
getInverseTransform()
Get the inverse transformation.
|
java.awt.geom.Point2D |
getLower()
Get the lower vector.
|
void |
getLower(java.awt.geom.Point2D lower)
Get the lower vector.
|
java.awt.geom.Rectangle2D |
getRectangle()
Retrieves the rectanlge defined by this box.
|
P2DBoundingBoxInterface |
getScaledBoundingBox()
Get the scaled bounding box.
|
double |
getScaledHeight()
Retrieves the scaled height of the box.
|
java.awt.geom.Point2D |
getScaledLower()
Get the lower scaled vector.
|
void |
getScaledLower(java.awt.geom.Point2D lower)
Get the lower scaled vector.
|
java.awt.geom.Point2D |
getScaledUpper()
Get the upper scaled vector.
|
void |
getScaledUpper(java.awt.geom.Point2D upper)
Get the upper scaled vector.
|
double |
getScaledWidth()
Retrieves the scaled width of the box.
|
java.awt.geom.AffineTransform |
getTransform()
Get the transformation for this boundingbox.
|
java.awt.geom.Point2D |
getUpper()
Get the upper vector.
|
void |
getUpper(java.awt.geom.Point2D upper)
Get the upper vector.
|
double |
getWidth()
Retrieves the width of the box.
|
double |
getXFactor()
Get the scale of the bounding box in X direction.
|
double |
getXOffset()
Get the offset of the bounding box in X direction.
|
java.awt.geom.AffineTransform |
getXTransform()
Get the transformation for this boundingbox in x direction.
|
double |
getYFactor()
Get the scale of the bounding box in Y direction.
|
double |
getYOffset()
Get the offset of the bounding box in Y direction.
|
java.awt.geom.AffineTransform |
getYTransform()
Get the transformation for this boundingbox in y direction.
|
boolean |
intersects(P2DBoundingBoxInterface bounds)
Test for intersection with another bounds object
|
boolean |
intersects(P2DBoundingBoxInterface[] bounds)
Test for intersection with an array of bounds objects
|
boolean |
intersects(P2DBoundingBoxInterface[] bounds,
P2DBoundingBoxInterface newBoundBox)
Test for intersection with an array of bounds objects
|
boolean |
intersects(P2DBoundingBoxInterface bounds,
P2DBoundingBoxInterface newBoundBox)
Test for intersection with another bounding box
|
java.awt.geom.Point2D |
inverseTransformPoint(java.awt.geom.Point2D p)
Transform the point.
|
boolean |
isInside(P2DBoundingBoxInterface box)
Checks whether the given box is inside this one.
|
void |
move(double xDiff,
double yDiff)
Move the box.
|
void |
setHeight(double height)
Set the height of the box.
|
void |
setLower(java.awt.geom.Point2D lower)
Set the lower vector.
|
void |
setOffset(double xOffset,
double yOffset)
Scale the bounding box to the given values.
|
void |
setScale(double xFactor,
double yFactor)
Scale the bounding box to the given values.
|
void |
setUpper(java.awt.geom.Point2D upper)
Set the upper vector.
|
void |
setWidth(double width)
Set the width of the box.
|
void |
setXScale(double offset,
double scale)
Scale the bounding box in X direction.
|
void |
setYScale(double offset,
double scale)
Scale the bounding box in Y direction.
|
java.awt.geom.Point2D |
transformPoint(java.awt.geom.Point2D p)
Transform the point.
|
getVersion, release
P2DBoundingBoxInterface closestIntersection(P2DBoundingBoxInterface[] bounds)
boundsObjects
- is an array of bounds objectsboolean intersects(P2DBoundingBoxInterface bounds)
boolean intersects(P2DBoundingBoxInterface[] bounds)
boolean intersects(P2DBoundingBoxInterface[] bounds, P2DBoundingBoxInterface newBoundBox)
boundsObjects
- is an array of bounds objectsnewBoundBox
- is the new bounding box which is the intersection of the boundsObject and this BoundingBoxboolean intersects(P2DBoundingBoxInterface bounds, P2DBoundingBoxInterface newBoundBox)
boundsObject
- is another bounding objectnewBoundBox
- - is the new bounding box which is the intersection of the boundsObject and this BoundingBoxboolean contains(java.awt.geom.Point2D p)
boolean contains(P2DBoundingBoxInterface box)
void getLower(java.awt.geom.Point2D lower)
lower
- The vector that receives the lower value.java.awt.geom.Point2D getUpper()
java.awt.geom.Point2D getLower()
P2DBoundingBoxInterface getScaledBoundingBox()
java.awt.geom.Point2D getScaledUpper()
java.awt.geom.Point2D getScaledLower()
void getScaledUpper(java.awt.geom.Point2D upper)
The
- upper value.void getScaledLower(java.awt.geom.Point2D lower)
void getUpper(java.awt.geom.Point2D upper)
upper
- The vector that receives the upper value.void setLower(java.awt.geom.Point2D lower)
lower
- The vector that will be the new lower value.void setUpper(java.awt.geom.Point2D upper)
upper
- The vector that will be the new upper value.double getArea()
double getWidth()
double getHeight()
double getScaledWidth()
double getScaledHeight()
void setWidth(double width)
width
- The widthvoid setHeight(double height)
height
- The heightjava.awt.geom.Rectangle2D getRectangle()
void move(double xDiff, double yDiff)
xDiff
- the movement in x.yDiff
- the movement in y.boolean isInside(P2DBoundingBoxInterface box)
void setScale(double xFactor, double yFactor)
xFactor
- the scaling in x.yFactor
- The scaling in y.void setOffset(double xOffset, double yOffset)
xOffset
- the offset in x.yOffset
- The offset in y.void setXScale(double offset, double scale)
offset
- the offset in x.scale
- the scaling in x.void setYScale(double offset, double scale)
offset
- the offset in y.scale
- the scaling in y.double getXFactor()
double getYFactor()
double getXOffset()
double getYOffset()
java.awt.geom.AffineTransform getTransform()
java.awt.geom.AffineTransform getXTransform()
java.awt.geom.AffineTransform getYTransform()
java.awt.geom.AffineTransform getInverseTransform()
getTransform
java.awt.geom.Point2D transformPoint(java.awt.geom.Point2D p)
p
- The point to be transformed to the out coordinate system.java.awt.geom.Point2D inverseTransformPoint(java.awt.geom.Point2D p)
p
- The point to be transformed to the defined coordinate system.