예제 #1
0
        public RendererContext(int Width, int Height)
        {
            Size        = new Math.Vector2(Width, Height);
            Buffer      = new int[Width * Height];
            depthBuffer = new float[Width * Height];

            this.Width  = Width;
            this.Height = Height;

            CurrentContext = this;
        }
예제 #2
0
        private void rendererBox_MouseMove(object sender, MouseEventArgs e)
        {
            Math.Vector2 currentMouse = new Math.Vector2(e.X, e.Y);

            delta    = currentMouse - oldMouse;
            oldMouse = currentMouse;

            if (isMouse)
            {
                object3D.Rotate(new Math.Vector3(delta.Y, delta.X, 0));
            }
        }