public static BVH_IO Record_Start(Body body, KinectSkeleton skel, string fileName, string path) { try { int initFrames = 10; BVH_IO bfhFile = new BVH_IO(fileName, path); if (bfhFile != null) { if (bfhFile.isRecording == true && bfhFile.isInitializing == true) { bfhFile.Entry(skel); //if (bfhFile.intializingCounter > initFrames) //{ bfhFile.startWritingEntry(); // } } if (bfhFile.isRecording == true && bfhFile.isInitializing == false) { bfhFile.WriteMotions(skel, body); //this.textBox_sensorStatus.Text = "Record"; //this.textBox_sensorStatus.BackColor = Color.Green; } } return(bfhFile); } catch (Exception err) { System.Windows.Forms.MessageBox.Show("Error in BVH_IO.Record_Start: " + err.Message); return(null); } }
public void RecordBVH() { if (this.bodies == null || this.bodies.Length == 0 || this.bodies[0] == null) { System.Windows.Forms.MessageBox.Show("No body data - please enable skeleton grabbing in Tools- Options"); return; } isRecording = true; BVHFile = BVH_IO.Record_Start(this.bodies[0], this.kinectSkeleton, "bvh", GLSettings.Path + GLSettings.PathPointClouds); }