Changed license to Creative Commons Zero (CC0).
[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 *
6  */
7
8 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite;
9
10 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
11 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
12 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
13 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape;
14
15 public class LightSourceMarker extends AbstractCompositeShape {
16
17     public LightSourceMarker(final Point3D location, final Color color) {
18         super(location);
19         final LineAppearance appearance = new LineAppearance(10);
20
21         final int markerSize = 10;
22
23         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
24                 new Point3D(markerSize, markerSize, -markerSize), color));
25         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
26                 new Point3D(-markerSize, markerSize, -markerSize), color));
27         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
28                 new Point3D(0, markerSize, markerSize), color));
29
30         addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
31                         -markerSize), new Point3D(markerSize, markerSize, -markerSize),
32                 color));
33         addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
34                 -markerSize), new Point3D(0, markerSize, markerSize), color));
35         addShape(appearance.getLine(new Point3D(0, markerSize, markerSize),
36                 new Point3D(markerSize, markerSize, -markerSize), color));
37     }
38 }