Skip to content

Instantly share code, notes, and snippets.

@harryhaaren
Created March 24, 2015 18:32
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 harryhaaren/8e85ee4d1663360f27b2 to your computer and use it in GitHub Desktop.
Save harryhaaren/8e85ee4d1663360f27b2 to your computer and use it in GitHub Desktop.
int points = 0;
for (int y = 10; y < h; y += step)
{
for (int x = 10; x < w; x += step)
{
if (kinect.getDistanceAt(x, y) > 0 && points < 10000 )
{
mesh.addColor(kinect.getColorAt(x, y));
mesh.addVertex(kinect.getWorldCoordinateAt(x, y));
points++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment