Ejemplo n.º 1
0
        public float compareTo(Posture pos1, ref double[] result, double errorPuntual, double errorGeneral)
        {
            Vector3[] e1         = pos1.joints;
            Vector3[] e2         = this.joints;
            double    media      = 0;
            double    difPuntual = 0;
            double    mediaDif   = 0;

            result = new double[20];


            for (int j1 = 0; j1 < 20; j1++)
            {
                for (int j2 = (j1 + 1); j2 < 20; j2++)
                {
                    media += distancia(e1[j1], e1[j2]) / distancia(e2[j1], e2[j2]);
                }
            }
            media = media / 190;

            for (int j1 = 0; j1 < 20; j1++)
            {
                for (int j2 = (j1 + 1); j2 < 20; j2++)
                {
                    difPuntual = Math.Abs((distancia(e1[j1], e1[j2]) / distancia(e2[j1], e2[j2])) - media);
                    mediaDif  += difPuntual;
                    if (difPuntual > errorPuntual)
                    {
                        result[j1] += 0.05;
                        result[j2] += 0.05;
                    }
                }
            }

            Console.Write(" " + ((mediaDif / 190) / errorPuntual) + " \n");
            return(float.Parse("" + ((mediaDif / 190) / errorGeneral)));
        }
Ejemplo n.º 2
0
 public Posture(Skeleton skeleton) : this(Posture.castSkeletonToJoints(skeleton))
 {
 }
 public PostureInformation(string name, string description, int difficulty, Skeleton skeleton)
     : this(name, description, difficulty, Posture.castSkeletonToJoints(skeleton))
 {
 }