Updated copyright
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / basic / line / LineAppearance.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.basic.line;
11
12 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
13 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
14
15 public class LineAppearance {
16
17     private final double lineWidth;
18
19     private Color color = new Color(100, 100, 255, 255);
20
21     public LineAppearance() {
22         lineWidth = 1;
23     }
24
25     public LineAppearance(final double lineWidth) {
26         this.lineWidth = lineWidth;
27     }
28
29     public LineAppearance(final double lineWidth, final Color color) {
30         this.lineWidth = lineWidth;
31         this.color = color;
32     }
33
34     public Line getLine(final Point3D point1, final Point3D point2) {
35         return new Line(point1, point2, color, lineWidth);
36     }
37
38     public Line getLine(final Point3D point1, final Point3D point2,
39                         final Color color) {
40         return new Line(point1, point2, color, lineWidth);
41     }
42
43     public double getLineWidth() {
44         return lineWidth;
45     }
46
47 }