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