/// <summary> /// Formats the pointcloud with a given Format /// </summary> /// <param name="pointCloud">Point Cloud to be formatter</param> /// <returns>String representation of the formatted Point Cloud</returns> public String formatPointCloud(PointCloud pointCloud) { String header = getHeader(pointCloud.getSize()); String points = pointCloud.generateString(getPointFormat()); String result = header + points; if (format == Format.VRML) { result += getVRMLFooter(); } return(result); }
//Captures Point Cloud private void capturePointCloud(DepthFrame df, BodyIndexFrame bif) { CoordinateMapper coordinateMapper = sensor.getCoordinateMapper(); if (df != null && bif != null && coordinateMapper != null) { //Generate pointCloud using the frames. PointCloudGenerator pcg = new PointCloudGenerator(coordinateMapper); PointCloud pointCloud = pcg.generate(df, bif); Log.Write(Log.Tag.INFO, pointCloud.getSize()); saveFile(pointCloud); startNextWindow(); } else { Log.Write(Log.Tag.ERROR, "There was problem capturing the frames. Arrays containg FrameData or/and the CoordinateMapper are NULL"); } }