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
6cf6fd52
Commit
6cf6fd52
authored
Sep 15, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add timing to precomputeTables
parent
2d28fda0
Hide 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 @
6cf6fd52
...
@@ -153,6 +153,8 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
...
@@ -153,6 +153,8 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
QVector
<
Vertex
>
vb
=
input
.
vertex_buffer
;
QVector
<
Vertex
>
vb
=
input
.
vertex_buffer
;
qCDebug
(
log_subdiv_trace
)
<<
"Vertex Buffer: "
<<
vb
;
qCDebug
(
log_subdiv_trace
)
<<
"Vertex Buffer: "
<<
vb
;
QTime
trianglesTimer
;
trianglesTimer
.
start
();
QVector
<
Triangle
>
triangles
;
QVector
<
Triangle
>
triangles
;
for
(
int
i
=
0
;
i
<
ib
.
length
();
i
+=
3
)
{
for
(
int
i
=
0
;
i
<
ib
.
length
();
i
+=
3
)
{
triangles
.
push_back
(
Triangle
(
&
vb
,
ib
[
i
],
ib
[
i
+
1
],
ib
[
i
+
2
]));
triangles
.
push_back
(
Triangle
(
&
vb
,
ib
[
i
],
ib
[
i
+
1
],
ib
[
i
+
2
]));
...
@@ -161,9 +163,17 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
...
@@ -161,9 +163,17 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
for
(
int
i
=
0
;
i
<
ib_regular
.
length
();
i
+=
3
)
{
for
(
int
i
=
0
;
i
<
ib_regular
.
length
();
i
+=
3
)
{
triangles
.
push_back
(
Triangle
(
&
vb
,
ib_regular
[
i
],
ib_regular
[
i
+
1
],
ib_regular
[
i
+
2
]));
triangles
.
push_back
(
Triangle
(
&
vb
,
ib_regular
[
i
],
ib_regular
[
i
+
1
],
ib_regular
[
i
+
2
]));
}
}
qCDebug
(
log_timing
)
<<
"building Triangles:"
<<
getTimeSting
(
trianglesTimer
.
elapsed
());
QTime
subTimer
;
subTimer
.
start
();
precomputeEdgeTable
(
tables
,
triangles
,
triangles_regular
,
(
unsigned
int
)
vb
.
length
());
precomputeEdgeTable
(
tables
,
triangles
,
triangles_regular
,
(
unsigned
int
)
vb
.
length
());
qCDebug
(
log_timing
)
<<
"precomputeEdgeTable:"
<<
getTimeSting
(
subTimer
.
elapsed
());
subTimer
.
restart
();
precomputeVertexTable
(
tables
,
vb
,
ib
,
ib_regular
);
precomputeVertexTable
(
tables
,
vb
,
ib
,
ib_regular
);
qCDebug
(
log_timing
)
<<
"precomputeVertexTable:"
<<
getTimeSting
(
subTimer
.
elapsed
());
//tables.patch_index_regular = getPatchIndexBuffer(ib, QVector<unsigned int>());//TODO pass regular and irregular index buffer?
//tables.patch_index_regular = getPatchIndexBuffer(ib, QVector<unsigned int>());//TODO pass regular and irregular index buffer?
qCDebug
(
log_subdiv
)
<<
"Precompute Tables Done"
;
qCDebug
(
log_subdiv
)
<<
"Precompute Tables Done"
;
...
...
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