Ejemplo n.º 1
0
        public void buildObject()
        {
            GL.ClearColor(0.2f, 0.3f, 0.3f, 1.0f);

            meja.setStartPoint(0.0f, 0.0f, -0.25f);
            meja.setLength(0.03f);
            meja.createTubeVertices(0.8f, 0.8f);
            meja.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                             "C:/Users/Asus/source/repos/shader/shader_tumpuan.frag");
            meja.rotate(90.0f, 0.0f, 0.0f);

            balok1.setStartPoint(-0.5f, -0.27f, 0.0f);
            balok1.createBoxVertices(0.1f, 0.1f, 0.5f);
            balok1.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                               "C:/Users/Asus/source/repos/shader/pot.frag");

            balok2.setStartPoint(0.5f, -0.27f, 0.0f);
            balok2.createBoxVertices(0.1f, 0.1f, 0.5f);
            balok2.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                               "C:/Users/Asus/source/repos/shader/pot.frag");

            balok3.setStartPoint(0.0f, -0.27f, 0.5f);
            balok3.createBoxVertices(0.1f, 0.1f, 0.5f);
            balok3.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                               "C:/Users/Asus/source/repos/shader/pot.frag");

            balok4.setStartPoint(0.0f, -0.27f, -0.5f);
            balok4.createBoxVertices(0.1f, 0.1f, 0.5f);
            balok4.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                               "C:/Users/Asus/source/repos/shader/pot.frag");

            eliptic1.setStartPoint(-0.5f, 0.09f, 0.09f);
            eliptic1.createElipticParaboloidVertices(0.05f, 0.05f, 0.05f);
            eliptic1.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                                 "C:/Users/Asus/source/repos/shader/shader_tumpukecil.frag");
            eliptic1.rotate(270.0f, 0.0f, 10.0f);

            eliptic2.setStartPoint(0.5f, -0.09f, 0.09f);
            eliptic2.createElipticParaboloidVertices(0.05f, 0.05f, 0.05f);
            eliptic2.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                                 "C:/Users/Asus/source/repos/shader/shader_tumpukecil.frag");
            eliptic2.rotate(270.0f, 0.0f, 10.0f);

            eliptic3.setStartPoint(0.09f, 0.5f, 0.09f);
            eliptic3.createElipticParaboloidVertices(0.05f, 0.05f, 0.05f);
            eliptic3.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                                 "C:/Users/Asus/source/repos/shader/shader_tumpukecil.frag");
            eliptic3.rotate(270.0f, 0.0f, 10.0f);

            eliptic4.setStartPoint(-0.09f, -0.5f, 0.09f);
            eliptic4.createElipticParaboloidVertices(0.05f, 0.05f, 0.05f);
            eliptic4.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                                 "C:/Users/Asus/source/repos/shader/shader_tumpukecil.frag");
            eliptic4.rotate(270.0f, 0.0f, 10.0f);

            elip.setStartPoint(0.0f, 0.03f, 0.0f);
            elip.createEllipsVertices(0.7f, 0.1f, 0.1f);
            elip.setupObject("C:/Users/Asus/source/repos/shader/shader.vert",
                             "C:/Users/Asus/source/repos/shader/shader_tumpuan.frag");
        }
Ejemplo n.º 2
0
        public void buildObject()
        {
            tulang.setStartPoint(-0.5f, 0.2f, 0.0f);
            tulang.setLength(0.27f);
            tulang.createTubeVertices(0.07f, 0.07f);
            tulang.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                               "C:/Users/Asus/source/repos/shader/white.frag");

            daging.setStartPoint(-0.5f, 0.2f, 0.4f);
            daging.createEllipsVertices(0.3f, 0.3f, -0.12f);
            daging.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                               "C:/Users/Asus/source/repos/shader/daging.frag");

            tulangrawan1.setStartPoint(-0.55f, 0.2f, -0.4f);
            tulangrawan1.createEllipsVertices(0.09f, 0.09f, 0f);
            tulangrawan1.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                                     "C:/Users/Asus/source/repos/shader/white.frag");

            tulangrawan2.setStartPoint(-0.45f, 0.2f, -0.4f);
            tulangrawan2.createEllipsVertices(0.09f, 0.09f, 0f);
            tulangrawan2.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                                     "C:/Users/Asus/source/repos/shader/white.frag");

            tahu.setStartPoint(0.2f, 0.0f, 0.7f);
            tahu.createBoxVertices(0.2f, 0.3f, 0.1f);
            tahu.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                             "C:/Users/Asus/source/repos/shader/kuning.frag");

            kuning.setStartPoint(0.3f, 0f, 0f);
            kuning.createEllipsVertices(0.2f, 0.1f, 0.02f);
            kuning.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                               "C:/Users/Asus/source/repos/shader/kuning.frag");

            putih.setStartPoint(0.3f, 0f, 0f);
            putih.setLength(0.02f);
            putih.createTubeVertices(0.5f, 0.5f);
            putih.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                              "C:/Users/Asus/source/repos/shader/white.frag");
            putih.rotate(90f, 0f, 0f);

            asap.addPoint(-0.1f, 0f, 0f);
            asap.addPoint(0.3f, 0.2f, 0f);
            asap.addPoint(-0.5f, 0.4f, 0f);
            asap.addPoint(0.2f, 0.5f, 0f);
            asap.createbezierVertices();
            asap.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                             "C:/Users/Asus/source/repos/shader/grey.frag");
            asap.translate(0.1f, 0.3f, 0.3f);

            asap1.addPoint(-0.1f, 0f, 0f);
            asap1.addPoint(0.3f, 0.2f, 0f);
            asap1.addPoint(-0.5f, 0.4f, 0f);
            asap1.addPoint(0.2f, 0.53f, 0f);
            asap1.createbezierVertices();
            asap1.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                              "C:/Users/Asus/source/repos/shader/grey.frag");
            asap1.translate(0f, 0.3f, 0.3f);

            asap2.addPoint(-0.1f, 0f, 0f);
            asap2.addPoint(0.3f, 0.2f, 0f);
            asap2.addPoint(-0.5f, 0.4f, 0f);
            asap2.addPoint(0.2f, 0.56f, 0f);
            asap2.createbezierVertices();
            asap2.setupObject("C:/Users/Asus/source/repos/shader/trans.vert",
                              "C:/Users/Asus/source/repos/shader/grey.frag");
            asap2.translate(-0.1f, 0.3f, 0.3f);
        }