41 std::string
name =
"MRViewer";
127 void shutdown(
int exitCode = 0,
bool interruptible =
true )
const;
#define MR_MAKE_FLAG_OPERATORS(T)
Generates operators for a enum (at namespace scope).
Definition MRFlagOperators.h:6
GLFW-based mesh viewer.
Definition MRPythonViewer.h:104
void captureScreenShot(const std::string &path) const
Captures part of window (redraw 3d scene over UI (without redrawing UI))
void incrementForceRedrawFrames(int num=1, bool swapOnLastOnly=false) const
void mouseMove(int x, int y) const
void preciseFitDataViewport(ViewportMask vpList=ViewportMask::all(), const ViewportFitDataParams ¶ms={}) const
Viewport viewport(ViewportId viewportId={}) const
Vector2f getMousePos() const
Get the current mouse position.
void showSceneTree(bool show) const
Shows or hide scene tree.
void shutdown(int exitCode=0, bool interruptible=true) const
sets stop event loop flag (this flag is glfwShouldWindowClose equivalent); the viewer's launch then r...
void mouseUp(MouseButton button, KeyMod modifier=KeyMod::Empty) const
Simulate mouse up event.
void captureUIScreenShot(const std::string &path) const
Captures full window screenshot with UI.
void skipFrames(int frames) const
Vector3f viewportToScreen(const Vector3f &viewportPoint, ViewportId id) const
Convert viewport coordinates to to screen coordinates.
void mouseDown(MouseButton button, KeyMod modifier=KeyMod::Empty) const
Simulate mouse down event.
Definition MRPythonViewer.h:83
void cameraLookAlong(const Vector3f &dir, const Vector3f &up) const
void cameraRotateAround(const Line3f &axis, float angle) const
const ViewportId id
Definition MRPythonViewer.h:87
Vector3f projectToViewportSpace(const Vector3f &input) const
Project world space point to viewport coordinates (in pixels), (0,0) will be at the top-left corner o...
Viewport(ViewportId id)
Definition MRPythonViewer.h:85
Definition MRSetupViewer.h:16
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:42
static ViewportMask all()
mask meaning all or any viewports
Definition MRViewportId.h:49
@ angle
Direction, normally Vector3f.
Definition MRFeatureObject.h:26
Definition MRPythonScene.h:19
MouseButton
Definition MRPythonViewer.h:46
@ Right
Definition MRPythonViewer.h:48
@ Left
Definition MRPythonViewer.h:47
@ Middle
Definition MRPythonViewer.h:49
void launch(const ViewerLaunchParams ¶ms={}, const ViewerSetup &setup={})
void runFromGUIThread(const std::function< void()> &lambda)
Executes given function from GUI thread, and returns after it is done.
void shutViewerAtExit()
Registered with atexit by the module, and removed from it: closes the viewer the way a closed window ...
@ button
Definition MRPythonUiInteraction.h:15
KeyMod
Definition MRPythonViewer.h:53
@ Super
Definition MRPythonViewer.h:56
@ Ctrl
Definition MRPythonViewer.h:55
@ Shift
Definition MRPythonViewer.h:57
@ Alt
Definition MRPythonViewer.h:58
@ Empty
Definition MRPythonViewer.h:54
ViewerLaunchParamsMode
Definition MRPythonViewer.h:25
@ Show
Show window immediately.
Definition MRPythonViewer.h:26
@ Hide
Don't show window.
Definition MRPythonViewer.h:28
@ TryHidden
Launches in "Hide" mode if OpenGL is present and "NoWindow" if it is not.
Definition MRPythonViewer.h:29
@ NoWindow
Don't initialize GL window (don't call GL functions)(force isAnimating)
Definition MRPythonViewer.h:30
@ HideInit
Show window after init.
Definition MRPythonViewer.h:27
KeyMod getPrimaryCtrlKeyMod()
Returns the main control modifier of this platform: KeyMod.Super (Cmd) on macOS, KeyMod....
ViewportFitMode
Fit mode ( types of objects for which the fit is applied )
Definition MRPythonViewer.h:67
@ SelectedObjects
fit only selected objects
Definition MRPythonViewer.h:70
@ SelectedPrimitives
fit only selected primitives
Definition MRPythonViewer.h:69
@ Visible
fit all visible objects
Definition MRPythonViewer.h:68
This struct contains rules for viewer launch.
Definition MRPythonViewer.h:35
int animationMaxFps
max fps if animating
Definition MRPythonViewer.h:36
int height
Definition MRPythonViewer.h:39
std::string name
Window name.
Definition MRPythonViewer.h:41
bool isAnimating
if true - calls render without system events
Definition MRPythonViewer.h:40
int width
Definition MRPythonViewer.h:38
bool fullscreen
if true starts fullscreen
Definition MRPythonViewer.h:37
ViewerLaunchParamsMode windowMode
Definition MRPythonViewer.h:42
Definition MRPythonViewer.h:21
Definition MRPythonViewer.h:74
ViewportFitMode mode
fit mode
Definition MRPythonViewer.h:77
float factor
part of the screen for scene location
Definition MRPythonViewer.h:75
bool snapView
snapView - to snap camera angle to closest canonical quaternion
Definition MRPythonViewer.h:76