Inheritance: NodeWrapper
Exemplo n.º 1
0
 public StateChangedEvent(ProductionNode node, RegisterFunc reg, UnregisterFunc unreg)
 {
     this.node = node;
     this.reg = reg;
     this.unreg = unreg;
     this.internalHandler = new OpenNIImporter.XnStateChangedHandler(InternalHandler);
 }
Exemplo n.º 2
0
 private static IntPtr Create(Context context, CodecID codecID, ProductionNode initializer)
 {
     IntPtr nodeHandle;
     UInt32 status = OpenNIImporter.xnCreateCodec(context.InternalObject, codecID.InternalValue, initializer.InternalObject, out nodeHandle);
     WrapperUtils.CheckStatus(status);
     return nodeHandle;
 }
Exemplo n.º 3
0
 public UserPositionCapability(ProductionNode node)
     : base(node)
 {
     this.userPositionChanged = new StateChangedEvent(node,
         OpenNIImporter.xnRegisterToUserPositionChange,
         OpenNIImporter.xnUnregisterFromUserPositionChange);
 }
Exemplo n.º 4
0
 public CroppingCapability(ProductionNode node)
     : base(node)
 {
     this.croppingChanged = new StateChangedEvent(node,
         OpenNIImporter.xnRegisterToCroppingChange,
         OpenNIImporter.xnUnregisterFromCroppingChange);
 }
 public AlternativeViewPointCapability(ProductionNode node)
     : base(node)
 {
     this.viewPointChangedEvent = new StateChangedEvent(node,
         OpenNIImporter.xnRegisterToViewPointChange,
         OpenNIImporter.xnUnregisterFromViewPointChange);
 }
Exemplo n.º 6
0
 public MirrorCapability(ProductionNode node)
     : base(node)
 {
     this.mirrorChangedEvent = new StateChangedEvent(node,
         OpenNIImporter.xnRegisterToMirrorChange,
         OpenNIImporter.xnUnregisterFromMirrorChange);
 }
Exemplo n.º 7
0
 void skeletonCapability_CalibrationEnd(ProductionNode node, uint id, bool success)
 {
     if (success) {
         Debug.Log("Calibratoin ended successfully");
         skeletonCapability.StartTracking(id);
       	  	} else {
         poseDetectionCapability.StartPoseDetection(calibPose, id);
        	 	}
 }
Exemplo n.º 8
0
            return OpenNIImporter.xnIsJointAvailable(this.InternalObject, joint);
        }
        public bool IsProfileAvailable(SkeletonProfile profile)
        {
            return OpenNIImporter.xnIsProfileAvailable(this.InternalObject, profile);
        }

        public void SetSkeletonProfile(SkeletonProfile profile)
        {
            UInt32 status = OpenNIImporter.xnSetSkeletonProfile(this.InternalObject, profile);
Exemplo n.º 9
0
 void hands_HandCreate(ProductionNode node, uint id, ref Point3D position, float fTime)
 {
     Debug.Log ("hands_HandCreate(): Here");
     float x = position.X;
     float y = position.Y;
     float z = position.Z;
     Debug.Log ("hands_HandUpdate(): Position X: " + x + " Y: " + y + " Z: " + z);
     Vector3 pos = new Vector3(x * scale, y * scale, -z * scale);
     bias = pos;
 }
Exemplo n.º 10
0
 //--------------------------------
 void gestures_GestureRecognized(ProductionNode node, string strGesture, ref Point3D idPosition, ref Point3D endPosition)
 {
     Debug.Log ("gestures_GestureRecognized(): Here");
     switch (strGesture) {
     case "Wave":
         handsGenerator.StartTracking (ref idPosition);
         break;
     default:
         break;
     }
 }
Exemplo n.º 11
0
 void hands_HandUpdate(ProductionNode node, uint id, ref Point3D position, float fTime)
 {
     float x = position.X;
     float y = position.Y;
     float z = position.Z;
     //	Debug.Log ("hands_HandUpdate(): Position X: " + x + " Y: " + y + " Z: " + z);
     Vector3 pos = new Vector3(x * scale, y * scale, -z * scale);
     pos -= bias;
     //	if (pos.z > 0) pos.z = 0;
     hand.position = pos;
 }
Exemplo n.º 12
0
 void skeletonCapbility_CalibrationEnd(ProductionNode node, uint id, bool success)
 {
     if (success)
     {
         this.skeletonCapbility.StartTracking(id);
         this.joints.Add(id, new Dictionary<SkeletonJoint, SkeletonJointPosition>());
     }
     else
     {
         this.poseDetectionCapability.StartPoseDetection(calibPose, id);
     }
 }
Exemplo n.º 13
0
        public ProductionNode GetInstance()
        {
            IntPtr handle = OpenNIImporter.xnNodeInfoGetHandle(this.InternalObject);

            if (handle == IntPtr.Zero)
            {
                return(null);
            }
            else
            {
                return(ProductionNode.FromNative(handle));
            }
        }
Exemplo n.º 14
0
 void _handGenerator_HandCreate(ProductionNode node, uint id, ref xn.Point3D position, float fTime)
 {
     if (_startTime == 0)
     {
         _traceHistory = new SortedList<float, xn.Point3D>();
         _startTime = fTime;
         _traceHistory.Add(0, position);
         _id = id;
         System.Diagnostics.Debug.WriteLine("Hand created");
     }
     else
     {
         _handsGenerator.StopTracking(id);
     }
 }
Exemplo n.º 15
0
 void _handGenerator_HandUpdate(ProductionNode node, uint id, ref xn.Point3D position, float fTime)
 {
     if (id == _id)
     {
         float timeTracking = fTime - _startTime;
         _traceHistory.Add(timeTracking, position);
         CheckStatus();
         System.Diagnostics.Debug.WriteLine("Hand update for " + timeTracking);
     }
 }
Exemplo n.º 16
0
 private void UserGenerator_LostUser(ProductionNode node, uint id)
 {
     this.playersInOrderOfAppearance.Remove(id);
     this.OnMessage("Lost player with Id " + id);
     this.OnUserLost();
 }
Exemplo n.º 17
0
 void userGenerator_NewUser(ProductionNode node, uint id)
 {
     App.ViewModel.Status = "Waiting for pose...";
     App.ViewModel.User.UserId = id;
     this.poseDetectionCapability.StartPoseDetection(this.calibPose, id);
 }
Exemplo n.º 18
0
 public void AddNodeToRecording(ProductionNode node)
 {
     AddNodeToRecording(node, CodecID.Null);
 }
Exemplo n.º 19
0
 public UInt32 GetNumFrames(ProductionNode node)
 {
     return(GetNumFrames(node.GetName()));
 }
Exemplo n.º 20
0
 void skeletonCapbility_CalibrationEnd(ProductionNode node, uint id, bool success)
 {
     if (success)
     {
         App.ViewModel.Status = "Tracking user";
         this.skeletonCapbility.StartTracking(id);
         App.ViewModel.Tracking = true;
     }
     else
     {
         App.ViewModel.Status = "Waiting for pose...";
         this.poseDetectionCapability.StartPoseDetection(calibPose, id);
     }
 }
 public PoseDetectionCapability(ProductionNode node)
     : base(node)
 {
     this.internalPoseDetected = new OpenNIImporter.XnPoseDetectionCallback(this.InternalPoseDetected);
     this.internalPoseEnded    = new OpenNIImporter.XnPoseDetectionCallback(this.InternalPoseEnded);
 }
Exemplo n.º 22
0
 public void AddNodeToRecording(ProductionNode node)
 {
     AddNodeToRecording(node, CodecID.Null);
 }
        public void SetViewPoint(ProductionNode other)
        {
            UInt32 status = OpenNIImporter.xnSetViewPoint(this.InternalObject, other.InternalObject);

            WrapperUtils.CheckStatus(status);
        }
Exemplo n.º 24
0
 public UInt32 TellFrame(ProductionNode node)
 {
     return(TellFrame(node.GetName()));
 }
Exemplo n.º 25
0
        public void RemoveNeededNode(ProductionNode needed)
        {
            UInt32 status = OpenNIImporter.xnRemoveNeededNode(this.InternalObject, needed.InternalObject);

            WrapperUtils.CheckStatus(status);
        }
Exemplo n.º 26
0
        public void AddNodeToRecording(ProductionNode node, CodecID codec)
        {
            UInt32 status = OpenNIImporter.xnAddNodeToRecording(this.InternalObject, node.InternalObject, codec.InternalValue);

            WrapperUtils.CheckStatus(status);
        }
Exemplo n.º 27
0
 private void UserGenerator_NewUser(ProductionNode node, uint id)
 {
     this.playersInOrderOfAppearance.Add(id);
     this.OnMessage("New player detected and assigned Id " + id);
     this.OnUserFound();
 }
Exemplo n.º 28
0
        public void RemoveNodeFromRecording(ProductionNode node)
        {
            UInt32 status = OpenNIImporter.xnRemoveNodeFromRecording(this.InternalObject, node.InternalObject);

            WrapperUtils.CheckStatus(status);
        }
Exemplo n.º 29
0
 public void SeekToFrame(ProductionNode node, Int32 frameOffset, PlayerSeekOrigin origin)
 {
     SeekToFrame(node.GetName(), frameOffset, origin);
 }
Exemplo n.º 30
0
 private void UserGenerator_NewUser(ProductionNode node, uint id)
 {
 }
Exemplo n.º 31
0
 public Capability(ProductionNode node) :
     base(node.InternalObject, true)
 {
     this.node = node;
 }
Exemplo n.º 32
0
 void poseDetectionCapability_PoseDetected(ProductionNode node, string pose, uint id)
 {
     App.ViewModel.Status = "Pose detected";
     this.poseDetectionCapability.StopPoseDetection(id);
     this.skeletonCapbility.RequestCalibration(id, true);
 }
Exemplo n.º 33
0
 public Codec(Context context, CodecID codecID, ProductionNode initializer) :
     this(Create(context, codecID, initializer), false)
 {
 }
Exemplo n.º 34
0
 void userGenerator_LostUser(ProductionNode node, uint id)
 {
     App.ViewModel.Status = "Lost user.";
     App.ViewModel.Tracking = false;
     this.ResetPoints();
 }
        void skeletonCapbility_CalibrationEnd(ProductionNode node, uint id, bool success)
        {
            if (success)
            {
                this.skeletonCapbility.StartTracking(id);
                this.joints.Add(id, new Dictionary<SkeletonJoint, SkeletonJointPosition>());

                FMessage[0] = "Calibration ended for user " + id.ToString();
            }
            else
            {
                this.poseDetectionCapability.StartPoseDetection(calibPose, id);
                FMessage[0] = "Pose detection for user  " + id.ToString();
            }
        }
Exemplo n.º 36
0
 public void AddNodeToRecording(ProductionNode node, CodecID codec)
 {
     UInt32 status = OpenNIImporter.xnAddNodeToRecording(this.InternalObject, node.InternalObject, codec.InternalValue);
     WrapperUtils.CheckStatus(status);
 }
        void poseDetectionCapability_PoseDetected(ProductionNode node, string pose, uint id)
        {
            this.poseDetectionCapability.StopPoseDetection(id);
            this.skeletonCapbility.RequestCalibration(id, true);

            FMessage[0] = "Pose detected for user: " + id.ToString();
        }
Exemplo n.º 38
0
 public void RemoveNodeFromRecording(ProductionNode node)
 {
     UInt32 status = OpenNIImporter.xnRemoveNodeFromRecording(this.InternalObject, node.InternalObject);
     WrapperUtils.CheckStatus(status);
 }
        void userGenerator_NewUser(ProductionNode node, uint id)
        {
            this.poseDetectionCapability.StartPoseDetection(this.calibPose, id);

            FMessage[0] = "New user: " + id.ToString();
        }
Exemplo n.º 40
0
 void _handsGenerator_GenerationRunningChanged(ProductionNode node)
 {
 }
        void userGenerator_LostUser(ProductionNode node, uint id)
        {
            this.joints.Remove(id);

            FMessage[0] = "Lost user: " + id.ToString();
        }
Exemplo n.º 42
0
 void _handGenerator_HandDestroy(ProductionNode node, uint id, float fTime)
 {
     if (id == _id)
     {
         _traceHistory = null;
         _startTime = 0;
         _isTracking = false;
         HandDestroyed(this, EventArgs.Empty);
     }
     System.Diagnostics.Debug.WriteLine("Hand destroy");
 }
 public bool IsViewPointAs(ProductionNode other)
 {
     return(OpenNIImporter.xnIsViewPointAs(this.InternalObject, other.InternalObject));
 }