Gui: Refactor navigation animations

- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
This commit is contained in:
Rexbas
2023-04-30 19:26:27 +02:00
parent 6da62b83fa
commit dc216cde2a
15 changed files with 677 additions and 355 deletions

View File

@@ -32,7 +32,8 @@
<FCBool Name="ShowFPS" Value="0"/>
<FCBool Name="ShowNaviCube" Value="1"/>
<FCBool Name="ShowSelectionBoundingBox" Value="0"/>
<FCBool Name="UseAutoRotation" Value="0"/>
<FCBool Name="UseNavigationAnimations" Value="1"/>
<FCFloat Name="AnimationDuration" Value="0.25"/>
<FCBool Name="UseVBO" Value="0"/>
<FCFloat Name="ViewScalingFactor" Value="1.0"/>
<FCBool Name="ZoomAtCursor" Value="1"/>