Ejemplo n.º 1
0
        /// <summary>
        /// Constructor</summary>
        /// <param name="yFOV">Y field of view, in radians</param>
        /// <param name="nearZ">Near z plane constant</param>
        /// <param name="farZ">Far z plane constant</param>
        public CanvasControl3D(float yFOV, float nearZ, float farZ)
        {
            m_camera = new Camera();
            m_camera.SetPerspective(yFOV, 1.0f, nearZ, farZ);

            m_cameraController = new TrackBallCameraController();
            m_cameraController.Camera = m_camera;

            m_camera.CameraChanged += CameraChanged;
            Sphere3F sphere = new Sphere3F(new Vec3F(0, 0, 0), 25.0f);
            m_camera.ZoomOnSphere(sphere);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor</summary>
        /// <param name="yFOV">Y field of view, in radians</param>
        /// <param name="nearZ">Near z plane constant</param>
        /// <param name="farZ">Far z plane constant</param>
        public CanvasControl3D(float yFOV, float nearZ, float farZ)
        {
            m_camera = new Camera();
            m_camera.SetPerspective(yFOV, 1.0f, nearZ, farZ);

            m_cameraController        = new TrackBallCameraController();
            m_cameraController.Camera = m_camera;

            m_camera.CameraChanged += CameraChanged;
            Sphere3F sphere = new Sphere3F(new Vec3F(0, 0, 0), 25.0f);

            m_camera.ZoomOnSphere(sphere);
        }