Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
359d9703
Commit
359d9703
authored
Aug 09, 2024
by
Riegel
Browse files
Fixed typos in method names
parent
471303c8
Changes
4
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorEdge/src/main/java/de/hft/stuttgart/citydoctor2/edge/Global.java
View file @
359d9703
...
...
@@ -25,7 +25,7 @@ public class Global {
private
static
final
double
DBL_EPSILON
=
2.2204460492503131
e
-
16
;
private
static
final
double
M_ZERO_ANGLE_COSIN
US
=
1.0
e
-
9
;
private
static
final
double
M_ZERO_ANGLE_COSIN
E
=
1.0
e
-
9
;
private
static
final
double
M_TOL_VECTORS_PARALLEL
=
1
e
-
9
;
private
static
final
double
M_HIGH_ACCURACY_TOL
=
DBL_EPSILON
*
5
;
private
static
final
double
M_TOL_POINTS_EQUAL
=
1
e
-
3
;
...
...
@@ -33,7 +33,9 @@ public class Global {
private
Global
()
{
}
public
static
double
getTolPointsEquals
()
{
return
M_TOL_POINTS_EQUAL
;
}
public
static
double
getTolPointsEquals
()
{
return
M_TOL_POINTS_EQUAL
;
}
public
static
double
getHighAccuracyTolerance
()
{
return
M_HIGH_ACCURACY_TOL
;
...
...
@@ -49,7 +51,7 @@ public class Global {
};
}
public
static
double
getZeroAngleCosin
us
()
{
return
M_ZERO_ANGLE_COSIN
US
;
}
public
static
double
getZeroAngleCosin
e
()
{
return
M_ZERO_ANGLE_COSIN
E
;
}
public
static
double
getTolVectorsParallel
()
{
return
M_TOL_VECTORS_PARALLEL
;
...
...
CityDoctorParent/CityDoctorEdge/src/main/java/de/hft/stuttgart/citydoctor2/edge/GmStraight.java
View file @
359d9703
...
...
@@ -55,7 +55,7 @@ public class GmStraight {
return
dir
;
}
public
boolean
isColinear
(
GmStraight
straight2
,
double
angleEpsilon
,
double
epsilon
)
{
public
boolean
isCol
l
inear
(
GmStraight
straight2
,
double
angleEpsilon
,
double
epsilon
)
{
UnitVector3d
rDir1
=
getDir
();
UnitVector3d
rDir2
=
straight2
.
getDir
();
...
...
CityDoctorParent/CityDoctorEdge/src/main/java/de/hft/stuttgart/citydoctor2/edge/GmStraight2d.java
View file @
359d9703
...
...
@@ -60,7 +60,7 @@ public class GmStraight2d {
Vector2d
r2Perpendicular
=
r2
.
getPerpendicularVector
();
double
diff
=
r1
.
dot
(
r2Perpendicular
);
if
(
Math
.
abs
(
diff
)
<
Global
.
getZeroAngleCosin
us
())
{
if
(
Math
.
abs
(
diff
)
<
Global
.
getZeroAngleCosin
e
())
{
return
GmStraight2dIntersectionResult
.
parallel
(
this
,
other
);
}
else
{
double
invR1DotPerpR2
=
1.0
/
diff
;
...
...
CityDoctorParent/CityDoctorEdge/src/main/java/de/hft/stuttgart/citydoctor2/edge/IntersectPlanarPolygons.java
View file @
359d9703
...
...
@@ -256,7 +256,7 @@ public class IntersectPlanarPolygons {
// check if the straight of the HalfEdge is collinear to the intersection
// straight; this might result in an embedded edge intersection result
// TODO MW: really needed? this check is also made some lines above
if
(
heStraight
.
isColinear
(
intersectingStraight
,
angleEpsilon
,
epsilon
))
{
if
(
heStraight
.
isCol
l
inear
(
intersectingStraight
,
angleEpsilon
,
epsilon
))
{
currHESharesAPntWithTheOtherPolygon
=
false
;
}
...
...
@@ -276,7 +276,7 @@ public class IntersectPlanarPolygons {
Vector2d
diffVec
=
heStraight2d
.
getOrigin
().
minus
(
intersectingStraight2d
.
getOrigin
());
double
diffVecDotPerpDir
=
diffVec
.
dot
(
dir
.
getPerpendicularVector
());
if
(
Math
.
abs
(
diffVecDotPerpDir
)
<
Global
.
getZeroAngleCosin
us
())
{
if
(
Math
.
abs
(
diffVecDotPerpDir
)
<
Global
.
getZeroAngleCosin
e
())
{
// Straights are identical
Point2d
p1
=
heStraight2d
.
getOrigin
();
Point2d
p2
=
heStraight2d
.
getTarget
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment