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
e28d3501
Commit
e28d3501
authored
Sep 01, 2016
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Time format
parent
6c991eac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
subdivision.cpp
QTProject/subdivision.cpp
+9
-3
subdivision.h
QTProject/subdivision.h
+2
-0
No files found.
QTProject/subdivision.cpp
View file @
e28d3501
...
...
@@ -13,6 +13,12 @@ Subdivision::~Subdivision()
delete
edgeShader
;
}
QString
Subdivision
::
getTimeSting
(
int
time
){
return
QString
(
"%1m %2s %3ms"
).
arg
(
time
/
60000
,
2
,
10
,
QChar
(
'0'
))
.
arg
((
time
%
60000
)
/
1000
,
2
,
10
,
QChar
(
'0'
))
.
arg
((
time
%
1000
)
,
3
,
10
,
QChar
(
'0'
));
}
void
Subdivision
::
init
()
{
QString
source
=
QLatin1String
(
":/subdivision-edge.compute"
);
edgeShader
=
initComputeShaderProgram
(
source
);
...
...
@@ -383,7 +389,7 @@ void Subdivision::splitRegular(Mesh *mesh) {
current_mesh
->
buffers
[
0
]
->
updateIndices
();
qCDebug
(
log_timing
)
<<
"splitRegular(mesh): time: "
<<
totalTimer
.
elapsed
()
<<
"ms"
;
qCDebug
(
log_timing
)
<<
"splitRegular(mesh): time: "
<<
getTimeSting
(
totalTimer
.
elapsed
())
;
qCDebug
(
log_subdiv
)
<<
"splitRegular(mesh): regular: "
<<
regular
.
length
();
qCDebug
(
log_subdiv
)
<<
"splitRegular(mesh): irregular: "
<<
irregular
.
length
();
}
...
...
@@ -536,7 +542,7 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_
}
}
qCDebug
(
log_timing
)
<<
"PatchIndexBuffer done:"
<<
totalTimer
.
elapsed
()
<<
"ms"
;
qCDebug
(
log_timing
)
<<
"PatchIndexBuffer done:"
<<
getTimeSting
(
totalTimer
.
elapsed
())
;
return
pib
;
}
...
...
@@ -596,7 +602,7 @@ void Subdivision::findRegular(QVector<unsigned int> index_buffer, QVector<Vertex
irregular
.
push_back
(
index_buffer
[
i
+
2
]);
}
}
qCDebug
(
log_timing
)
<<
"Find Regular done:"
<<
totalTimer
.
elapsed
()
<<
"ms"
;
qCDebug
(
log_timing
)
<<
"Find Regular done:"
<<
getTimeSting
(
totalTimer
.
elapsed
())
;
}
bool
Subdivision
::
matchAndCompleteTriangleIndices
(
unsigned
int
sx
,
unsigned
int
sy
,
unsigned
int
sz
,
unsigned
int
tx
,
unsigned
int
ty
,
unsigned
int
&
tz
){
...
...
QTProject/subdivision.h
View file @
e28d3501
...
...
@@ -48,6 +48,8 @@ private:
bool
is_regular
;
};
QString
getTimeSting
(
int
time
);
QOpenGLFunctions_4_3_Core
*
f
;
QOpenGLShaderProgram
*
edgeShader
;
QOpenGLShaderProgram
*
vertexShader
;
...
...
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