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
5de98145
Commit
5de98145
authored
Sep 28, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new ibToTriangles
parent
163766c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
triangle.cpp
QTProject/triangle.cpp
+18
-0
triangle.h
QTProject/triangle.h
+1
-0
No files found.
QTProject/triangle.cpp
View file @
5de98145
...
...
@@ -208,6 +208,24 @@ Triangle::Edge::Name rotate_edge_name(Triangle::Edge::Name edge) {
}
}
//Annahme: indices in sharpEdges in gleicher Reihenfolge wie im Indexbuffer
void
ibToTriangles
(
const
QVector
<
Vertex
>
*
vb
,
const
QVector
<
unsigned
int
>
&
ib
,
const
QMap
<
Edge
,
unsigned
int
>&
sharpEdges
,
QVector
<
Triangle
>
&
triangles
)
{
for
(
int
i
=
0
;
i
<
ib
.
length
();
i
+=
3
)
{
//sharpness
Edge
uv
=
Edge
(
ib
[
i
],
ib
[
i
+
1
]);
Edge
vw
=
Edge
(
ib
[
i
+
1
],
ib
[
i
+
2
]);
Edge
wu
=
Edge
(
ib
[
i
+
2
],
ib
[
i
]);
unsigned
int
shuv
=
sharpEdges
.
value
(
uv
,
0
);
unsigned
int
shvw
=
sharpEdges
.
value
(
vw
,
0
);
unsigned
int
shwu
=
sharpEdges
.
value
(
wu
,
0
);
triangles
.
push_back
(
Triangle
(
vb
,
ib
[
i
],
ib
[
i
+
1
],
ib
[
i
+
2
],
shuv
,
shvw
,
shwu
));
}
}
void
Triangle
::
set_sharpness
(
Triangle
::
Edge
::
Name
name
,
unsigned
int
value
){
if
(
name
==
Edge
::
Name
::
uv
){
sharpness_uv
=
value
;
...
...
QTProject/triangle.h
View file @
5de98145
...
...
@@ -88,6 +88,7 @@ class Triangle {
};
Triangle
::
Edge
::
Name
rotate_edge_name
(
Triangle
::
Edge
::
Name
edge
);
void
ibToTriangles
(
const
QVector
<
Vertex
>
*
vb
,
const
QVector
<
unsigned
int
>
&
ib
,
const
QMap
<
Edge
,
unsigned
int
>&
sharpEdges
,
QVector
<
Triangle
>
&
triangles
);
void
regularIbToTriangles
(
const
QVector
<
Vertex
>
*
vb
,
const
QVector
<
unsigned
int
>
&
ib
,
QVector
<
Triangle
>
&
triangles
);
void
trianglesToIB
(
const
QVector
<
Triangle
>
&
triangles
,
QVector
<
unsigned
int
>
&
ib
);
...
...
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