/// <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_model = new AssimpScene(scenePath, sceneFileName); this.m_width = width; this.m_height = height; try { m_camera = new MyCamera(); } catch (Exception) { MessageBox.Show("Neuspesno kreirana instanca klase Camera", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error); } try { m_font = new BitmapFont("Times New Roman", 10, true, false, false, false); } catch (Exception) { MessageBox.Show("Neuspesno kreirana instanca OpenGL fonta", "GRESKA", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.Initialize(); // Korisnicka inicijalizacija OpenGL parametara this.Resize(); // Podesavanje projekcije i viewport-a }
/// <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(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 }