public OpenGlWindow(int width, int height, string title, OpenGlVersion openGlVersion)
            : base(width,
            height,
            GraphicsMode.Default,
            title,
            GameWindowFlags.Default,
            DisplayDevice.Default,
            openGlVersion.Major,
            openGlVersion.Minor,
            GraphicsContextFlags.Default)
        {
            _mouseInputProcessor = new MouseInputProcessor(this, new GuiToRelativeCoordinateTransformer());

            var buttonUpEventEvaluator = new ButtonUpActionEvaluator(_mouseInputProcessor);
            _mouseInputObservable = new MouseInputObservable(buttonUpEventEvaluator);

            _keyboardInputObservable = new KeyboardInputObservable(_keyboardInputProcessor);

            _camera = new LookAtCamera();
            _lodCamera = new LookAtCamera();
        }
 public OpentkTrackballCameraControls(MouseInputProcessor mouseInputProcessor, ITrackballCamera trackballCamera)
 {
     _mouseInputProcessor = mouseInputProcessor;
     _trackballCamera = trackballCamera;
 }
 protected ButtonActionEvaluatorBase(MouseInputProcessor mouseInputProcessor)
 {
     MouseInputProcessor = mouseInputProcessor;
 }
 public ButtonChangedActionEvaluator(MouseInputProcessor mouseInputProcessor)
     : base(mouseInputProcessor)
 {
     ButtonEvaluator = Evaluator;
 }
 public ButtonChangedActionEvaluator(MouseInputProcessor mouseInputProcessor)
     : base(mouseInputProcessor)
 {
     ButtonEvaluator = Evaluator;
 }
 private bool Evaluator(MouseButton mouseButton)
 {
     return(MouseInputProcessor.WasButtonPressed(mouseButton) || MouseInputProcessor.WasButtonReleased(mouseButton));
 }
 public FreeCameraSystem(KeyboardInputProcessor keyboardInputProcessor, MouseInputProcessor mouseInputProcessor, ICamera camera)
 {
     _mouseInputProcessor = mouseInputProcessor;
     _camera = camera;
     _keyboardInputProcessor = keyboardInputProcessor;
 }
Beispiel #8
0
 protected ButtonActionEvaluatorBase(MouseInputProcessor mouseInputProcessor)
 {
     MouseInputProcessor = mouseInputProcessor;
 }