Moved galaxy object to 3D engine demonstration project
[sixth-3d-demos.git] / src / main / java / eu / svjatoslav / sixth / e3d / examples / galaxy_demo / PointCloudDemo.java
diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/galaxy_demo/PointCloudDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/galaxy_demo/PointCloudDemo.java
new file mode 100644 (file)
index 0000000..6ce037b
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Sixth 3D engine demos. Author: Svjatoslav Agejenko. 
+ * This project is released under Creative Commons Zero (CC0) license.
+ *
+*/
+
+package eu.svjatoslav.sixth.e3d.examples.galaxy_demo;
+
+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.ShapeCollection;
+
+public class PointCloudDemo {
+
+    public static void main(final String[] args) {
+
+        final ViewFrame viewFrame = new ViewFrame();
+
+        final ShapeCollection geometryCollection = viewFrame.getViewPanel()
+                .getRootShapeCollection();
+
+        Transform transform = new Transform(new Point3D(0, -1000, 1000), 0, 0);
+
+        // add galaxy
+        geometryCollection.addShape(new Galaxy(500, 3, 10000, transform));
+
+    }
+}