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
e6ccfe75
Commit
e6ccfe75
authored
Sep 28, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return edge_to_new_vertex from precomputeEdgeTable
parent
ed3dfc77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
subdivision.cpp
QTProject/subdivision.cpp
+7
-2
subdivision.h
QTProject/subdivision.h
+6
-1
No files found.
QTProject/subdivision.cpp
View file @
e6ccfe75
...
...
@@ -167,8 +167,10 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
buildNeighborsMap
(
vb
,
all_triangles
,
neighbors
);
QVector
<
Triangle
>
extra_old_triangles
;
QMap
<
Edge
,
unsigned
int
>
old_edge_to_new_vertex
;
subTimer
.
restart
();
precomputeEdgeTable
(
tables
,
triangles
,
neighbors
,
(
unsigned
int
)
vb
.
length
(),
extra_old_triangles
);
precomputeEdgeTable
(
tables
,
triangles
,
neighbors
,
(
unsigned
int
)
vb
.
length
(),
extra_old_triangles
,
old_edge_to_new_vertex
);
qCDebug
(
log_timing
)
<<
"precomputeEdgeTable:"
<<
formatTimeMeasurement
(
subTimer
.
elapsed
());
QVector
<
Triangle
>
irregular_and_extra_triangles
=
triangles
+
extra_old_triangles
;
...
...
@@ -386,7 +388,8 @@ QVector<Triangle> Subdivision::vertexNeighbors(Triangle &triangle, Triangle::Nei
return
ns
;
}
void
Subdivision
::
precomputeEdgeTable
(
Subdivision
::
Tables
&
tables
,
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
unsigned
int
offset
,
QVector
<
Triangle
>
extra_old_triangles
)
{
void
Subdivision
::
precomputeEdgeTable
(
Subdivision
::
Tables
&
tables
,
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
unsigned
int
offset
,
QVector
<
Triangle
>
extra_old_triangles
,
QMap
<
Edge
,
unsigned
int
>&
edge_to_new_vertex
)
{
//compute edge table
//Format: first two entries: edge vertices. last two entries: distant vertices.
...
...
@@ -592,6 +595,8 @@ void Subdivision::precomputeEdgeTable(Subdivision::Tables &tables, QVector<Trian
}
}
edge_to_new_vertex
=
edge_indices
;
qCDebug
(
log_subdiv
)
<<
"Done with edge table. "
<<
tables
.
edge_indices
.
length
();
if
(
log_subdiv_trace
().
isDebugEnabled
())
{
qCDebug
(
log_subdiv
)
<<
"Eedges found. Table: "
<<
tables
.
edge_indices
;
...
...
QTProject/subdivision.h
View file @
e6ccfe75
...
...
@@ -64,7 +64,12 @@ private:
Tables
precomputeTables
(
Input
input
);
void
buildNeighborsMap
(
QVector
<
Vertex
>
&
vb
,
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
);
QVector
<
Triangle
>
vertexNeighbors
(
Triangle
&
triangle
,
Triangle
::
Neighbor
current_neighbor
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
neighbors
);
void
precomputeEdgeTable
(
Subdivision
::
Tables
&
tables
,
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
unsigned
int
offset
,
QVector
<
Triangle
>
extra_old_triangles
);
void
precomputeEdgeTable
(
Subdivision
::
Tables
&
tables
,
QVector
<
Triangle
>
&
triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
unsigned
int
offset
,
QVector
<
Triangle
>
extra_old_triangles
,
QMap
<
Edge
,
unsigned
int
>&
edge_to_new_vertex
);
void
precomputeVertexTable
(
Tables
&
tables
,
QVector
<
Vertex
>
&
vb
,
QVector
<
Triangle
>
&
irregular_triangles
,
QMap
<
Triangle
,
Triangle
::
Neighbors
>
neighbors
,
QMap
<
unsigned
int
,
unsigned
int
>
&
modified_vertices
);
bool
containsVertexIndex
(
const
QVector
<
Vertex
>
&
vb
,
const
QVector
<
unsigned
int
>
&
vertices
,
const
Vertex
vertex
)
const
;
QVector
<
unsigned
int
>
getAllVertexIndices
(
const
QVector
<
Vertex
>
&
vb
,
const
QVector
<
Triangle
>
&
triangles
);
...
...
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