Exemplo n.º 1
0
        /// <summary>
        ///  Konstruktor klase World.
        /// </summary>
        public World(String scenePath, String sceneFileName, int width, int height)
        {
            this.m_scene  = new AssimpScene(scenePath, sceneFileName);
            this.m_width  = width;
            this.m_height = height;
            outFont       = new OutlineFont("Arial", 14.0f, 0.0f, false, false, true, false);
            m_textures    = new int[m_textureCount];
            this.Initialize();  // Korisnicka inicijalizacija OpenGL parametara

            this.Resize();      // Podesi projekciju i viewport
        }
Exemplo n.º 2
0
        /// <summary>
        ///  Konstruktor klase World.
        /// </summary>
        public World(String scenePath, String sceneFileName, int width, int height)
        {
            this.m_balloon = new AssimpScene2(scenePath, sceneFileName);
            this.m_hangar  = new Hangar(10.0f, 10.0f, 12.0f);
            this.m_terrain = new Terrain();
            //this.m_hangar = new Hangar(3.0f, 2.5f, 6.0f);
            this.m_width  = width;
            this.m_height = height;

            try
            {
                // TODO 4.0: Podsavanje fonta Courier New, 11pt, bold, italic
                m_font     = new OutlineFont("Courier New", 11, 0.02f, true, true, false, false);
                m_textures = new int[m_textureCount];
            }
            catch (Exception)
            {
                MessageBox.Show("Neuspesno kreirana instanca OpenGL fonta", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.Initialize();  // Korisnicka inicijalizacija OpenGL parametara

            this.Resize();      // Podesi projekciju i viewport
        }
Exemplo n.º 3
0
        /// <summary>
        ///  Konstruktor klase World.
        /// </summary>
        public World(String scenePath, String sceneFileName, int width, int height)
        {
            this.m_scene = new AssimpScene(scenePath, sceneFileName);
            this.m_width = width;
            this.m_height = height;  
            outFont = new OutlineFont("Arial",14.0f, 0.0f, false, false, true, false);
            m_textures = new int[m_textureCount];
            this.Initialize();  // Korisnicka inicijalizacija OpenGL parametara

            this.Resize();      // Podesi projekciju i viewport
        }
        /// <summary>
        ///  Konstruktor klase World.
        /// </summary>
        public World(String scenePath, String sceneFileName, int width, int height)
        {
            this.m_balloon = new AssimpScene2(scenePath, sceneFileName);
            this.m_hangar = new Hangar(10.0f, 10.0f, 12.0f);
            this.m_terrain = new Terrain();
            //this.m_hangar = new Hangar(3.0f, 2.5f, 6.0f);
            this.m_width = width;
            this.m_height = height;

            try
            {
                // TODO 4.0: Podsavanje fonta Courier New, 11pt, bold, italic
                m_font = new OutlineFont("Courier New", 11, 0.02f, true, true, false, false);
                m_textures = new int[m_textureCount];
            }
            catch (Exception)
            {
                MessageBox.Show("Neuspesno kreirana instanca OpenGL fonta", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.Initialize();  // Korisnicka inicijalizacija OpenGL parametara

            this.Resize();      // Podesi projekciju i viewport
        }
Exemplo n.º 5
0
        /// <summary>
        ///  Konstruktor klase World.
        /// </summary>
        public World(int width, int height)
        {
            tenkX = -50.0f;
            brodaScale = 4.0f;
            this.m_width = width;
            this.m_height = height;
            this.tenk = new AssimpScene(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "..\\..\\3D Models"), "M1_Abrams.3DS");
            this.brod = new AssimpScene(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "..\\..\\3D Models"), "Norfolk bship.3ds");
            this.box = new Box(2000,100.0, 10.0);
            this.box1 = new Box(215, 100.0, 10.0);
            this.projektil = new Box(10, 1, 1);
            m_font1 = new OutlineFont("Helvetica", 14, 0.0f, false, false, true, false);
            projektil_x = -5.0f;
            projektilStacX = -5.0f;
            ShipRotation_z = 0;
            ShipTranslate_y = 10.0f;
            AnimacijaEnable = false;

            try
            {
                m_camera = new RacunarskaGrafika.Vezbe.Camera();
            }
            catch (Exception)
            {
                MessageBox.Show("Neuspesno kreirana instanca klase Camera", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            try
            {
                m_textures = new int[m_textureCount];
            }
            catch (Exception)
            {
                MessageBox.Show("Neuspesno kreirana instanca OpenGL sveta", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            this.Initialize();  // Korisnicka inicijalizacija OpenGL parametara

            this.Resize();      // Podesi projekciju i viewport
        }