Changed license to Creative Commons Zero (CC0).
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / basic / line / LineAppearance.java
1 /*
2  * Sixth 3D engine. Author: Svjatoslav Agejenko. 
3  * This project is released under Creative Commons Zero (CC0) license.
4  *
5 *
6  */
7
8 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line;
9
10 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
11 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
12
13 public class LineAppearance {
14
15     private final double lineWidth;
16
17     private Color color = new Color(100, 100, 255, 255);
18
19     public LineAppearance() {
20         lineWidth = 1;
21     }
22
23     public LineAppearance(final double lineWidth) {
24         this.lineWidth = lineWidth;
25     }
26
27     public LineAppearance(final double lineWidth, final Color color) {
28         this.lineWidth = lineWidth;
29         this.color = color;
30     }
31
32     public Line getLine(final Point3D point1, final Point3D point2) {
33         return new Line(point1, point2, color, lineWidth);
34     }
35
36     public Line getLine(final Point3D point1, final Point3D point2,
37                         final Color color) {
38         return new Line(point1, point2, color, lineWidth);
39     }
40
41     public double getLineWidth() {
42         return lineWidth;
43     }
44
45 }