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
9599a99f
Commit
9599a99f
authored
Sep 27, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only apply (update for draw) to border vertices
parent
b27ec892
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
subdivision.cpp
QTProject/subdivision.cpp
+10
-0
No files found.
QTProject/subdivision.cpp
View file @
9599a99f
...
@@ -1144,12 +1144,22 @@ void Subdivision::updateIrregularForDraw(const QVector<Triangle> &triangles,QMap
...
@@ -1144,12 +1144,22 @@ void Subdivision::updateIrregularForDraw(const QVector<Triangle> &triangles,QMap
result
.
vertex_buffer_irregular
[
triangle
.
v_idx
()]
=
result
.
vertex_buffer
.
at
(
triangle
.
v_idx
());
result
.
vertex_buffer_irregular
[
triangle
.
v_idx
()]
=
result
.
vertex_buffer
.
at
(
triangle
.
v_idx
());
result
.
vertex_buffer_irregular
[
triangle
.
w_idx
()]
=
result
.
vertex_buffer
.
at
(
triangle
.
w_idx
());
result
.
vertex_buffer_irregular
[
triangle
.
w_idx
()]
=
result
.
vertex_buffer
.
at
(
triangle
.
w_idx
());
bool
uv_sharp
=
(
triangle
.
get_sharpness_uv
()
>
0
);
bool
vw_sharp
=
(
triangle
.
get_sharpness_vw
()
>
0
);
bool
wu_sharp
=
(
triangle
.
get_sharpness_wu
()
>
0
);
Triangle
::
Neighbors
ns
=
neighbors
.
value
(
triangle
);
Triangle
::
Neighbors
ns
=
neighbors
.
value
(
triangle
);
if
(
!
(
uv_sharp
||
wu_sharp
))
{
result
.
vertex_buffer_irregular
[
triangle
.
u_idx
()].
pos
=
updateIrregularVertexForDraw
(
triangle
.
u
(),
vertexNeighbors
(
triangle
,
ns
.
uv
,
neighbors
));
result
.
vertex_buffer_irregular
[
triangle
.
u_idx
()].
pos
=
updateIrregularVertexForDraw
(
triangle
.
u
(),
vertexNeighbors
(
triangle
,
ns
.
uv
,
neighbors
));
}
if
(
!
(
uv_sharp
||
vw_sharp
))
{
result
.
vertex_buffer_irregular
[
triangle
.
v_idx
()].
pos
=
updateIrregularVertexForDraw
(
triangle
.
v
(),
vertexNeighbors
(
triangle
,
ns
.
vw
,
neighbors
));
result
.
vertex_buffer_irregular
[
triangle
.
v_idx
()].
pos
=
updateIrregularVertexForDraw
(
triangle
.
v
(),
vertexNeighbors
(
triangle
,
ns
.
vw
,
neighbors
));
}
if
(
!
(
vw_sharp
||
wu_sharp
))
{
result
.
vertex_buffer_irregular
[
triangle
.
w_idx
()].
pos
=
updateIrregularVertexForDraw
(
triangle
.
w
(),
vertexNeighbors
(
triangle
,
ns
.
wu
,
neighbors
));
result
.
vertex_buffer_irregular
[
triangle
.
w_idx
()].
pos
=
updateIrregularVertexForDraw
(
triangle
.
w
(),
vertexNeighbors
(
triangle
,
ns
.
wu
,
neighbors
));
}
}
}
qCDebug
(
log_timing
)
<<
"updateIrregularForDraw done:"
<<
formatTimeMeasurement
(
timer
.
elapsed
());
qCDebug
(
log_timing
)
<<
"updateIrregularForDraw done:"
<<
formatTimeMeasurement
(
timer
.
elapsed
());
}
}
...
...
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