Exemplo n.º 1
0
        //Preprocess
        public static double[] Preprocess(List <Vector3> input, GConfig.Hand hand)
        {
            int count = input.Count;

            if (input.Count < GConfig.MaxPoint)
            {
                input = getSupplementVector(input);
            }


            input = EliminateVector(input);
            input = NormalizeVector(input);

            List <double> tmpList = new List <double>();

            tmpList.Add((int)hand);
            for (int i = 0; i < input.Count; ++i)
            {
                Vector3 p = input[i];
                tmpList.Add(p.x);
                tmpList.Add(p.y);
                tmpList.Add(p.z);
            }
            return(tmpList.ToArray());
        }
Exemplo n.º 2
0
        //게임 내부 - Send 요청 함수
        public void SendGesture(ref List <Vector3> point, GConfig.Hand hand)
        {
            lock (lockObject)
            {
                popFlag = false;

                if (CollectGestureData == true)
                {
                    raw_data.Clear();
                    for (int i = 0; i < point.Count; ++i)
                    {
                        raw_data.Add(point[i]);
                    }

                    _data = GUtil.ExportGesture(ref raw_data, hand);
                }
                else
                {
                    _data = GUtil.ExportGesture(ref point, hand);
                }



                flag = "send";
            }
        }
Exemplo n.º 3
0
 //Gesture Data - Export
 public static byte[] ExportGesture(ref List <Vector3> point, GConfig.Hand hand)
 {
     double[] v    = Preprocess(point, hand);
     byte[]   data = GUtil.ConvertToBytes(v);
     return(data);
 }