Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
V
vadere
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
110
Issues
110
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vadere
vadere
Commits
8077e613
Commit
8077e613
authored
Dec 15, 2016
by
Jakob Schöttl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify code
parent
b90c9ffb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
13 deletions
+4
-13
VadereGui/src/org/vadere/gui/topographycreator/model/TopographyCreatorModel.java
...e/gui/topographycreator/model/TopographyCreatorModel.java
+2
-2
VadereUtils/src/org/vadere/util/geometry/shapes/VCircle.java
VadereUtils/src/org/vadere/util/geometry/shapes/VCircle.java
+0
-1
VadereUtils/src/org/vadere/util/geometry/shapes/VRing.java
VadereUtils/src/org/vadere/util/geometry/shapes/VRing.java
+2
-10
No files found.
VadereGui/src/org/vadere/gui/topographycreator/model/TopographyCreatorModel.java
View file @
8077e613
...
...
@@ -331,9 +331,9 @@ public class TopographyCreatorModel extends DefaultModel implements IDrawPanelMo
}
@Override
public
VShape
translateElement
(
ScenarioElement
element
ToCopy
,
VPoint
vector
)
{
public
VShape
translateElement
(
ScenarioElement
element
,
VPoint
vector
)
{
// double factor = Math.max(10,1/getGridResulution()); // ?? related to scaleTopography?
return
element
ToCopy
.
getShape
().
translatePrecise
(
alignToGrid
(
vector
));
return
element
.
getShape
().
translatePrecise
(
alignToGrid
(
vector
));
}
@Override
...
...
VadereUtils/src/org/vadere/util/geometry/shapes/VCircle.java
View file @
8077e613
...
...
@@ -6,7 +6,6 @@ import java.awt.geom.Ellipse2D;
import
java.awt.geom.PathIterator
;
import
java.awt.geom.Point2D
;
import
java.awt.geom.Rectangle2D
;
import
java.math.BigDecimal
;
import
org.vadere.util.geometry.ShapeType
;
import
org.vadere.util.geometry.Vector2D
;
...
...
VadereUtils/src/org/vadere/util/geometry/shapes/VRing.java
View file @
8077e613
...
...
@@ -10,9 +10,6 @@ import java.util.List;
import
org.vadere.util.geometry.ShapeType
;
import
com.vividsolutions.jts.geomgraph.Edge
;
import
com.vividsolutions.jts.geomgraph.index.EdgeSetIntersector
;
/**
* A ring consists of two circles of different size.
*
...
...
@@ -30,12 +27,6 @@ public class VRing implements VShape {
this
(
new
VPoint
(
0
,
0
),
radius1
,
radius2
);
}
private
VRing
(
VRing
ring
)
{
this
.
center
=
ring
.
center
;
this
.
radiusInnerCircle
=
ring
.
radiusInnerCircle
;
this
.
radiusOuterCircle
=
ring
.
radiusOuterCircle
;
}
public
VRing
(
VPoint
center
,
double
radius1
,
double
radius2
)
{
if
(
radius1
<=
0
||
radius2
<=
0
)
{
throw
new
IllegalArgumentException
(
"Radius must be positive."
);
...
...
@@ -87,6 +78,7 @@ public class VRing implements VShape {
}
@Override
// TODO not implemented, not tested!
public
boolean
contains
(
double
x
,
double
y
,
double
w
,
double
h
)
{
return
contains
(
new
VRectangle
(
x
,
y
,
w
,
h
));
...
...
@@ -116,7 +108,7 @@ public class VRing implements VShape {
}
private
List
<
VPoint
>
normalizePointsToCenter
(
List
<
VPoint
>
points
)
{
List
<
VPoint
>
normalizedPoints
=
new
ArrayList
<
VPoint
>();
List
<
VPoint
>
normalizedPoints
=
new
ArrayList
<>();
for
(
VPoint
point
:
points
)
{
VPoint
normalizedPoint
=
new
VPoint
(
point
.
x
-
center
.
x
,
point
.
y
-
center
.
y
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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