Skip to content

Instantly share code, notes, and snippets.

@kaorun55
Created April 18, 2016 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaorun55/566eb8f2037eed23cb110f5652f68d10 to your computer and use it in GitHub Desktop.
Save kaorun55/566eb8f2037eed23cb110f5652f68d10 to your computer and use it in GitHub Desktop.
// 点群の表示
{
gl.Begin( OpenGL.GL_POINTS );
foreach ( var point in kinect.PointCloud ) {
if ( (point.X == 0) && (point.Y == 0) && (point.Z == 0) ) {
continue;
}
Vector3 v = new Vector3( point.X, point.Y, point.Z );
if ( IsFloorClipPlane.IsChecked == true ) {
v = Vector3.Transform( v, matrix );
}
gl.Color( point.R, point.G, point.B );
gl.Vertex( v.X, v.Y, v.Z );
}
gl.End();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment