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
3ac32607
Commit
3ac32607
authored
Aug 20, 2016
by
Philipp Adolf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Vertex into its own files
parent
a67450d5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
36 deletions
+53
-36
Subdivision.pro
QTProject/Subdivision.pro
+4
-2
mesh.cpp
QTProject/mesh.cpp
+0
-6
mesh.h
QTProject/mesh.h
+1
-28
vertex.cpp
QTProject/vertex.cpp
+19
-0
vertex.h
QTProject/vertex.h
+29
-0
No files found.
QTProject/Subdivision.pro
View file @
3ac32607
...
@@ -20,14 +20,16 @@ SOURCES += main.cpp\
...
@@ -20,14 +20,16 @@ SOURCES += main.cpp\
mesh
.
cpp
\
mesh
.
cpp
\
texture
.
cpp
\
texture
.
cpp
\
camera
.
cpp
\
camera
.
cpp
\
subdivision
.
cpp
subdivision
.
cpp
\
vertex
.
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
subdivision
.
h
\
vertex
.
h
FORMS
+=
FORMS
+=
...
...
QTProject/mesh.cpp
View file @
3ac32607
#include "mesh.h"
#include "mesh.h"
QDebug
operator
<<
(
QDebug
d
,
const
Vertex
&
v
)
{
d
.
nospace
()
<<
"Vertex("
<<
v
.
pos
<<
", "
<<
v
.
normal
<<
", "
<<
v
.
tex
<<
")"
;
d
.
space
();
return
d
;
}
Mesh
::
SubdivEntry
::
SubdivEntry
()
Mesh
::
SubdivEntry
::
SubdivEntry
()
{
{
VB_handle
=
0xFFFFFFFF
;
VB_handle
=
0xFFFFFFFF
;
...
...
QTProject/mesh.h
View file @
3ac32607
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <assimp/scene.h>
#include <assimp/scene.h>
#include <postprocess.h>
#include <postprocess.h>
#include "texture.h"
#include "texture.h"
#include "vertex.h"
#define positionIndex 0
#define positionIndex 0
#define normalIndex 1
#define normalIndex 1
...
@@ -16,34 +17,6 @@
...
@@ -16,34 +17,6 @@
#define EPSILON 0.00001
#define EPSILON 0.00001
struct
Vertex
{
QVector3D
pos
;
float
padding0
;
QVector3D
normal
;
float
padding1
;
QVector2D
tex
;
QVector2D
padding2
;
Vertex
(){}
Vertex
(
const
QVector3D
&
pos
,
const
QVector3D
&
normal
,
const
QVector2D
&
tex
)
{
this
->
pos
=
pos
;
this
->
tex
=
tex
;
this
->
normal
=
normal
;
}
bool
samePos
(
const
Vertex
&
other
)
const
{
return
pos
==
other
.
pos
;
}
};
QDebug
operator
<<
(
QDebug
d
,
const
Vertex
&
v
);
class
Mesh
class
Mesh
{
{
public
:
public
:
...
...
QTProject/vertex.cpp
0 → 100644
View file @
3ac32607
#include "vertex.h"
Vertex
::
Vertex
()
{}
Vertex
::
Vertex
(
const
QVector3D
&
pos
,
const
QVector3D
&
normal
,
const
QVector2D
&
tex
)
{
this
->
pos
=
pos
;
this
->
tex
=
tex
;
this
->
normal
=
normal
;
}
bool
Vertex
::
samePos
(
const
Vertex
&
other
)
const
{
return
pos
==
other
.
pos
;
}
QDebug
operator
<<
(
QDebug
d
,
const
Vertex
&
v
)
{
d
.
nospace
()
<<
"Vertex("
<<
v
.
pos
<<
", "
<<
v
.
normal
<<
", "
<<
v
.
tex
<<
")"
;
d
.
space
();
return
d
;
}
QTProject/vertex.h
0 → 100644
View file @
3ac32607
#pragma once
#ifndef VERTEX_H
#include <QDebug>
#include <QVector2D>
#include <QVector3D>
#pragma pack(push, 1)
struct
Vertex
{
QVector3D
pos
;
float
padding0
;
QVector3D
normal
;
float
padding1
;
QVector2D
tex
;
float
padding2
[
2
];
Vertex
();
Vertex
(
const
QVector3D
&
pos
,
const
QVector3D
&
normal
,
const
QVector2D
&
tex
);
bool
samePos
(
const
Vertex
&
other
)
const
;
};
#pragma pack(pop)
QDebug
operator
<<
(
QDebug
d
,
const
Vertex
&
v
);
#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