--- /dev/null
+/*
+ * Sixth 3D engine demos. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
+ *
+ */
+package eu.svjatoslav.sixth.e3d.examples;
+
+import eu.svjatoslav.sixth.e3d.geometry.Point3D;
+import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
+import eu.svjatoslav.sixth.e3d.math.Transform;
+import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
+import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
+import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.solid.SolidPolygonRectangularBox;
+
+/**
+ * Minimal example demonstrating how to create a basic 3D scene.
+ * <p>
+ * Creates a window with a single red box. This is the "Create Your First 3D Scene"
+ * example from the Sixth 3D documentation.
+ */
+public class MinimalExample {
+
+ /**
+ * Entry point for the minimal scene demo.
+ * @param args command line arguments (ignored)
+ */
+ public static void main(String[] args) {
+ ViewFrame viewFrame = new ViewFrame();
+ ShapeCollection shapes = viewFrame.getViewPanel().getRootShapeCollection();
+
+ Transform boxTransform = new Transform(new Point3D(0, 0, 0), 0, 0);
+ SolidPolygonRectangularBox box = new SolidPolygonRectangularBox(
+ new Point3D(-50, -50, -50),
+ new Point3D(50, 50, 50),
+ Color.RED
+ );
+ box.setTransform(boxTransform);
+ shapes.addShape(box);
+
+ viewFrame.getViewPanel().getCamera().getTransform().setTranslation(new Point3D(0, -100, -300));
+
+ viewFrame.getViewPanel().ensureRenderThreadStarted();
+ }
+}
\ No newline at end of file
+++ /dev/null
-/*
- * Sixth 3D engine demos. Author: Svjatoslav Agejenko.
- * This project is released under Creative Commons Zero (CC0) license.
- *
- */
-package eu.svjatoslav.sixth.e3d.examples;
-
-import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
-import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
-import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
-import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.solid.SolidPolygonRectangularBox;
-
-/**
- * Minimal example demonstrating how to create a basic 3D scene.
- * <p>
- * Creates a window with a single red box. This is the "Create Your First 3D Scene"
- * example from the Sixth 3D documentation.
- */
-public class MyFirstScene {
-
- /**
- * Entry point for the minimal scene demo.
- * @param args command line arguments (ignored)
- */
- public static void main(String[] args) {
- ViewFrame viewFrame = new ViewFrame();
- ShapeCollection shapes = viewFrame.getViewPanel().getRootShapeCollection();
-
- Transform boxTransform = new Transform(new Point3D(0, 0, 0), 0, 0);
- SolidPolygonRectangularBox box = new SolidPolygonRectangularBox(
- new Point3D(-50, -50, -50),
- new Point3D(50, 50, 50),
- Color.RED
- );
- box.setTransform(boxTransform);
- shapes.addShape(box);
-
- viewFrame.getViewPanel().getCamera().getTransform().setTranslation(new Point3D(0, -100, -300));
-
- viewFrame.getViewPanel().ensureRenderThreadStarted();
- }
-}
\ No newline at end of file
package eu.svjatoslav.sixth.e3d.examples.launcher;
import eu.svjatoslav.sixth.e3d.examples.GraphDemo;
-import eu.svjatoslav.sixth.e3d.examples.MyFirstScene;
+import eu.svjatoslav.sixth.e3d.examples.MinimalExample;
import eu.svjatoslav.sixth.e3d.examples.OctreeDemo;
import eu.svjatoslav.sixth.e3d.examples.RandomPolygonsDemo;
import eu.svjatoslav.sixth.e3d.examples.RainingNumbersDemo;
private record DemoEntry(String name, String description, AbstractAction action) {}
private static final DemoEntry[] DEMOS = {
- new DemoEntry("My First Scene",
+ new DemoEntry("Minimal Example",
"Minimal example showing a single red box",
- new ShowMyFirstScene()),
+ new ShowMinimalExample()),
new DemoEntry("Volumetric Octree",
"Octree-based rendering with on-demand raytracing",
new ShowOctree()),
.addGroup(horizontalDescGroup));
}
- private static class ShowMyFirstScene extends AbstractAction {
- ShowMyFirstScene() {
- putValue(NAME, "My First Scene");
+ private static class ShowMinimalExample extends AbstractAction {
+ ShowMinimalExample() {
+ putValue(NAME, "Minimal Example");
}
@Override
public void actionPerformed(final ActionEvent e) {
- MyFirstScene.main(null);
+ MinimalExample.main(null);
}
}