示例#1
0
    void Start()
    {
        //Instantiate other scripts
        createVis = new CreateVis();

        //get filename
        filename = Tracker.filename;

        //Set filename for correct questions
        //qt.setFilename(filename);

        //initialize questions
        check_qt();

        //read and get CSV values
        csv = new ReadCSV();
        List <List <object> > Data = csv.getList(filename);;

        //Create the Vis
        GameObject Vis = createVis.CreateChart(Data, MasterScale, spaceRatio, legoMode);

        //Final Transformations
        Transform stand = GameObject.Find("Stand").transform;

        Vis.transform.localScale    = new Vector3(MasterScale, MasterScale, MasterScale);
        Vis.transform.localPosition = new Vector3(-MasterScale / 2f, stand.localScale.y / 2f, -MasterScale / 2f); //magic numbers galore! place in center of VR space
        Vis.transform.parent        = stand;                                                                      //Attach to Pillar
    }
示例#2
0
    void Awake()
    {
        //Instantiate other scripts
        createVis = new CreateVis();

        //Set filename for correct questions
        //qt.setFilename(filename);

        //read and get CSV values
        csv = new ReadCSV();
        List <List <object> > Data = csv.getList(filename);;

        //Create the Vis
        GameObject Vis = createVis.CreateChart(Data, MasterScale, spaceRatio, true);

        //Final Transformations
        Vis.transform.localScale = new Vector3(MasterScale, MasterScale, MasterScale);
        Vis.transform.position   = new Vector3(0f, 0.01f, 0f);

        //Adjust labels
        GameObject countryLabels = GameObject.Find("Countries");

        countryLabels.transform.localRotation = Quaternion.Euler(90, 0, 0);
        countryLabels.transform.localPosition = new Vector3(0, -0.01f, 0);

        GameObject yearLabels = GameObject.Find("Years");

        yearLabels.transform.localRotation = Quaternion.Euler(0, 0, -90);
        yearLabels.transform.localPosition = new Vector3(0, -0.01f, 0);
    }
示例#3
0
    void MakeRoom()
    {
        //Create the Vis
        GameObject Vis = createVis.CreateChart(Data, MasterScale, spaceRatio, false);

        //Final Transformations
        Vis.transform.localScale = new Vector3(8f, 8f, 8f);
        Vis.transform.position   = new Vector3(0.5f, 0.01f, 1.2f);

        //Adjust labels
        GameObject countryLabels = GameObject.Find("Countries");

        countryLabels.transform.localRotation = Quaternion.Euler(90, 0, 0);
        countryLabels.transform.localPosition = new Vector3(0, 0.21f, 0);

        GameObject yearLabels = GameObject.Find("Years");

        yearLabels.transform.localRotation = Quaternion.Euler(0, 0, -90);
        yearLabels.transform.localPosition = new Vector3(0, 0.21f, 0);
    }
示例#4
0
    void Start()
    {
        //Instantiate other scripts
        createVis = new CreateVis();

        //get filename
        filename = Tracker.filename;

        //initialize questions
        check_qt();

        //read and get CSV values
        csv = new ReadCSV();
        List <List <object> > Data = csv.getList(filename);;

        //Create the Vis
        GameObject Vis = createVis.CreateChart(Data, MasterScale, spaceRatio, legoMode);

        //Final Transformations
        Vis.transform.localScale = new Vector3(MasterScale, MasterScale, MasterScale);
        Vis.transform.position   = (legoMode) ? Vis.transform.position : new Vector3(0.5f, 0.3f, 1.2f);
    }