GmStraight2dIntersectionResult.java 2.09 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*-
 *  Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
 * 
 *  This file is part of CityDoctor2.
 *
 *  CityDoctor2 is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  CityDoctor2 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with CityDoctor2.  If not, see <https://www.gnu.org/licenses/>.
 */
package de.hft.stuttgart.citydoctor2.edge;


public class GmStraight2dIntersectionResult {

	private double paramHE;
	private double paramInt;

	private GmStraight2d straightHE;
	private GmStraight2d straightInt;

	private boolean areParallel;

	public static GmStraight2dIntersectionResult parallel(GmStraight2d s1, GmStraight2d s2) {
		return new GmStraight2dIntersectionResult(0, 0, s1, s2, true);
	}

Matthias Betz's avatar
Matthias Betz committed
35
36
37
	public static GmStraight2dIntersectionResult intersecting(double paramHE, double paramInt, GmStraight2d straightHE,
			GmStraight2d straightInt) {
		return new GmStraight2dIntersectionResult(paramHE, paramInt, straightHE, straightInt, false);
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	}

	private GmStraight2dIntersectionResult(double paramHE, double paramInt, GmStraight2d straightHE,
			GmStraight2d straightInt, boolean areParallel) {
		this.paramHE = paramHE;
		this.paramInt = paramInt;
		this.straightHE = straightHE;
		this.straightInt = straightInt;
		this.areParallel = areParallel;
	}

	public double getParamHE() {
		return paramHE;
	}

	public double getParamInt() {
		return paramInt;
	}

	public GmStraight2d getStraightHE() {
		return straightHE;
	}

	public GmStraight2d getStraightInt() {
		return straightInt;
	}

	public boolean areParallel() {
		return areParallel;
	}

}