public void showRandHand()
    {
        AngleBasedHandModel result = createRandom();

        output.visualizeHand(result);
        Debug.Log("Comfort+Discomfort: " + (Discomfort.getDiscomfortAngled(result) + Comfort.getRRPComponent(result)));
    }
Exemple #2
0
 void saveData()
 {
     UserStudyData.instance.targetHand = targethand;
     UserStudyData.instance.angleDis   = Comfort.getRRPComponent(targethand);
     UserStudyData.instance.hyperDis   = Discomfort.getHyperExtensionComponent(targethand);
     UserStudyData.instance.yaxisDis   = Discomfort.getAbductionComponent(targethand);
     UserStudyData.instance.interDis   = Discomfort.getInterFingerComponent(targethand);
     UserStudyData.instance.discomfort = Discomfort.getDiscomfortAngled(targethand);
     UserStudyData.instance.palmangle  = targethand.getAvgMCPAngle() * 0;
     Debug.Log(targethand.getAvgMCPAngle() * 0);
 }
    public AngleBasedHandModel createRandom(float disc_min, float disc_max)
    {
        AngleBasedHandModel result;

        do
        {
            result = createRandom();
        }while (Discomfort.getDiscomfortAngled(result) + Comfort.getRRPComponent(result) < disc_min || Discomfort.getDiscomfortAngled(result) + Comfort.getRRPComponent(result) > disc_max);
        Debug.Log("Discomfort: " + Discomfort.getDiscomfortAngled(result) + ", Comfort: " + Comfort.getRRPComponent(result));
        return(result);
    }
    void saveResults()
    {
        File.AppendAllText(
            fileName,

            UserStudyData.instance.Name + endl +
            slider.value + endl +
            Discomfort.getDiscomfortAngled(targethand) + endl +
            Comfort.getRRPComponent(targethand) + endl +
            Discomfort.getInterFingerComponent(targethand) + endl +
            Discomfort.getAbductionComponent(targethand) + endl +
            Discomfort.getHyperExtensionComponent(targethand) + endl +
            Discomfort.getInterFingerCSV(targethand, endl) +
            Discomfort.getAbductionCSV(targethand, endl) +
            Discomfort.getHyperExtensionCSV(targethand, endl) +
            Comfort.getRRPCSV(targethand, endl) +
            targethand.ToCSVString(endl) + Environment.NewLine
            );
    }
    void saveResults()
    {
        File.AppendAllText(
            fileNameEnd,

            UserStudyData.instance.Name + endl +
            UserStudyData.instance.ComfortEvaluation + endl +
            timer + endl +
            timerTracking + endl +
            Discomfort.getDiscomfortAngled(UserStudyData.instance.targetHand) + endl +
            Comfort.getRRPComponent(UserStudyData.instance.targetHand) + endl +
            Discomfort.getInterFingerComponent(UserStudyData.instance.targetHand) + endl +
            Discomfort.getAbductionComponent(UserStudyData.instance.targetHand) + endl +
            Discomfort.getHyperExtensionComponent(UserStudyData.instance.targetHand) + endl +
            Discomfort.getInterFingerCSV(UserStudyData.instance.targetHand, endl) +
            Discomfort.getAbductionCSV(UserStudyData.instance.targetHand, endl) +
            Discomfort.getHyperExtensionCSV(UserStudyData.instance.targetHand, endl) +
            Comfort.getRRPCSV(UserStudyData.instance.targetHand, endl) +
            UserStudyData.instance.targetHand.ToCSVString(endl) + Environment.NewLine
            );
    }
Exemple #6
0
    IEnumerator getNewRandomHand()
    {
        generating = true;
        int counter = 0;

        Debug.Log(targetdiscomfort);
        do
        {
            uncomfortable = randHand.createRandom();
            yield return(new WaitForEndOfFrame());

            counter++;
            if (counter > 200)
            {
                counter           = 0;
                targetdiscomfort -= 25;
                Debug.Log(targetdiscomfort);
            }
        }while (Discomfort.getDiscomfortAngled(uncomfortable) + Comfort.getRRPComponent(uncomfortable) < targetdiscomfort || Discomfort.getDiscomfortAngled(uncomfortable) + Comfort.getRRPComponent(uncomfortable) > targetdiscomfort + 100);
        generating = false;
    }
    IEnumerator getNewRandomHand()
    {
        generating       = true;
        targetdiscomfort = UnityEngine.Random.Range(50, 1000);
        int counter = 0;

        Debug.Log(targetdiscomfort);
        do
        {
            targethand = randHand.createRandom();
            outputHand.visualizeHand(targethand);
            yield return(new WaitForEndOfFrame());

            counter++;
            if (counter > 200)
            {
                counter          = 0;
                targetdiscomfort = UnityEngine.Random.Range(50, 1000);
                Debug.Log(targetdiscomfort);
            }
        }while (Discomfort.getDiscomfortAngled(targethand) + Comfort.getRRPComponent(targethand) < targetdiscomfort || Discomfort.getDiscomfortAngled(targethand) + Comfort.getRRPComponent(targethand) > targetdiscomfort + 100);
        generating = false;
    }
 public float getDiscomfort()
 {
     return(Discomfort.getDiscomfortAngled(hand));
 }