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
044ba85c
Commit
044ba85c
authored
Sep 27, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove debug messages
parent
b0186557
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
+0
-22
subdivision.cpp
QTProject/subdivision.cpp
+0
-22
No files found.
QTProject/subdivision.cpp
View file @
044ba85c
...
@@ -208,7 +208,6 @@ void Subdivision::buildNeighborsMap(QVector<Vertex> &vb, QVector<Triangle> &tria
...
@@ -208,7 +208,6 @@ void Subdivision::buildNeighborsMap(QVector<Vertex> &vb, QVector<Triangle> &tria
f
->
glBufferData
(
GL_SHADER_STORAGE_BUFFER
,
triangles
.
size
()
*
3
*
sizeof
(
GLuint
),
NULL
,
GL_DYNAMIC_DRAW
);
f
->
glBufferData
(
GL_SHADER_STORAGE_BUFFER
,
triangles
.
size
()
*
3
*
sizeof
(
GLuint
),
NULL
,
GL_DYNAMIC_DRAW
);
GLuint
*
ptr
=
(
GLuint
*
)
f
->
glMapBuffer
(
GL_SHADER_STORAGE_BUFFER
,
GL_WRITE_ONLY
);
GLuint
*
ptr
=
(
GLuint
*
)
f
->
glMapBuffer
(
GL_SHADER_STORAGE_BUFFER
,
GL_WRITE_ONLY
);
qDebug
()
<<
vb
.
size
();
for
(
int
i
=
0
;
i
<
triangles
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
triangles
.
size
();
i
++
)
{
ptr
[
3
*
i
+
0
]
=
triangles
[
i
].
u_idx
();
ptr
[
3
*
i
+
0
]
=
triangles
[
i
].
u_idx
();
ptr
[
3
*
i
+
1
]
=
triangles
[
i
].
v_idx
();
ptr
[
3
*
i
+
1
]
=
triangles
[
i
].
v_idx
();
...
@@ -257,7 +256,6 @@ void Subdivision::buildNeighborsMap(QVector<Vertex> &vb, QVector<Triangle> &tria
...
@@ -257,7 +256,6 @@ void Subdivision::buildNeighborsMap(QVector<Vertex> &vb, QVector<Triangle> &tria
f
->
glUnmapBuffer
(
GL_SHADER_STORAGE_BUFFER
);
f
->
glUnmapBuffer
(
GL_SHADER_STORAGE_BUFFER
);
f
->
glBindBuffer
(
GL_SHADER_STORAGE_BUFFER
,
0
);
f
->
glBindBuffer
(
GL_SHADER_STORAGE_BUFFER
,
0
);
qDebug
()
<<
"dispatching with offset"
<<
offset_in
<<
offset_search
;
f
->
glDispatchCompute
(
128
,
32
,
1
);
f
->
glDispatchCompute
(
128
,
32
,
1
);
offset_search
+=
128
*
32
;
offset_search
+=
128
*
32
;
...
@@ -499,13 +497,10 @@ void Subdivision::precomputeEdgeTable(Subdivision::Tables &tables, QVector<Trian
...
@@ -499,13 +497,10 @@ void Subdivision::precomputeEdgeTable(Subdivision::Tables &tables, QVector<Trian
tables
.
index_buffer
.
push_back
(
wu
);
tables
.
index_buffer
.
push_back
(
wu
);
}
}
qDebug
()
<<
"extra triangles"
<<
extra_triangles
.
size
();
QMapIterator
<
Triangle
,
bool
>
extra_it
(
extra_triangles
);
QMapIterator
<
Triangle
,
bool
>
extra_it
(
extra_triangles
);
while
(
extra_it
.
hasNext
())
{
while
(
extra_it
.
hasNext
())
{
extra_it
.
next
();
extra_it
.
next
();
Triangle
triangle
=
extra_it
.
key
();
Triangle
triangle
=
extra_it
.
key
();
qDebug
()
<<
triangle
;
int
uv
=
-
1
;
int
uv
=
-
1
;
int
vw
=
-
1
;
int
vw
=
-
1
;
int
wu
=
-
1
;
int
wu
=
-
1
;
...
@@ -701,30 +696,13 @@ void Subdivision::splitRegular(Mesh *mesh) {
...
@@ -701,30 +696,13 @@ void Subdivision::splitRegular(Mesh *mesh) {
Mesh
::
MeshEntry
*
current_mesh
=
mesh
->
getMeshEntry
(
first_mesh_index
);
Mesh
::
MeshEntry
*
current_mesh
=
mesh
->
getMeshEntry
(
first_mesh_index
);
QVector
<
Triangle
>
all_triangles
;
QVector
<
Triangle
>
all_triangles
;
qDebug
()
<<
current_mesh
->
buffers
[
0
]
->
indices_irregular
.
size
()
<<
current_mesh
->
buffers
[
0
]
->
indices_regular
.
size
();
ibToTriangles
(
&
current_mesh
->
buffers
[
0
]
->
vertices
,
current_mesh
->
buffers
[
0
]
->
indices_irregular
,
all_triangles
);
ibToTriangles
(
&
current_mesh
->
buffers
[
0
]
->
vertices
,
current_mesh
->
buffers
[
0
]
->
indices_irregular
,
all_triangles
);
QVector
<
unsigned
int
>
old_regular_ib
=
patchIBToTriangleIB
(
current_mesh
->
buffers
[
0
]
->
indices_regular
);
QVector
<
unsigned
int
>
old_regular_ib
=
patchIBToTriangleIB
(
current_mesh
->
buffers
[
0
]
->
indices_regular
);
ibToTriangles
(
&
current_mesh
->
buffers
[
0
]
->
vertices
,
old_regular_ib
,
all_triangles
);
ibToTriangles
(
&
current_mesh
->
buffers
[
0
]
->
vertices
,
old_regular_ib
,
all_triangles
);
qDebug
()
<<
all_triangles
.
size
();
QMap
<
Triangle
,
Triangle
::
Neighbors
>
neighbors
;
QMap
<
Triangle
,
Triangle
::
Neighbors
>
neighbors
;
buildNeighborsMap
(
current_mesh
->
buffers
[
0
]
->
vertices
,
all_triangles
,
neighbors
);
buildNeighborsMap
(
current_mesh
->
buffers
[
0
]
->
vertices
,
all_triangles
,
neighbors
);
QVectorIterator
<
Triangle
>
i
(
all_triangles
);
while
(
i
.
hasNext
())
{
Triangle
triangle
=
i
.
next
();
Triangle
::
Neighbors
ns
=
neighbors
.
value
(
triangle
);
if
(
ns
.
uv
.
triangle
==
NULL
)
{
qDebug
()
<<
qSetRealNumberPrecision
(
10
)
<<
"uv"
<<
triangle
;
}
if
(
ns
.
vw
.
triangle
==
NULL
)
{
qDebug
()
<<
qSetRealNumberPrecision
(
10
)
<<
"vw"
<<
triangle
;
}
if
(
ns
.
wu
.
triangle
==
NULL
)
{
qDebug
()
<<
"wu"
<<
triangle
;
}
}
QVector
<
Triangle
>
regular
;
QVector
<
Triangle
>
regular
;
QVector
<
Triangle
>
irregular
;
QVector
<
Triangle
>
irregular
;
findRegular
(
all_triangles
,
neighbors
,
regular
,
irregular
);
findRegular
(
all_triangles
,
neighbors
,
regular
,
irregular
);
...
...
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