Formatting update
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / composite / LightSourceMarker.java
1 /*
2  * Sixth 3D engine. Author: Svjatoslav Agejenko.
3  * This project is released under Creative Commons Zero (CC0) license.
4  */
5 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite;
6
7 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
8 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
9 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
10 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape;
11
12 public class LightSourceMarker extends AbstractCompositeShape {
13
14     public LightSourceMarker(final Point3D location, final Color color) {
15         super(location);
16         final LineAppearance appearance = new LineAppearance(10);
17
18         final int markerSize = 10;
19
20         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
21                 new Point3D(markerSize, markerSize, -markerSize), color));
22         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
23                 new Point3D(-markerSize, markerSize, -markerSize), color));
24         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
25                 new Point3D(0, markerSize, markerSize), color));
26
27         addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
28                         -markerSize), new Point3D(markerSize, markerSize, -markerSize),
29                 color));
30         addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
31                 -markerSize), new Point3D(0, markerSize, markerSize), color));
32         addShape(appearance.getLine(new Point3D(0, markerSize, markerSize),
33                 new Point3D(markerSize, markerSize, -markerSize), color));
34     }
35 }