Updated copyright
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / composite / LightSourceMarker.java
1 /*
2  * Sixth 3D engine. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of version 3 of the GNU Lesser General Public License
6  * or later as published by the Free Software Foundation.
7  *
8  */
9
10 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite;
11
12 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
13 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
14 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
15 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.base.AbstractCompositeShape;
16
17 public class LightSourceMarker extends AbstractCompositeShape {
18
19     public LightSourceMarker(final Point3D location, final Color color) {
20         super(location);
21         final LineAppearance appearance = new LineAppearance(10);
22
23         final int markerSize = 10;
24
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(-markerSize, markerSize, -markerSize), color));
29         addShape(appearance.getLine(new Point3D(0, -markerSize, 0),
30                 new Point3D(0, markerSize, markerSize), color));
31
32         addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
33                         -markerSize), new Point3D(markerSize, markerSize, -markerSize),
34                 color));
35         addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
36                 -markerSize), new Point3D(0, markerSize, markerSize), color));
37         addShape(appearance.getLine(new Point3D(0, markerSize, markerSize),
38                 new Point3D(markerSize, markerSize, -markerSize), color));
39     }
40 }