** Mathematical formulas
:PROPERTIES:
:CUSTOM_ID: mathematical-formulas
-:ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890
+:ID: b1c2d3e4-f5a6-7890-bcde-f12345678901
:END:
[[file:Screenshots/Mathematical formulas.png]]
================================================================================
#+end_example
-
** Developer tools
:PROPERTIES:
:CUSTOM_ID: developer-tools
--- /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.OctreeDemo;
import eu.svjatoslav.sixth.e3d.examples.RandomPolygonsDemo;
import eu.svjatoslav.sixth.e3d.examples.RainingNumbersDemo;
final GroupLayout groupLayout = new GroupLayout(this);
GroupLayout.SequentialGroup sequentialGroup = groupLayout.createSequentialGroup();
sequentialGroup.addComponent(new JLabel("Choose an example to launch:"));
+ sequentialGroup.addComponent(new JButton(new ShowMyFirstScene()));
sequentialGroup.addComponent(new JButton(new ShowOctree()));
sequentialGroup.addComponent(new JButton(new ShowMathGraphs()));
sequentialGroup.addComponent(new JButton(new ShowPointCloud()));
sequentialGroup.addComponent(new JButton(new ShowGraphicsBenchmark()));
}
+ /** Action to launch the MyFirstScene (minimal example). */
+ private static class ShowMyFirstScene extends AbstractAction {
+ ShowMyFirstScene() {
+ putValue(NAME, "My First Scene");
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent e) {
+ MyFirstScene.main(null);
+ }
+ }
+
/** Action to launch the TextEditorDemo. */
private static class ShowTextEditors extends AbstractAction {
ShowTextEditors() {