java.lang.Object
eu.svjatoslav.sixth.e3d.examples.essentials.CSGDemo

public class CSGDemo extends Object
Demo showcasing Constructive Solid Geometry (CSG) boolean operations.

This demo displays three CSG operations side by side:

  • Subtract: A cube with a spherical cavity carved out
  • Union: A cube merged with a sphere
  • Intersect: The volume shared by a cube and sphere

All operations use a consistent color scheme: red for the first argument (cube) and blue for the second argument (sphere). This makes it easy to see which parts of the result came from which input shape.

Run this demo:


 java -cp target/sixth-3d-demos.jar eu.svjatoslav.sixth.e3d.examples.essentials.CSGDemo
 
See Also:
  • AbstractCompositeShape.union(eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape)
  • AbstractCompositeShape.subtract(eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape)
  • AbstractCompositeShape.intersect(eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape)
  • Constructor Details

    • CSGDemo

      public CSGDemo()
  • Method Details

    • main

      public static void main(String[] args)
      Entry point for the CSG demo.
      Parameters:
      args - command line arguments (ignored)