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
c19a9d28
Commit
c19a9d28
authored
Sep 01, 2016
by
Alisa Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zoom in/out with - and + key
parent
14f6e020
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
mainwidget.cpp
QTProject/mainwidget.cpp
+10
-1
mainwidget.h
QTProject/mainwidget.h
+2
-0
mainwindow.cpp
QTProject/mainwindow.cpp
+1
-0
subdivision.h
QTProject/subdivision.h
+0
-3
No files found.
QTProject/mainwidget.cpp
View file @
c19a9d28
...
@@ -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 @
c19a9d28
...
@@ -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 @
c19a9d28
...
@@ -52,6 +52,7 @@ MainWindow::MainWindow(QWidget *parent) :
...
@@ -52,6 +52,7 @@ MainWindow::MainWindow(QWidget *parent) :
this
->
setCentralWidget
(
m_centralWidget
);
this
->
setCentralWidget
(
m_centralWidget
);
m_centralWidget
->
setFocusPolicy
(
Qt
::
StrongFocus
);
// showMaximized();
// showMaximized();
}
}
...
...
QTProject/subdivision.h
View file @
c19a9d28
...
@@ -79,9 +79,6 @@ private:
...
@@ -79,9 +79,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