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
0727fa49
Commit
0727fa49
authored
Sep 24, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add get_neighbor
parent
c5b2bea6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
triangle.cpp
QTProject/triangle.cpp
+14
-0
triangle.h
QTProject/triangle.h
+2
-0
No files found.
QTProject/triangle.cpp
View file @
0727fa49
#include <cassert>
#include <QDebugStateSaver>
#include <QDebugStateSaver>
#include "triangle.h"
#include "triangle.h"
...
@@ -187,6 +188,19 @@ void ibToTriangles(QVector<Vertex> *vb, QVector<unsigned int> &ib, QVector<Trian
...
@@ -187,6 +188,19 @@ void ibToTriangles(QVector<Vertex> *vb, QVector<unsigned int> &ib, QVector<Trian
}
}
}
}
Triangle
::
Neighbor
Triangle
::
Neighbors
::
get_neighbor
(
Triangle
::
Edge
::
Name
name
)
{
switch
(
name
)
{
case
Triangle
:
:
Edge
::
Name
::
uv
:
return
this
->
uv
;
case
Triangle
:
:
Edge
::
Name
::
vw
:
return
this
->
vw
;
case
Triangle
:
:
Edge
::
Name
::
wu
:
return
this
->
wu
;
default
:
assert
(
false
);
}
}
void
insert_neighbor
(
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
const
Triangle
&
triangle_a
,
const
Triangle
::
Edge
&
edge_a
,
Triangle
*
triangle_b
,
const
Triangle
::
Edge
&
edge_b
)
{
void
insert_neighbor
(
QMap
<
Triangle
,
Triangle
::
Neighbors
>
&
neighbors
,
const
Triangle
&
triangle_a
,
const
Triangle
::
Edge
&
edge_a
,
Triangle
*
triangle_b
,
const
Triangle
::
Edge
&
edge_b
)
{
if
(
!
neighbors
.
contains
(
triangle_a
))
{
if
(
!
neighbors
.
contains
(
triangle_a
))
{
neighbors
.
insert
(
triangle_a
,
Triangle
::
Neighbors
());
neighbors
.
insert
(
triangle_a
,
Triangle
::
Neighbors
());
...
...
QTProject/triangle.h
View file @
0727fa49
...
@@ -30,6 +30,8 @@ class Triangle {
...
@@ -30,6 +30,8 @@ class Triangle {
Neighbor
uv
;
Neighbor
uv
;
Neighbor
vw
;
Neighbor
vw
;
Neighbor
wu
;
Neighbor
wu
;
Triangle
::
Neighbor
get_neighbor
(
Triangle
::
Edge
::
Name
name
);
};
};
Triangle
();
Triangle
();
...
...
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