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
2aba8a8a
Commit
2aba8a8a
authored
Sep 27, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract code into removeVertex
parent
a8bc7b1f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
subdivision.cpp
QTProject/subdivision.cpp
+13
-7
No files found.
QTProject/subdivision.cpp
View file @
2aba8a8a
...
...
@@ -1073,17 +1073,23 @@ QVector<Vertex> Subdivision::getAllVertices(const QVector<Triangle> &triangles)
return
result
;
}
QVector3D
Subdivision
::
updateIrregularVertexForDraw
(
Vertex
currentCorner
,
QVector
<
Triangle
>
neighboring_triangles
)
{
QVector
<
Vertex
>
surroundingVertex
;
surroundingVertex
=
getAllVertices
(
neighboring_triangles
);
QMutableVectorIterator
<
Vertex
>
i
(
surroundingVertex
);
bool
removeVertex
(
QVector
<
Vertex
>
&
vertices
,
const
Vertex
&
vertex
)
{
QMutableVectorIterator
<
Vertex
>
i
(
vertices
);
while
(
i
.
hasNext
())
{
if
(
currentCorner
.
samePos
(
i
.
next
()))
{
if
(
vertex
.
samePos
(
i
.
next
()))
{
i
.
remove
();
break
;
return
true
;
}
}
return
false
;
}
QVector3D
Subdivision
::
updateIrregularVertexForDraw
(
Vertex
currentCorner
,
QVector
<
Triangle
>
neighboring_triangles
)
{
QVector
<
Vertex
>
surroundingVertex
;
surroundingVertex
=
getAllVertices
(
neighboring_triangles
);
bool
removed
=
removeVertex
(
surroundingVertex
,
currentCorner
);
assert
(
removed
);
QVector3D
newPos
(
0.0
,
0.0
,
0.0
);
...
...
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