2 * Sixth core user interface. Author: Svjatoslav Agejenko.
3 * This project is released under Creative Commons Zero (CC0) license.
6 package eu.svjatoslav.sixth.core;
8 import eu.svjatoslav.sixth.e3d.geometry.Point2D;
9 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
10 import eu.svjatoslav.sixth.e3d.geometry.Rectangle;
11 import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
12 import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
13 import eu.svjatoslav.sixth.e3d.gui.textEditorComponent.TextEditComponent;
14 import eu.svjatoslav.sixth.e3d.math.Transform;
15 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
16 import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
17 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
18 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.wireframe.Grid2D;
22 private static Grid2D createGrid() {
23 final Transform location = new Transform(
24 new Point3D(0, 100, 0),
28 return new Grid2D(location,
32 new LineAppearance(10, new Color("00b3ad")));
35 public static void main(final String[] args) {
37 final ViewFrame viewFrame = new ViewFrame();
38 final ViewPanel viewPanel = viewFrame.getViewPanel();
40 final ShapeCollection shapeCollection = viewFrame.getViewPanel()
41 .getRootShapeCollection();
43 shapeCollection.addShape(createGrid());
46 final TextEditComponent textEditor = new TextEditComponent(
47 new Transform(new Point3D(0, 0, 0)), viewPanel,
48 new Point2D(200, 120));
50 shapeCollection.addShape(textEditor);
52 viewPanel.getAvatar().setLocation(new Point3D(500, -300, -800));
53 viewPanel.getAvatar().setAngleXZ(0.6);
54 viewPanel.getAvatar().setAngleYZ(-0.5);