Class CSGDemo
java.lang.Object
eu.svjatoslav.aukio.e3d.examples.essentials.CSGDemo
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/aukio-3d-demos.jar eu.svjatoslav.aukio.e3d.examples.essentials.CSGDemo
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera) Builds the demo scene: three CSG operation results with description panels, scene lighting, and the camera placement that views all three.static voidEntry point for the CSG demo.
-
Constructor Details
-
CSGDemo
public CSGDemo()
-
-
Method Details
-
buildScene
public static void buildScene(eu.svjatoslav.aukio.e3d.renderer.raster.ShapeCollection shapes, eu.svjatoslav.aukio.e3d.renderer.raster.lighting.LightingManager lighting, eu.svjatoslav.aukio.e3d.geometry.Camera camera) Builds the demo scene: three CSG operation results with description panels, scene lighting, and the camera placement that views all three. Called by bothmain(String[])and the golden-image harness — must stay deterministic (no time, no unseeded randomness).- Parameters:
shapes- scene to add shapes tolighting- lighting to configurecamera- camera to position
-
main
Entry point for the CSG demo.- Parameters:
args- command line arguments (ignored)
-