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
36f9cdb3
Commit
36f9cdb3
authored
Sep 24, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add trianglesToIB
parent
0fb2b6dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
triangle.cpp
QTProject/triangle.cpp
+11
-0
triangle.h
QTProject/triangle.h
+1
-0
No files found.
QTProject/triangle.cpp
View file @
36f9cdb3
...
...
@@ -192,6 +192,17 @@ void ibToTriangles(QVector<Vertex> *vb, QVector<unsigned int> &ib, QVector<Trian
}
}
void
trianglesToIB
(
const
QVector
<
Triangle
>
&
triangles
,
QVector
<
unsigned
int
>
&
ib
)
{
ib
.
reserve
(
ib
.
length
()
+
triangles
.
length
()
*
3
);
QVectorIterator
<
Triangle
>
it
(
triangles
);
while
(
it
.
hasNext
())
{
Triangle
triangle
=
it
.
next
();
ib
.
push_back
(
triangle
.
u_idx
());
ib
.
push_back
(
triangle
.
v_idx
());
ib
.
push_back
(
triangle
.
w_idx
());
}
}
Triangle
::
Neighbor
Triangle
::
Neighbors
::
get_neighbor
(
Triangle
::
Edge
::
Name
name
)
const
{
switch
(
name
)
{
case
Triangle
:
:
Edge
::
Name
::
uv
:
...
...
QTProject/triangle.h
View file @
36f9cdb3
...
...
@@ -73,6 +73,7 @@ class Triangle {
Triangle
::
Edge
::
Name
rotate_edge_name
(
Triangle
::
Edge
::
Name
edge
);
void
ibToTriangles
(
QVector
<
Vertex
>
*
vb
,
QVector
<
unsigned
int
>
&
ib
,
QVector
<
Triangle
>
&
triangles
);
void
trianglesToIB
(
const
QVector
<
Triangle
>
&
triangles
,
QVector
<
unsigned
int
>
&
ib
);
QDebug
operator
<<
(
QDebug
d
,
const
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