Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
Unterteilungsalgorithmen
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
Unterteilungsalgorithmen
Commits
51432f8a
Commit
51432f8a
authored
Sep 22, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn if/else into switch
parent
3a064b57
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
subdivision.cpp
QTProject/subdivision.cpp
+7
-3
No files found.
QTProject/subdivision.cpp
View file @
51432f8a
...
@@ -326,15 +326,19 @@ void Subdivision::precomputeVertexTable(Subdivision::Tables &tables, QVector<Ver
...
@@ -326,15 +326,19 @@ void Subdivision::precomputeVertexTable(Subdivision::Tables &tables, QVector<Ver
if
(
vb
[
ib_combined
[
j
]].
samePos
(
originalVertex
)){
if
(
vb
[
ib_combined
[
j
]].
samePos
(
originalVertex
)){
d
.
push_back
(
j
);
d
.
push_back
(
j
);
unsigned
int
i1
,
i2
;
//indices for neighbour vertices
unsigned
int
i1
,
i2
;
//indices for neighbour vertices
if
(
j
%
3
==
0
){
switch
(
j
%
3
)
{
case
0
:
i1
=
ib_combined
[
j
+
1
];
i1
=
ib_combined
[
j
+
1
];
i2
=
ib_combined
[
j
+
2
];
i2
=
ib_combined
[
j
+
2
];
}
else
if
(
j
%
3
==
1
){
break
;
case
1
:
i1
=
ib_combined
[
j
-
1
];
i1
=
ib_combined
[
j
-
1
];
i2
=
ib_combined
[
j
+
1
];
i2
=
ib_combined
[
j
+
1
];
}
else
{
break
;
case
2
:
i1
=
ib_combined
[
j
-
2
];
i1
=
ib_combined
[
j
-
2
];
i2
=
ib_combined
[
j
-
1
];
i2
=
ib_combined
[
j
-
1
];
break
;
}
}
Vertex
v1
,
v2
;
//neighbour vertices;
Vertex
v1
,
v2
;
//neighbour vertices;
...
...
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