TUIO.TuioContainer.getXSpeed C# (CSharp) Method

getXSpeed() public method

public getXSpeed ( ) : float
return float
        public float getXSpeed()
        {
            return x_speed;
        }

Usage Example

Example #1
0
 /**
  * Custom heightmap update
  *
  */
 public void update(TuioContainer tcon, float _x, float _y, int _width, int _height, List <float> _heightPoints)
 {
     base.update(tcon.getX(), tcon.getY());
     heightPoints = _heightPoints;
     width        = _width;
     height       = _height;
     hxPos        = _x;
     hyPos        = _y;
     x_speed      = tcon.getXSpeed();
     y_speed      = tcon.getYSpeed();
     motion_speed = (float)Math.Sqrt(x_speed * x_speed + y_speed * y_speed);
     motion_accel = tcon.getMotionAccel();
     path.Add(new TuioPoint(currentTime, xpos, ypos));
     if (motion_accel > 0)
     {
         state = TUIO_ACCELERATING;
     }
     else if (motion_accel < 0)
     {
         state = TUIO_DECELERATING;
     }
     else
     {
         state = TUIO_STOPPED;
     }
 }
All Usage Examples Of TUIO.TuioContainer::getXSpeed