private IJointFrameParameter GetJointFrameParameter(MovingJoint joint, DateTime timeStamp) { // RBakerFlag -> For now, default to this. TimeSpan timeSpan = GetTimeSpanSinceLastCapture(timeStamp); // AngularVelocityJointFrameParameter parameter = new AngularVelocityJointFrameParameter(joint, timeSpan); AngularDisplacementJointFrameParameter parameter = new AngularDisplacementJointFrameParameter(joint, previousMovingJoint, timeSpan); return(parameter); }
private void jointController_JointTrackingCaptured(MovingJoint joint, DateTime timeStamp) { if (frameCount % framesFrequencyFilter == 0) { frameCount = 1; AlertJoints(joint, timeStamp); } else { frameCount += 1; } }
private void AlertJoints(MovingJoint joint, DateTime timeStamp) { IJointFrameParameter parameter = GetJointFrameParameter(joint, timeStamp); previousMovingJoint = joint; previousTimeStamp = timeStamp; Joints jointsToAlert = joints.GetJointsOfType(joint.JointType); foreach (Joint jointToAlert in jointsToAlert) { jointToAlert.JointTrackingFrameCaptured(parameter); } }
public void UpdateJointBendAngle(MovingJoint joint, DateTime timeStamp) { if (this.InvokeRequired) { UpdateBendAngleEventHandler d = new UpdateBendAngleEventHandler(UpdateJointBendAngle); this.Invoke(d, new object[] { joint, timeStamp }); } else { //jointTrackingUpdateTextBox.BeginUpdate(); jointTrackingUpdateTextBox.Text = joint.BendAngle.ToString(); //jointTrackingUpdateTextBox.EndUpdate(); } }
public AngularDisplacementJointFrameParameter(MovingJoint thisMovingJoint, MovingJoint previousMovingJoint, TimeSpan timeSpan) { this.movingJoint = thisMovingJoint; this.timeSpan = timeSpan; this.bendAngle = previousMovingJoint == null ? thisMovingJoint.BendAngle : thisMovingJoint.BendAngle - previousMovingJoint.BendAngle; }
public AngularVelocityJointFrameParameter(MovingJoint movingJoint, TimeSpan timeSpan) { this.movingJoint = movingJoint; this.timeSpan = timeSpan; }