Formatting update
[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 package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line;
6
7 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
8 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
9
10 public class LineAppearance {
11
12     private final double lineWidth;
13
14     private Color color = new Color(100, 100, 255, 255);
15
16     public LineAppearance() {
17         lineWidth = 1;
18     }
19
20     public LineAppearance(final double lineWidth) {
21         this.lineWidth = lineWidth;
22     }
23
24     public LineAppearance(final double lineWidth, final Color color) {
25         this.lineWidth = lineWidth;
26         this.color = color;
27     }
28
29     public Line getLine(final Point3D point1, final Point3D point2) {
30         return new Line(point1, point2, color, lineWidth);
31     }
32
33     public Line getLine(final Point3D point1, final Point3D point2,
34                         final Color color) {
35         return new Line(point1, point2, color, lineWidth);
36     }
37
38     public double getLineWidth() {
39         return lineWidth;
40     }
41
42 }