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
59b5b0e9
Commit
59b5b0e9
authored
Aug 22, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use unsigned int in Triangle
parent
197f85be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
triangle.cpp
QTProject/triangle.cpp
+4
-4
triangle.h
QTProject/triangle.h
+7
-7
No files found.
QTProject/triangle.cpp
View file @
59b5b0e9
...
@@ -13,7 +13,7 @@ Triangle::Triangle(const Triangle &other) {
...
@@ -13,7 +13,7 @@ Triangle::Triangle(const Triangle &other) {
this
->
w_
=
other
.
w_
;
this
->
w_
=
other
.
w_
;
}
}
Triangle
::
Triangle
(
const
QVector
<
Vertex
>
&
vertex_buffer
,
int
u
,
int
v
,
int
w
)
{
Triangle
::
Triangle
(
const
QVector
<
Vertex
>
&
vertex_buffer
,
unsigned
int
u
,
unsigned
int
v
,
unsigned
int
w
)
{
this
->
vertex_buffer_
=
vertex_buffer
;
this
->
vertex_buffer_
=
vertex_buffer
;
this
->
u_
=
u
;
this
->
u_
=
u
;
this
->
v_
=
v
;
this
->
v_
=
v
;
...
@@ -32,15 +32,15 @@ Vertex Triangle::w() const {
...
@@ -32,15 +32,15 @@ Vertex Triangle::w() const {
return
vertex_buffer_
[
w_
];
return
vertex_buffer_
[
w_
];
}
}
int
Triangle
::
u_idx
()
const
{
unsigned
int
Triangle
::
u_idx
()
const
{
return
u_
;
return
u_
;
}
}
int
Triangle
::
v_idx
()
const
{
unsigned
int
Triangle
::
v_idx
()
const
{
return
v_
;
return
v_
;
}
}
int
Triangle
::
w_idx
()
const
{
unsigned
int
Triangle
::
w_idx
()
const
{
return
w_
;
return
w_
;
}
}
...
...
QTProject/triangle.h
View file @
59b5b0e9
...
@@ -23,15 +23,15 @@ class Triangle {
...
@@ -23,15 +23,15 @@ class Triangle {
Triangle
();
Triangle
();
Triangle
(
const
Triangle
&
other
);
Triangle
(
const
Triangle
&
other
);
Triangle
(
const
QVector
<
Vertex
>
&
vertex_buffer
,
int
u
,
int
v
,
int
w
);
Triangle
(
const
QVector
<
Vertex
>
&
vertex_buffer
,
unsigned
int
u
,
unsigned
int
v
,
unsigned
int
w
);
Vertex
u
()
const
;
Vertex
u
()
const
;
Vertex
v
()
const
;
Vertex
v
()
const
;
Vertex
w
()
const
;
Vertex
w
()
const
;
int
u_idx
()
const
;
unsigned
int
u_idx
()
const
;
int
v_idx
()
const
;
unsigned
int
v_idx
()
const
;
int
w_idx
()
const
;
unsigned
int
w_idx
()
const
;
bool
get_shared_edge
(
Triangle
other
,
Edge
&
edge_a
,
Edge
&
edge_b
)
const
;
bool
get_shared_edge
(
Triangle
other
,
Edge
&
edge_a
,
Edge
&
edge_b
)
const
;
...
@@ -44,9 +44,9 @@ class Triangle {
...
@@ -44,9 +44,9 @@ class Triangle {
private
:
private
:
QVector
<
Vertex
>
vertex_buffer_
;
QVector
<
Vertex
>
vertex_buffer_
;
int
u_
;
unsigned
int
u_
;
int
v_
;
unsigned
int
v_
;
int
w_
;
unsigned
int
w_
;
void
rotate_indices
();
void
rotate_indices
();
bool
get_shared_edge_
(
const
Triangle
&
other
,
Edge
&
edge_a
,
Edge
&
edge_b
)
const
;
bool
get_shared_edge_
(
const
Triangle
&
other
,
Edge
&
edge_a
,
Edge
&
edge_b
)
const
;
...
...
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