Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / C#

Space and Matrix Transformations - Building a 3D Engine

Rate me:
Please Sign up or sign in to vote.
4.84/5 (13 votes)
4 Sep 2009CPOL8 min read 94.8K   6.1K   101  
This Article Describes How to Navigate 3D Space
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using AGE_Engine3D;

namespace Test01_Triangles
{
    public partial class TestForm : Form
    {
        private double TimerInterval = 16;

        private System.Timers.Timer RenderTimer = null;

        public BaseSimulation TheSimulation
        {
            set { this.openGLControl1.LoadSimulation(value); }
        }
        public TestForm()
        {
            InitializeComponent();
        }

        private void TestForm_Load(object sender, EventArgs e)
        {
            RenderTimer = new System.Timers.Timer(this.TimerInterval);
            RenderTimer.Elapsed += new System.Timers.ElapsedEventHandler(RenderTimer_Elapsed);
            RenderTimer.Start();
        }

        void RenderTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
                this.openGLControl1.Invalidate();
        }

        private void TestForm_Activated(object sender, EventArgs e)
        {
            this.openGLControl1.Activated();
        }

        private void TestForm_Deactivate(object sender, EventArgs e)
        {
            this.openGLControl1.Deactivate();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer Lea+Elliott, Inc.
United States United States
I am a licensed Electrical Engineer at Lea+Elliott, Inc. We specialize in the planning, procurement and implementation of transportation systems, with special emphasis on automated and emerging technologies.

Comments and Discussions