Beispiel #1
0
        public Form1()
        {
            InitializeComponent();

            Width  = 800;
            Height = 600;

            glControl               = new MyControl();
            glControl.Location      = new Point(Width / 4, Height / 4);
            glControl.Size          = new Size(Width / 2, Height / 2);
            glControl.OnPaintEvent += GlControl_OnPaintEvent;
            glControl.OnLoadEvent  += GlControl_OnLoadEvent;
            Controls.Add(glControl);
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();

            rayPoint     = new vec3(5, 4, 3);
            rayDirection = new vec3(0) - rayPoint;

            glControl               = new MyControl();
            glControl.Location      = new Point(Width / 4, Height / 4);
            glControl.Size          = new Size(Width / 2, Width / 2);
            glControl.OnPaintEvent += GlControl_OnPaintEvent;
            glControl.OnLoadEvent  += GlControl_OnLoadEvent;
            glControl.MouseDown    += GlControl_MouseDown;
            glControl.MouseUp      += GlControl_MouseUp;
            glControl.MouseMove    += GlControl_MouseMove;

            Controls.Add(glControl);
        }
Beispiel #3
0
        public Form1()
        {
            InitializeComponent();

            rayPoint     = new vec3(5, 4, 3);
            rayDirection = new vec3(0) - rayPoint;

            glControl               = new MyControl();
            glControl.Location      = new Point(Width / 4, Height / 4);
            glControl.Size          = new Size(Width / 2, Width / 2);
            glControl.OnPaintEvent += GlControl_OnPaintEvent;
            glControl.OnLoadEvent  += GlControl_OnLoadEvent;
            glControl.MouseDown    += GlControl_MouseDown;
            glControl.MouseUp      += GlControl_MouseUp;
            glControl.MouseMove    += GlControl_MouseMove;
            trackBar1.ValueChanged += trackBar1_Scroll;
            trackBar2.ValueChanged += trackBar2_Scroll;
            trackBar3.ValueChanged += trackBar3_Scroll;
            KeyPress += Form1_KeyPress;

            Controls.Add(glControl);
        }
Beispiel #4
0
        public Form1()
        {
            InitializeComponent();

            rayDirection = glm.normalize(new vec3(0) - rayPoint);

            glControl               = new MyControl();
            glControl.Location      = new Point(Width / 4, Height / 4);
            glControl.Size          = new Size(Width / 2, Height / 2);
            glControl.OnPaintEvent += GlControl_OnPaintEvent;
            glControl.OnLoadEvent  += GlControl_OnLoadEvent;
            glControl.MouseDown    += GlControl_MouseDown;
            glControl.MouseUp      += GlControl_MouseUp;
            glControl.MouseMove    += GlControl_MouseMove;
            LinkTrackBarWithLabel(trackBar1, planeDirXLabel);
            LinkTrackBarWithLabel(trackBar2, planeDirYLabel);
            LinkTrackBarWithLabel(trackBar3, planeDirZLabel);
            LinkTrackBarWithLabel(rayDirXTrackBar, rayDirXLabel);
            LinkTrackBarWithLabel(rayDirYTrackBar, rayDirYLabel);
            LinkTrackBarWithLabel(rayDirZTrackBar, rayDirZLabel);
            Controls.Add(glControl);
        }