예제 #1
0
        public TouchData Clone()
        {
            TouchData t = new TouchData();
            t.Id = this.Id;
            t.Pos = this.Pos;
            t.IsNew = this.IsNew;

            return t;
        }
예제 #2
0
        public TouchData Clone(float sizex,float sizey)
        {
            TouchData t = new TouchData();

            t.Id = this.Id;

            float x = (float)VMath.Map(this.Pos.X, 0, sizex, -1.0f, 1.0f, TMapMode.Float);
            float y = (float)VMath.Map(this.Pos.Y, 0, sizey, 1.0f, -1.0f, TMapMode.Float);

            t.Pos = new Vector2(x, y);
            t.IsNew = this.IsNew;

            return t;
        }
예제 #3
0
        public void Evaluate(int SpreadMax)
        {
            this.FData.SliceCount = SpreadMax;

            var buffer = this.FData.Stream.Buffer;

            for (int i = 0; i < SpreadMax; i++ )
            {
                TouchData td = new TouchData()
                {
                    Id = FId[i],
                    IsNew = FNew[i],
                    Pos = FPos[i]
                };
                FData[i] = td;
            }
        }
예제 #4
0
 private void OnTouchDownHandler(object sender, WMTouchEventArgs e)
 {
     lock (m_touchlock)
     {
         TouchData t = new TouchData();
         t.Id = e.Id;
         t.IsNew = true;
         t.Pos = new Vector2(e.LocationX, e.LocationY);
         this.touches.Add(e.Id, t);
     }
 }