Lagrange
Input.h
1/*
2 * Copyright 2020 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/ui/types/Keybinds.h>
15#include <Eigen/Eigen>
16
17namespace lagrange {
18namespace ui {
19
21{
22 std::shared_ptr<Keybinds> keybinds;
23
24 struct Mouse
25 {
27 Eigen::Vector2f position = Eigen::Vector2f(0, 0);
28
30 Eigen::Vector2f delta = Eigen::Vector2f(0, 0);
31
33 float wheel = 0.0f;
34
36 float wheel_horizontal = 0.0f;
37 } mouse;
38};
39
40} // namespace ui
41} // namespace lagrange
Lagrange UI Viewer and mini 3D engine.
Definition: AcceleratedPicking.h:22
Main namespace for Lagrange.
Definition: AABBIGL.h:30
Definition: Input.h:25
float wheel_horizontal
Horizontal wheel change during this frame.
Definition: Input.h:36
float wheel
Vertical wheel change during this frame.
Definition: Input.h:33
Eigen::Vector2f position
Position in pixels from top-left of the viewer window.
Definition: Input.h:27
Eigen::Vector2f delta
Change in mouse pixel position from last frame.
Definition: Input.h:30
Definition: Input.h:21