2 * Sixth 3D engine. Author: Svjatoslav Agejenko.
3 * This project is released under Creative Commons Zero (CC0) license.
8 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite;
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;
15 public class LightSourceMarker extends AbstractCompositeShape {
17 public LightSourceMarker(final Point3D location, final Color color) {
19 final LineAppearance appearance = new LineAppearance(10);
21 final int markerSize = 10;
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));
30 addShape(appearance.getLine(new Point3D(-markerSize, markerSize,
31 -markerSize), new Point3D(markerSize, markerSize, -markerSize),
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));