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
2d28fda0
Commit
2d28fda0
authored
Sep 15, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename toTriangles
parent
b21bdb93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
subdivision.cpp
QTProject/subdivision.cpp
+2
-2
subdivision.h
QTProject/subdivision.h
+1
-1
No files found.
QTProject/subdivision.cpp
View file @
2d28fda0
...
...
@@ -72,7 +72,7 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
input
.
vb_handle
=
entry
->
VB_handle
;
input
.
vertex_buffer
=
entry
->
vertices
;
input
.
index_irregular_buffer
=
entry
->
indices_irregular
;
input
.
index_regular_buffer
=
getTriangles
(
entry
->
indices_regular
);
input
.
index_regular_buffer
=
patchIBToTriangleIB
(
entry
->
indices_regular
);
if
(
input
.
index_irregular_buffer
.
isEmpty
())
{
// current_mesh->update(input.vb_handle, input.vertex_buffer, input.index_buffer, entry->indices_regular);
...
...
@@ -578,7 +578,7 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_
/**
* Turns a patch index buffer into an index buffer of triangles.
*/
QVector
<
unsigned
int
>
Subdivision
::
getTriangles
(
QVector
<
unsigned
int
>
ib
)
{
QVector
<
unsigned
int
>
Subdivision
::
patchIBToTriangleIB
(
QVector
<
unsigned
int
>
ib
)
{
QVector
<
unsigned
int
>
new_ib
;
for
(
int
i
=
0
;
i
<
ib
.
length
();
i
+=
12
)
{
new_ib
.
push_back
(
ib
[
i
+
3
]);
...
...
QTProject/subdivision.h
View file @
2d28fda0
...
...
@@ -63,7 +63,7 @@ private:
void
runVertexShader
(
GLuint
size
,
GLuint
vb_handle
,
GLuint
vertex_indices_handle
,
GLuint
vertex_offsets_handle
,
GLuint
output_handle
);
void
runEdgeShader
(
GLuint
size
,
GLuint
vb_handle
,
GLuint
edge_indices_handle
,
GLuint
output_handle
,
GLuint
offset
);
QVector
<
unsigned
int
>
getTriangles
(
QVector
<
unsigned
int
>
ib
);
QVector
<
unsigned
int
>
patchIBToTriangleIB
(
QVector
<
unsigned
int
>
ib
);
QVector
<
unsigned
int
>
getPatchIndexBuffer
(
QVector
<
unsigned
int
>
ib_regular
,
QVector
<
unsigned
int
>
ib_irregular
,
QVector
<
Vertex
>
vb
);
...
...
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