none
Scaleto extention problem RRS feed

  • Question

  • if (currentSkeleton != null)                {                                       
                            Joint jointRight = currentSkeleton.Joints[JointType.HandRight];                  
                            Joint jointLeft = currentSkeleton.Joints[JointType.HandLeft];                    

                            Joint scaledRight = jointRight.ScaleTo((int)SystemParameters.PrimaryScreenWidth, (int)SystemParameters.PrimaryScreenHeight, SkeletonMaxX, SkeletonMaxY);                   
                            Joint scaledLeft = jointLeft.ScaleTo((int)SystemParameters.PrimaryScreenWidth, (int)SystemParameters.PrimaryScreenHeight, SkeletonMaxX, SkeletonMaxY);                                        
                 
                            int cursorX, cursorY;                   
                            cursorX = (int)scaledRight.Position.X;                   
                            cursorY = (int)scaledRight.Position.Y;                    
                            bool leftClick;   

    i am trying to use the current right hand position to move the cursor.

    however there are 2 errors which are all about the ScaleTo method.HINT : "microsoft.kinect.joint" does not contain the a denfinition of "ScaleTo"there is no extention method in the file...... i have added the Coding4Fun referrence can anyone tell me what happened?

    Friday, June 15, 2012 3:30 AM

All replies

  • Hi ...

     

    I have the same problem here ...

     

    error in this code:

    Dim scaledJoint = joint.ScaleTo(ScreenMaxX, ScreenMaxY, 0.5F, 0.2F)

     

     

    Thursday, April 18, 2013 12:20 AM
  • Have you added this line in your source file?

    using Coding4Fun.Kinect.Wpf;


    John | Kinect for Windows development team

    Thursday, April 18, 2013 5:32 PM
  • I have tried

    Microsoft.Kinect.Joint

    and it works but still I have another problem which is :

    MainWindow.xaml.vb is Ambiguous

    Thursday, April 18, 2013 8:46 PM