2 * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
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.
10 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite;
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;
17 public class LightSourceMarker extends AbstractCompositeShape {
19 public LightSourceMarker(final Point3D location, final Color color) {
21 final LineAppearance appearance = new LineAppearance(10);
23 final int markerSize = 10;
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));
32 addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
33 -markerSize), new Point3D(markerSize, markerSize, -markerSize),
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));