module CSG
Defined in:
csg.crprimitives/node.cr
primitives/plane.cr
primitives/polygon.cr
primitives/vector.cr
primitives/vector2d.cr
primitives/vertex.cr
Class Method Summary
-
.intersect(pa : Array(Polygon), pb : Array(Polygon))
Return an array of polygons representing space both the solid
Aand in the solidB. -
.inverse(pa : Array(Polygon))
Return an array of polygons with solid and empty space switched.
-
.subtract(pa : Array(Polygon), pb : Array(Polygon))
Return an array of polygons representing space in the solid
Abut not in the solidB. -
.union(pa : Array(Polygon), pb : Array(Polygon))
Return an array of polygons representing space in either the solid
Aor in the solidB.
Class Method Detail
Return an array of polygons representing space both the solid A and in the
solid B. Neither this solid nor the solid B are modified.
CSG.intersect(A, B)
+-------+
| |
| A |
| +--+----+ = +--+
+----+--+ | +--+
| B |
| |
+-------+
Return an array of polygons with solid and empty space switched.
Return an array of polygons representing space in the solid A but not in the
solid B. Neither this solid nor the solid B are modified.
CSG.subtract(A, B)
+-------+ +-------+
| | | |
| A | | |
| +--+----+ = | +--+
+----+--+ | +----+
| B |
| |
+-------+
Return an array of polygons representing space in either the solid A or in the
solid B. Neither the solid A nor the solid B are modified.
CSG.union(A,B)
+-------+ +-------+
| | | |
| A | | |
| +--+----+ = | +----+
+----+--+ | +----+ |
| B | | |
| | | |
+-------+ +-------+