コード例 #1
0
ファイル: Main.cs プロジェクト: norbish/MRSim
    void Load_Vis()
    {
        //Frames:
        Load_RobotVis(robot);
        Load_SensorModuleVis(robot);
        Load_SceneObjectsVis();

        //Scene:
        scene_vis = new Scene_Vis(scene.guid, AgxHelper(scene.vertices), scene.triangles, AgxHelper(scene.uvs), AgxHelper(scene.position), Resources.Load(terrainTexture) as Texture);
    }
コード例 #2
0
ファイル: settings.cs プロジェクト: norbish/dll_Test
    void Load_Vis()
    {
        //Frames:
        foreach (Module mod in robot.modules)
        {
            /* Mesh l = new Mesh() { vertices = mod.frames[0].meshVertices, uv = mod.frames[0].meshUvs, triangles = mod.frames[0].meshTriangles };
             * Mesh r = new Mesh() { vertices = mod.frames[1].meshVertices, uv = mod.frames[1].meshUvs, triangles = mod.frames[1].meshTriangles };*/
            ObjImporter import = new ObjImporter();
            Mesh        l      = import.ImportFile(dir + upperFrame_directory);//Should make variable: String upperDirectory = ...
            Mesh        r      = import.ImportFile(dir + bottomFrame_directory);

            frameVis.Add(new Frame_Vis(mod.frames[0].guid, l, Sim_CoreHelper(mod.frames[0].position), (float)mod.frames[0].scale));
            frameVis.Add(new Frame_Vis(mod.frames[1].guid, r, Sim_CoreHelper(mod.frames[1].position), (float)mod.frames[1].scale));
        }

        foreach (Sensory_Module mod in robot.sensorModules)
        {
            sensorVis.Add(new Sensor_Vis(mod.guid, Sim_CoreHelper(mod.position), Sim_CoreHelper(mod.size)));
        }

        //Scene:
        Scene_Vis scene_vis = new Scene_Vis(scene.guid, Sim_CoreHelper(scene.vertices), scene.triangles, Sim_CoreHelper(scene.uvs), Sim_CoreHelper(scene.position), Resources.Load("grass") as Texture);
    }