// Start is called before the first frame update
    void Start()
    {
        FileWriter.CreateResultsFile(filepath);

        enhancementScriptWolski = GetComponent <ContrastEnhancementWolski>() as ContrastEnhancementWolski;
        enhancementScriptWanat  = GetComponent <ContrastEnhancementWanat>() as ContrastEnhancementWanat;
        monoRendering           = GetComponent <MonoRendering>() as MonoRendering;
        uglyImage = GetComponent <UglyImage>() as UglyImage;

        CreateTrialGenerators();
        ResetInstructions();
        instructions[0].active = true;

        playerObject.transform.position = StartLocation.transform.position;
        playerObject.transform.rotation = StartLocation.transform.rotation;

        player = Valve.VR.InteractionSystem.Player.instance;

        Debug.Log(Animator.StringToHash(SystemInfo.deviceName));
        //observerId = Animator.StringToHash(SystemInfo.deviceName).ToString();

        nTrials = repetitions * locations.Count;
        //SetNextLocation(false);

        ChangeModeHint();
    }
 public Condition(string conditionName, int repetitions, EnhancemenVsMode enhancementMode, PreferenceMode preferenceMode, ContrastEnhancementWanat wanat, ContrastEnhancementWolski wolski, MonoRendering monoRendering, UglyImage uglyImage)
 {
     this.conditionName     = conditionName;
     this.repetitions       = repetitions;
     this.enhancementMode   = enhancementMode;
     this.preferenceMode    = preferenceMode;
     this.wanatEnhancement  = wanat;
     this.wolskiEnhancement = wolski;
     this.monoRendering     = monoRendering;
     this.uglyImage         = uglyImage;
 }
示例#3
0
        internal static MonoRendering GetMonoRendering(Graphics printerGraphics)
        {
            if (FMonoRendering == MonoRendering.Undefined)
            {
                GraphicsUnit savedUnit = printerGraphics.PageUnit;
                printerGraphics.PageUnit = GraphicsUnit.Point;

                string s  = "test string test string test string test string";
                float  f1 = printerGraphics.MeasureString(s, DefaultReportFont).Width;
                FMonoRendering = f1 > 200 ? MonoRendering.Pango : MonoRendering.Cairo;

                printerGraphics.PageUnit = savedUnit;
            }
            return(FMonoRendering);
        }