-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add examples/basic/interaction_modes3.py
- Loading branch information
Showing
4 changed files
with
197 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Interaction mode to fly over a surface. | ||
- Press arrows to move the camera in the plane of the surface. | ||
- "t" and "g" will move the camera up and down along z. | ||
- "x" and "X" will reset the camera to the default position towards +/-x. | ||
- "y" and "Y" will reset the camera to the default position towards +/-y. | ||
- "r" will reset the camera to the default position.""" | ||
from vedo import * | ||
from vedo.interactor_modes import FlyOverSurface | ||
|
||
settings.enable_default_keyboard_callbacks = False | ||
settings.enable_default_mouse_callbacks = False | ||
|
||
surf = ParametricShape("RandomHills").cmap("Spectral") | ||
|
||
mode = FlyOverSurface() | ||
txt = Text2D(__doc__, c="k", font="Antares", s=0.8) | ||
|
||
plt = Plotter(size=(1200, 600)) | ||
plt.user_mode(mode) | ||
plt.show(surf, Axes(surf), txt, elevation=-90, zoom=2, axes=14) | ||
plt.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters