Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mesh.clear();
- mesh.setMode(OF_TRIANGLES_MODE);
- for(int j = 0; j < kh; j += pointStep) {
- for(int i = 0; i < kw; i += pointStep) {
- ofVec3f cur = kinect.getWorldCoordinateFor(i, j);
- if(cur.z >= nearThreshold && cur.z <= farThreshold) {
- mesh.addVertex(cur);
- mesh.addColor(pointColor.a > 0.5 ? pointColor : kinect.getCalibratedColorAt(i, j) * 1.0f/255.0f);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement