Package toxi.geom
Class SutherlandHodgemanClipper
java.lang.Object
toxi.geom.SutherlandHodgemanClipper
- All Implemented Interfaces:
PolygonClipper2D
A version of the Sutherland-Hodgeman algorithm to clip 2D polygons optimized
for rectangular clipping regions.
More information: http://en.wikipedia.org/wiki/Sutherland-Hodgman_algorithm
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SutherlandHodgemanClipper
-
-
Method Details
-
clipPolygon
Description copied from interface:PolygonClipper2D
Creates a clipped version of the polygon to the boundary shape set.- Specified by:
clipPolygon
in interfacePolygonClipper2D
- Parameters:
poly
- polygon to be clipped- Returns:
- clipped poly
-
getBounds
- Returns:
- the bounding rect
-
setBounds
- Parameters:
bounds
- the bounding rect to set
-