Difference between revisions 1339 and 1340 on hiwikiversity

{{कंप्यूटर ग्राफिक्स -- 2013-2014 -- info.uvt.ro/पेज हैडर}}

== डायरेक्टएक्स9 में संक्षिप्त परिचय ==
=== अवलोकन ===
इस प्रयोगशाला में हम डायरेक्टएक्स में सरल दृश्य के बनाने और इसे के अंदर कुछ तत्वों के साथ ड्रा के विषय में कुछ सामान्य मुद्दों पर चर्चा करेंगे। कोड सी# में लिखे जाएँगे। यह बारीकी से जावा जैसा दिखता हैं।

=== साधारण हैलो वर्ल्ड एप्लीकेशन बनाना ===

(contracted; show full)
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(true);
            
            HelloDirectX frm = new HelloDirectX();
            //
 Initialize the device.डिवाइस को प्रारंभ करें
            frm.Init();
            // Show the form.फॉर्म दिखाएं
            frm.Show();

            Application.run(frm);
        }

        public void Init()
        {
            [...]        
        }

        private void Render()
        {
            // Set the projection to be Perspective.प्रोजेक्शन को पर्सपेक्टिव में सेट करें
            device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI/4,
                    this.Width/this.Height, 1f, 50f);
            // Orient the camera.ओरिएंट कैमरा
            device.Transform.View = Matrix.LookAtLH(new Vector3(0,0,-30), new Vector3(0,0,0), 
                    new Vector3(0,1,0));
            // Reset the world matrix to Identity.
            device.Transform.World = Matrix.Identity;
            [...]        
        }

        // We need to override this method so that we can control what is being drawn on the screen.हमें इस पद्धति को ओवरराइड करने की आवश्यकता है ताकि हम स्क्रीन पर खींची गई चीज़ों को नियंत्रित कर सकें।
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            this.Render();
        }

        // Event handler for managing the device reset instance.डिवाइस रीसेट इनसेन्स को प्रबंधित करने के लिए ईवेंट हैंडलर
        public void OnResetDevice(object sender, EventArgs e)
        {
            [...]
        }
        [...]
    }
}
(contracted; show full)
        //हमें इस पद्धति को ओवरराइड करने की आवश्यकता है ताकि हम स्क्रीन पर खींची गई चीज़ों को नियंत्रित कर सकें।
        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            this.Render();
        }

        // 
Event handler for managing the device reset instance.डिवाइस रीसेट इनसेन्स को प्रबंधित करने के लिए ईवेंट हैंडलर
        public void OnResetDevice(object sender, EventArgs e)
        {
            [...]
        }
        [...]
    }
}
(contracted; show full)</source>

== लिंक ==
* [http://www.riemers.net/eng/Tutorials/DirectX/Csharp/series1.php प्रबंधित डायरेक्टएक्स9 ट्यूटोरियल]

[[Category:HI]]
[[Category:कंप्यूटर ग्राफिक्स]]
[[Category:ग्राफिक्स]]