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
3ead38ca
Commit
3ead38ca
authored
8 years ago
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make one side of the box sharp
parent
00ad9737
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
mesh.cpp
QTProject/mesh.cpp
+15
-3
No files found.
QTProject/mesh.cpp
View file @
3ead38ca
...
...
@@ -106,9 +106,21 @@ void Mesh::MeshEntry::init(QOpenGLFunctions_4_3_Core *f,QVector<Vertex>& Vertice
QMap
<
Edge
,
unsigned
int
>
sharpEdges
;
if
(
fakeSharpness
){
for
(
int
i
=
0
;
i
<
Indices
.
size
();
i
+=
3
){
sharpEdges
.
insert
(
Edge
(
Indices
[
i
],
Indices
[
i
+
1
]),
3
);
sharpEdges
.
insert
(
Edge
(
Indices
[
i
+
1
],
Indices
[
i
+
2
]),
3
);
sharpEdges
.
insert
(
Edge
(
Indices
[
i
+
2
],
Indices
[
i
]),
3
);
Vertex
a
=
Vertices
[
Indices
[
i
+
0
]];
Vertex
b
=
Vertices
[
Indices
[
i
+
1
]];
Vertex
c
=
Vertices
[
Indices
[
i
+
2
]];
if
(
a
.
pos
.
z
()
>
0.9
&&
b
.
pos
.
z
()
>
0.9
)
{
if
(
a
.
pos
.
x
()
==
b
.
pos
.
x
()
||
a
.
pos
.
y
()
==
b
.
pos
.
y
())
sharpEdges
.
insert
(
Edge
(
Indices
[
i
],
Indices
[
i
+
1
]),
3
);
}
if
(
b
.
pos
.
z
()
>
0.9
&&
c
.
pos
.
z
()
>
0.9
)
{
if
(
b
.
pos
.
x
()
==
c
.
pos
.
x
()
||
b
.
pos
.
y
()
==
c
.
pos
.
y
())
sharpEdges
.
insert
(
Edge
(
Indices
[
i
+
1
],
Indices
[
i
+
2
]),
3
);
}
if
(
c
.
pos
.
z
()
>
0.9
&&
a
.
pos
.
z
()
>
0.9
)
{
if
(
c
.
pos
.
x
()
==
a
.
pos
.
x
()
||
c
.
pos
.
y
()
==
a
.
pos
.
y
())
sharpEdges
.
insert
(
Edge
(
Indices
[
i
+
2
],
Indices
[
i
]),
3
);
}
}
}
buffers
[
0
].
reset
(
new
SubdivEntry
);
...
...
This diff is collapsed.
Click to expand it.
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