Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MasterArbeit
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
MasterArbeit
Commits
d5c9509f
Commit
d5c9509f
authored
Jul 03, 2017
by
wester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blafu
parent
872479cc
Pipeline
#246
passed with stage
in 21 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
8 deletions
+17
-8
KinectTutorial3.vcxproj
3_PointCloud/KinectTutorial3.vcxproj
+2
-2
example.pnts
3_PointCloud/example.pnts
+0
-0
main.cpp
3_PointCloud/main.cpp
+15
-6
Zwischen.pptx
Zwischen.pptx
+0
-0
No files found.
3_PointCloud/KinectTutorial3.vcxproj
View file @
d5c9509f
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<WarningLevel>
Level3
</WarningLevel>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<Optimization>
Disabled
</Optimization>
<Optimization>
Disabled
</Optimization>
<AdditionalIncludeDirectories>
D:\Dropbox\Studium\MasterArbeit\3_PointCloud\glm;..\openvr\headers;glew-2.0.0-win32\glew-2.0.0\include;freeglut-MSVC-3.0.0-2.mp\freeglut\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>
H:\Repositories\MasterArbeit\3_PointCloud\glm;
D:\Dropbox\Studium\MasterArbeit\3_PointCloud\glm;..\openvr\headers;glew-2.0.0-win32\glew-2.0.0\include;freeglut-MSVC-3.0.0-2.mp\freeglut\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
</ClCompile>
<Link>
<Link>
<TargetMachine>
MachineX86
</TargetMachine>
<TargetMachine>
MachineX86
</TargetMachine>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
<RuntimeLibrary>
MultiThreadedDLL
</RuntimeLibrary>
<RuntimeLibrary>
MultiThreadedDLL
</RuntimeLibrary>
<WarningLevel>
Level3
</WarningLevel>
<WarningLevel>
Level3
</WarningLevel>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<AdditionalIncludeDirectories>
glew-2.0.0-win32\glew-2.0.0\include;SDL-devel-1.2.15-VC\SDL-1.2.15\include;freeglut-MSVC-3.0.0-2.mp\freeglut\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>
H:\Repositories\MasterArbeit\3_PointCloud\glm;
glew-2.0.0-win32\glew-2.0.0\include;SDL-devel-1.2.15-VC\SDL-1.2.15\include;freeglut-MSVC-3.0.0-2.mp\freeglut\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
</ClCompile>
<Link>
<Link>
<TargetMachine>
MachineX86
</TargetMachine>
<TargetMachine>
MachineX86
</TargetMachine>
...
...
3_PointCloud/example.pnts
View file @
d5c9509f
No preview for this file type
3_PointCloud/main.cpp
View file @
d5c9509f
...
@@ -189,13 +189,17 @@ void getKinectData(bool writeFrameInVector) {
...
@@ -189,13 +189,17 @@ void getKinectData(bool writeFrameInVector) {
//get controler pos
//get controler pos
//frame -> global
//frame -> global
points
.
clear
();
colors
.
clear
();
points
.
reserve
(
points
.
capacity
()
+
width
*
height
);
points
.
reserve
(
points
.
capacity
()
+
width
*
height
);
colors
.
reserve
(
colors
.
capacity
()
+
width
*
height
);
colors
.
reserve
(
colors
.
capacity
()
+
width
*
height
*
3
);
for
(
int
i
=
0
;
i
<
width
*
height
;
i
++
)
{
for
(
int
i
=
0
;
i
<
snapshotPoints
.
size
()
;
i
++
)
{
points
.
push_back
(
*
currentControlerPos
*
framePositions
[
i
]);
points
.
push_back
(
*
currentControlerPos
*
snapshotPoints
[
i
]);
colors
.
push_back
(
snapshotColors
[
i
]);
colors
.
push_back
(
snapshotColors
[
i
*
3
]);
colors
.
push_back
(
snapshotColors
[
i
*
3
+
1
]);
colors
.
push_back
(
snapshotColors
[
i
*
3
+
2
]);
}
}
...
@@ -215,7 +219,10 @@ void getKinectData(bool writeFrameInVector) {
...
@@ -215,7 +219,10 @@ void getKinectData(bool writeFrameInVector) {
}
}
void
writePointCloud
()
{
void
writePointCloud
()
{
if
(
points
.
size
()
==
0
)
return
;
if
(
points
.
size
()
==
0
)
{
std
::
cout
<<
"No points, scipping File write"
<<
std
::
endl
;
return
;
}
pntsHeader
header
;
pntsHeader
header
;
size_t
pointArrayByteSize
=
points
.
size
()
*
sizeof
(
glm
::
vec3
);
size_t
pointArrayByteSize
=
points
.
size
()
*
sizeof
(
glm
::
vec3
);
...
@@ -248,7 +255,7 @@ void rotateCamera() {
...
@@ -248,7 +255,7 @@ void rotateCamera() {
double
x
=
radius
*
sin
(
angle
);
double
x
=
radius
*
sin
(
angle
);
double
z
=
radius
*
(
1
-
cos
(
angle
))
-
radius
/
2
;
double
z
=
radius
*
(
1
-
cos
(
angle
))
-
radius
/
2
;
//
gluLookAt(x,0,z,0,0,radius/2,0,1,0);
gluLookAt
(
x
,
0
,
z
,
0
,
0
,
radius
/
2
,
0
,
1
,
0
);
angle
+=
0.002
;
angle
+=
0.002
;
}
}
...
@@ -298,9 +305,11 @@ void keyPressed(unsigned char key, int x, int y)
...
@@ -298,9 +305,11 @@ void keyPressed(unsigned char key, int x, int y)
{
{
switch
(
key
)
{
switch
(
key
)
{
case
'a'
:
case
'a'
:
std
::
cout
<<
"Caturing Frame"
<<
std
::
endl
;
captureFrame
=
true
;
captureFrame
=
true
;
break
;
break
;
case
's'
:
case
's'
:
std
::
cout
<<
"writing File"
<<
std
::
endl
;
writeFile
=
true
;
writeFile
=
true
;
break
;
break
;
default:
default:
...
...
Zwischen.pptx
View file @
d5c9509f
No preview for this file type
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