/*
- * Sixth 3D engine demos. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine demos. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- */
+*/
package eu.svjatoslav.sixth.e3d.examples;
public class RandomPolygonsDemo {
- public static final double POLYGON_AVERAGE_SIZE = 130;
- public static final int POLYGON_COUNT = 10000;
+ private static final double POLYGON_AVERAGE_SIZE = 130;
+ private static final int POLYGON_COUNT = 1000;
private static void addRandomPolygon(final ShapeCollection geometryCollection) {
final Point3D polygonLocation = getRandomPoint(1000);
}
/* I don't want very dark polygons, so ensure there is at least some
- * brightness present. */
+ * brightness present. */
private static double getColorChannelBrightness() {
return Math.random() * 0.7 + 0.3f;
}
final ViewFrame viewFrame = new ViewFrame();
- final ShapeCollection shapeCollection = viewFrame.getView()
- .getContext().getRootShapeCollection();
+ final ShapeCollection shapeCollection = viewFrame.getViewPanel()
+ .getRootShapeCollection();
// add grid
final LineAppearance appearance = new LineAppearance(5, new Color(100,