Commit Graph

10 Commits

Author SHA1 Message Date
markus-bonk be58ab679b Fix coding style policy violations and CMake version.
Fix violations of 4.2.2 Function Definitions and 4.2.3 Control
Statements.
Set the minimum CMake version required to build to 3.1.
Removed the Visual Studio solution and project files.
2022-01-28 12:21:42 +00:00
markus-bonk aec7802fcf EDA_3D_VIEWER_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Full support for using a 3Dconnexion device in the 3D viewer has been added. Full 3D navigation is available for both the orthographic and perspective projections. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

ADDED: A build option KICAD_USE_3DCONNEXION (default = ON) has been added to the main CMakeLists.txt. The option controls whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk cd82a927c2 TRACK_BALL: Allow two input devices to simultaneously pan & rotate
Instead of the mouse pan and drag algorithms calculating the new
position or rotation values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or rotate the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
markus-bonk 27063688b3 CAMERA: Fix spelling of method MakeRayAtCurrrentMousePosition.
EDA_3D_CANVAS: Fix spelling of method getRayAtCurrrentMousePosition.
2022-01-28 12:21:42 +00:00
markus-bonk 5b9f56613e CAMERA: Make the CAMERA_FRUSTUM structure values for nw, nh, fw and fh consistent.
The CAMERA_FRUSTUM structure values for nw, nh, fw and fh to always mean width and height for both perspective and orthographic views instead of half-width and half-height in perspective.

The orthographic / perspective view toggle has been modified to keep the viewed plane at m_camera_pos_init * m_zoom the same dimensions in both projections.
2022-01-28 12:21:42 +00:00
Mikolaj Wielgus cf3a979711 3D Viewer: Fix zoom limit calculations
Fixes https://gitlab.com/kicad/code/kicad/issues/9407

Fixes https://gitlab.com/kicad/code/kicad/issues/8805
2021-10-24 18:14:49 +00:00
Mikolaj Wielgus afccea34a5 Remove default zoom level from camera constructor
Initial distance should be sufficient to determine default zoom.
2021-10-24 18:14:49 +00:00
Mikolaj Wielgus 996835826e Do not change FOV when zooming in/out, only move the camera
It's odd to both move the camera and change FOV when one wishes to
enlarge or smallen the models. Let's only move the camera.
2021-09-15 17:58:47 +00:00
Jeff Young 73b91a1a92 More sensible zoom defaults for 3D viewers.
Also fixes a bug where the model viewer in the file picker was using
only 1/4 of the screen on HIDPI displays.
2021-06-28 19:08:23 +01:00
Wayne Stambaugh 710e621c6a 3D Viewer: remove all instances of "c" prefix from file names. 2021-01-03 17:44:49 -05:00
Renamed from 3d-viewer/3d_rendering/ccamera.cpp (Browse further)