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
c6c99b52
Commit
c6c99b52
authored
Sep 01, 2016
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patchRender' of…
Merge branch 'patchRender' of
ssh://git.breab.org:2223/kai/Unterteilungsalgorithmen
into patchRender
parents
03f03769
636c143c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
5 deletions
+14
-5
mainwidget.cpp
QTProject/mainwidget.cpp
+10
-1
mainwidget.h
QTProject/mainwidget.h
+2
-0
mainwindow.cpp
QTProject/mainwindow.cpp
+2
-1
subdivision.h
QTProject/subdivision.h
+0
-3
No files found.
QTProject/mainwidget.cpp
View file @
c6c99b52
...
@@ -27,8 +27,17 @@ void MainWidget::wheelEvent(QWheelEvent *event )
...
@@ -27,8 +27,17 @@ void MainWidget::wheelEvent(QWheelEvent *event )
cam
->
move
(
QVector3D
(
0.0
,
0.0
,
10
));
cam
->
move
(
QVector3D
(
0.0
,
0.0
,
10
));
else
else
cam
->
move
(
QVector3D
(
0.0
,
0.0
,
-
10
));
cam
->
move
(
QVector3D
(
0.0
,
0.0
,
-
10
));
}
void
MainWidget
::
keyPressEvent
(
QKeyEvent
*
event
){
if
(
event
->
key
()
==
Qt
::
Key_Minus
){
cam
->
move
(
QVector3D
(
0.0
,
0.0
,
-
10
));
}
else
if
(
event
->
key
()
==
Qt
::
Key_Plus
){
cam
->
move
(
QVector3D
(
0.0
,
0.0
,
10
));
}
else
{
QOpenGLWidget
::
keyPressEvent
(
event
);
}
}
}
void
MainWidget
::
mousePressEvent
(
QMouseEvent
*
event
){
void
MainWidget
::
mousePressEvent
(
QMouseEvent
*
event
){
...
...
QTProject/mainwidget.h
View file @
c6c99b52
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
#include "mesh.h"
#include "mesh.h"
#include "camera.h"
#include "camera.h"
#include "subdivision.h"
#include "subdivision.h"
#include "logcategories.h"
class
MainWidget
:
public
QOpenGLWidget
,
public
QOpenGLFunctions_4_3_Core
class
MainWidget
:
public
QOpenGLWidget
,
public
QOpenGLFunctions_4_3_Core
...
@@ -44,6 +45,7 @@ protected:
...
@@ -44,6 +45,7 @@ protected:
void
mousePressEvent
(
QMouseEvent
*
event
)
;
void
mousePressEvent
(
QMouseEvent
*
event
)
;
void
mouseMoveEvent
(
QMouseEvent
*
event
)
;
void
mouseMoveEvent
(
QMouseEvent
*
event
)
;
void
wheelEvent
(
QWheelEvent
*
event
)
;
void
wheelEvent
(
QWheelEvent
*
event
)
;
void
keyPressEvent
(
QKeyEvent
*
event
)
;
private
:
private
:
Camera
*
cam
;
Camera
*
cam
;
...
...
QTProject/mainwindow.cpp
View file @
c6c99b52
...
@@ -52,7 +52,8 @@ MainWindow::MainWindow(QWidget *parent) :
...
@@ -52,7 +52,8 @@ MainWindow::MainWindow(QWidget *parent) :
this
->
setCentralWidget
(
m_centralWidget
);
this
->
setCentralWidget
(
m_centralWidget
);
m_centralWidget
->
setFocusPolicy
(
Qt
::
StrongFocus
);
m_centralWidget
->
setFocus
();
// showMaximized();
// showMaximized();
}
}
...
...
QTProject/subdivision.h
View file @
c6c99b52
...
@@ -80,9 +80,6 @@ private:
...
@@ -80,9 +80,6 @@ private:
*/
*/
bool
matchAndCompleteTriangleIndices
(
unsigned
int
sx
,
unsigned
int
sy
,
unsigned
int
sz
,
unsigned
int
tx
,
unsigned
int
ty
,
unsigned
int
&
tz
);
bool
matchAndCompleteTriangleIndices
(
unsigned
int
sx
,
unsigned
int
sy
,
unsigned
int
sz
,
unsigned
int
tx
,
unsigned
int
ty
,
unsigned
int
&
tz
);
//same as matchandcomplete. doesn't rely on only one index per vertex location
//needs indices to fill tz
/**
/**
* @brief matchAndCompleteTriangle if vertices at indices tx ty matches vertices at indices sxsy, sysz or szsy,
* @brief matchAndCompleteTriangle if vertices at indices tx ty matches vertices at indices sxsy, sysz or szsy,
* fill tz with third source vertex index.
* fill tz with third source vertex index.
...
...
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