Example #1
0
		public ModelRenderer(GraphicsDeviceControl parentControl)
		{
			_parentControl = parentControl;
			_ballController = new CameraController();

			parentControl.MouseWheelWpf += (sender, e) =>
			{
				_cameraPosition += _viewDirection * e.Delta * _modelRadius * 0.001f;
				parentControl.Invalidate();
			};

			_widgets = new ModelRendererWidget[4];
			_widgets[0] = new GridRenderer(parentControl);
			_widgets[1] = new CubeRenderer(parentControl, _ballController);

			_normalsRenderer = new NormalsRenderer(parentControl, this);
			_widgets[2] = _normalsRenderer;

			_bboxRenderer = new BoundingBoxRenderer(parentControl, this);
			_widgets[3] = _bboxRenderer;
		}
Example #2
0
        public ModelRenderer(GraphicsDeviceControl parentControl)
        {
            _parentControl  = parentControl;
            _ballController = new CameraController();

            parentControl.MouseWheelWpf += (sender, e) =>
            {
                _cameraPosition += _viewDirection * e.Delta * _modelRadius * 0.001f;
                parentControl.Invalidate();
            };

            _widgets    = new ModelRendererWidget[4];
            _widgets[0] = new GridRenderer(parentControl);
            _widgets[1] = new CubeRenderer(parentControl, _ballController);

            _normalsRenderer = new NormalsRenderer(parentControl, this);
            _widgets[2]      = _normalsRenderer;

            _bboxRenderer = new BoundingBoxRenderer(parentControl, this);
            _widgets[3]   = _bboxRenderer;
        }