java.lang.Object
org.jgrapht.alg.drawing.model.Boxes
A collection of utilities to assist with boxes manipulation.
- Author:
- Dimitrios Michail
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsPoint
(Box2D box, Point2D p) Test whether a box contains a point.static boolean
containsPoint
(Box2D box, Point2D p, Comparator<Double> comparator) Test whether a box contains a point.splitAlongXAxis
(Box2D box) Split a box along the x axis into two equal boxes.splitAlongYAxis
(Box2D box) Split a box along the y axis into two equal boxes.
-
Constructor Details
-
Boxes
public Boxes()
-
-
Method Details
-
containsPoint
Test whether a box contains a point.- Parameters:
box
- the boxp
- the point- Returns:
- true if the point is contained inside the box, false otherwise
-
splitAlongXAxis
Split a box along the x axis into two equal boxes.- Parameters:
box
- the box to split- Returns:
- a pair with the two resulting boxes
-
splitAlongYAxis
Split a box along the y axis into two equal boxes.- Parameters:
box
- the box to split- Returns:
- a pair with the two resulting boxes
-
containsPoint
Test whether a box contains a point.- Parameters:
box
- the boxp
- the pointcomparator
- the comparator to use- Returns:
- true if the point is contained inside the box, false otherwise
-