Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
masterarbeit-kai
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
0
Merge Requests
0
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
Philipp Adolf
masterarbeit-kai
Commits
e5d9244a
Commit
e5d9244a
authored
Jul 09, 2017
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
capturing FrameSourceTypes_Color
parent
2c11e009
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
main.cpp
3_PointCloud/main.cpp
+7
-3
No files found.
3_PointCloud/main.cpp
View file @
e5d9244a
...
...
@@ -194,20 +194,19 @@ void getKinectData() {
}
void
processCurrentFrameForExport
()
{
points
.
clear
();
colors
.
clear
();
points
.
reserve
(
points
.
size
()
+
width
*
height
);
colors
.
reserve
(
colors
.
size
()
+
width
*
height
*
3
);
for
(
unsigned
int
i
=
0
;
i
<
width
*
height
;
i
++
)
{
if
(
frameValidPoints
[
i
])
{
points
.
push_back
(
*
currentControlerPos
*
glm
::
vec4
(
framePositions
[
i
],
1.0
f
));
points
.
push_back
(
glm
::
vec3
(
*
currentControlerPos
*
glm
::
vec4
(
framePositions
[
i
],
1.0
f
)
));
colors
.
push_back
(
frameColors
[
i
*
3
]);
colors
.
push_back
(
frameColors
[
i
*
3
+
1
]);
colors
.
push_back
(
frameColors
[
i
*
3
+
2
]);
}
}
//update Buffers
if
(
points
.
size
()
==
0
)
return
;
glBindBuffer
(
GL_ARRAY_BUFFER
,
exportData
.
vboID
);
glBufferData
(
GL_ARRAY_BUFFER
,
points
.
size
()
*
sizeof
(
glm
::
vec3
),
&
points
[
0
],
GL_DYNAMIC_DRAW
);
...
...
@@ -318,6 +317,10 @@ void mainRenderLoop() {
glPointSize
(
1.
f
);
drawElementArray
(
framePoints
,
GL_POINTS
);
drawElementArray
(
exportData
,
GL_POINTS
);
drawElementArray
(
arrowData
,
GL_TRIANGLES
);
...
...
@@ -451,6 +454,7 @@ void setupFrameBuffer()
*
fcolor
++
=
(
unsigned
char
)(
1.0
*
i
/
width
*
255
);
*
fcolor
++
=
(
unsigned
char
)(
1.0
*
j
/
height
*
255
);
*
fcolor
++
=
0
;
frameValidPoints
[
i
+
width
*
j
]
=
true
;
}
}
...
...
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