예제 #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
파일: Three.cs 프로젝트: antimelee/Lego-VR
    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);
    }