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
0c6f77a7
Commit
0c6f77a7
authored
Jun 15, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Subdivision class
parent
aa771a6c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
3 deletions
+54
-3
Subdivision.pro
QTProject/Subdivision.pro
+4
-2
mainwidget.cpp
QTProject/mainwidget.cpp
+2
-0
mainwidget.h
QTProject/mainwidget.h
+2
-1
subdivision.cpp
QTProject/subdivision.cpp
+22
-0
subdivision.h
QTProject/subdivision.h
+24
-0
No files found.
QTProject/Subdivision.pro
View file @
0c6f77a7
...
@@ -17,13 +17,15 @@ SOURCES += main.cpp\
...
@@ -17,13 +17,15 @@ SOURCES += main.cpp\
mainwidget
.
cpp
\
mainwidget
.
cpp
\
mesh
.
cpp
\
mesh
.
cpp
\
texture
.
cpp
\
texture
.
cpp
\
camera
.
cpp
camera
.
cpp
\
subdivision
.
cpp
HEADERS
+=
mainwindow
.
h
\
HEADERS
+=
mainwindow
.
h
\
mainwidget
.
h
\
mainwidget
.
h
\
mesh
.
h
\
mesh
.
h
\
texture
.
h
\
texture
.
h
\
camera
.
h
camera
.
h
\
subdivision
.
h
FORMS
+=
FORMS
+=
...
...
QTProject/mainwidget.cpp
View file @
0c6f77a7
...
@@ -7,6 +7,7 @@ MainWidget::MainWidget(Camera *cam)
...
@@ -7,6 +7,7 @@ MainWidget::MainWidget(Camera *cam)
rotTime
=
QTime
::
currentTime
();
rotTime
=
QTime
::
currentTime
();
wireframe
=
false
;
wireframe
=
false
;
rotation
=
true
;
rotation
=
true
;
subdivision
=
new
Subdivision
(
this
);
}
}
QSize
MainWidget
::
minimumSizeHint
()
const
QSize
MainWidget
::
minimumSizeHint
()
const
...
@@ -126,6 +127,7 @@ void MainWidget::loadNewMesh(QString path){
...
@@ -126,6 +127,7 @@ void MainWidget::loadNewMesh(QString path){
qDebug
()
<<
"Opening File:"
<<
path
;
qDebug
()
<<
"Opening File:"
<<
path
;
Mesh
*
temp
=
new
Mesh
(
this
,
path
);
Mesh
*
temp
=
new
Mesh
(
this
,
path
);
subdivision
->
subdivide
(
temp
);
mesh
=
temp
;
mesh
=
temp
;
}
}
...
...
QTProject/mainwidget.h
View file @
0c6f77a7
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include <assimp/postprocess.h>
#include <assimp/postprocess.h>
#include "mesh.h"
#include "mesh.h"
#include "camera.h"
#include "camera.h"
#include "subdivision.h"
class
MainWidget
:
public
QOpenGLWidget
,
public
QOpenGLFunctions_4_3_Core
class
MainWidget
:
public
QOpenGLWidget
,
public
QOpenGLFunctions_4_3_Core
...
@@ -60,7 +61,7 @@ private:
...
@@ -60,7 +61,7 @@ private:
QPointF
*
lastScreenPos
;
QPointF
*
lastScreenPos
;
Subdivision
*
subdivision
;
Mesh
*
mesh
;
Mesh
*
mesh
;
QOpenGLShaderProgram
*
initShaderProgram
();
QOpenGLShaderProgram
*
initShaderProgram
();
...
...
QTProject/subdivision.cpp
0 → 100644
View file @
0c6f77a7
#include "subdivision.h"
Subdivision
::
Subdivision
(
QOpenGLFunctions_4_3_Core
*
f
)
{
this
->
f
=
f
;
}
Subdivision
::~
Subdivision
()
{
}
Mesh
*
Subdivision
::
subdivide
(
Mesh
*
mesh
)
{
precomputeTables
(
mesh
);
runShader
(
mesh
);
return
NULL
;
}
void
Subdivision
::
precomputeTables
(
Mesh
*
mesh
)
{
}
void
Subdivision
::
runShader
(
Mesh
*
mesh
)
{
}
QTProject/subdivision.h
0 → 100644
View file @
0c6f77a7
#ifndef SUBDIVISION_H
#define SUBDIVISION_H
#include <QtOpenGL>
#include <QOpenGLFunctions_4_3_Core>
#include "mesh.h"
class
Subdivision
{
public
:
Subdivision
(
QOpenGLFunctions_4_3_Core
*
f
);
~
Subdivision
();
Mesh
*
subdivide
(
Mesh
*
mesh
);
private
:
QOpenGLFunctions_4_3_Core
*
f
;
void
precomputeTables
(
Mesh
*
mesh
);
void
runShader
(
Mesh
*
mesh
);
};
#endif
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