|
| virtual MRVIEWER_API void | init (MR::Viewer *_viewer) override |
| | This function is called when the viewer is initialized (no mesh will be loaded at this stage)
|
| |
| virtual MRVIEWER_API void | initBackend () |
| | inits glfw and glsl backend
|
| |
| virtual MRVIEWER_API void | startFrame () |
| | call this to validate imgui context in the begining of the frame
|
| |
| virtual MRVIEWER_API void | finishFrame () |
| | call this to draw valid imgui context at the end of the frame
|
| |
| virtual MRVIEWER_API void | load_font (int font_size=13) |
| |
| virtual MRVIEWER_API void | reload_font (int font_size=13) |
| |
| virtual MRVIEWER_API void | shutdown () override |
| | This function is called before shutdown.
|
| |
| virtual MRVIEWER_API void | draw_menu () |
| | Draw menu.
|
| |
| MRVIEWER_API void | draw_helpers () |
| |
| virtual MRVIEWER_API void | draw_viewer_window () |
| | Can be overwritten by callback_draw_viewer_window
|
| |
| virtual void | draw_custom_window () |
| | Can be overwritten by callback_draw_custom_window
|
| |
| void | draw_labels_window () |
| |
| MRVIEWER_API void | draw_text (const Viewport &viewport, const Vector3f &pos, const Vector3f &normal, const std::string &text, const Color &color, bool clipByViewport) |
| |
| MRVIEWER_API float | pixel_ratio () |
| |
| MRVIEWER_API float | hidpi_scaling () |
| |
| MRVIEWER_API float | menu_scaling () const |
| |
| float | getUserScaling () const |
| | returns UI scaling modifier specified by user
|
| |
| MRVIEWER_API void | setUserScaling (float scaling) |
| | sets UI scaling modifier specified by user
|
| |
| MRVIEWER_API ImGuiContext * | getCurrentContext () const |
| |
| ImGuiWindow * | getLastFocusedPlugin () const |
| |
| virtual MRVIEWER_API void | showModalMessage (const std::string &msg, NotificationType msgType) |
| | opens Error / Warning / Info modal window with message text
|
| |
| virtual MRVIEWER_API std::filesystem::path | getMenuFontPath () const |
| |
| MRVIEWER_API void | setDrawTimeMillisecThreshold (long long maxGoodTimeMillisec) |
| | setup maximum good time for frame rendering (if rendering is slower it will become red in statistics window)
|
| |
| MRVIEWER_API void | draw_scene_list () |
| | Draw scene list window with content.
|
| |
| MRVIEWER_API void | draw_scene_list_content (const std::vector< std::shared_ptr< Object > > &selected, const std::vector< std::shared_ptr< Object > > &all) |
| | Draw scene list content only.
|
| |
| virtual MRVIEWER_API void | draw_selection_properties (const std::vector< std::shared_ptr< Object > > &selected) |
| |
| virtual MRVIEWER_API void | draw_selection_properties_content (const std::vector< std::shared_ptr< Object > > &selected) |
| |
| virtual MRVIEWER_API bool | drawCollapsingHeader_ (const char *label, ImGuiTreeNodeFlags flags=0) |
| | override this to have custom UI in "Selection Properties" window (under "Draw Options")
|
| |
| virtual MRVIEWER_API bool | drawCollapsingHeaderTransform_ () |
| | override this to customize appearance of collapsing headers for transform block
|
| |
| bool | make_visualize_checkbox (std::vector< std::shared_ptr< VisualObject > > selectedVisualObjs, const char *label, AnyVisualizeMaskEnum type, MR::ViewportMask viewportid, bool invert=false) |
| |
| template<typename ObjectT > |
| void | make_color_selector (std::vector< std::shared_ptr< ObjectT > > selectedVisualObjs, const char *label, std::function< Vector4f(const ObjectT *)> getter, std::function< void(ObjectT *, const Vector4f &)> setter) |
| |
| template<typename ObjType , typename ValueT > |
| void | make_width (std::vector< std::shared_ptr< VisualObject > > selectedVisualObjs, const char *label, std::function< ValueT(const ObjType *)> getter, std::function< void(ObjType *, const ValueT &)> setter) |
| |
| void | make_light_strength (std::vector< std::shared_ptr< VisualObject > > selectedVisualObjs, const char *label, std::function< float(const VisualObject *)> getter, std::function< void(VisualObject *, const float &)> setter) |
| |
| template<typename T , typename ObjectType > |
| void | make_slider (std::vector< std::shared_ptr< ObjectType > > selectedVisualObjs, const char *label, std::function< T(const ObjectType *)> getter, std::function< void(ObjectType *, T)> setter, T min, T max) |
| |
| void | make_points_discretization (std::vector< std::shared_ptr< VisualObject > > selectedVisualObjs, const char *label, std::function< int(const ObjectPointsHolder *)> getter, std::function< void(ObjectPointsHolder *, const int &)> setter) |
| |
| std::shared_ptr< ShortcutManager > | getShortcutManager () |
| |
| MRVIEWER_API void | add_modifier (std::shared_ptr< MR::MeshModifier > modifier) |
| |
| MRVIEWER_API void | allowSceneReorder (bool allow) |
| |
| bool | checkPossibilityObjectRemoval () |
| |
| MRVIEWER_API void | allowObjectsRemoval (bool allow) |
| |
| MRVIEWER_API void | tryRenameSelectedObject () |
| |
| MRVIEWER_API void | setObjectTreeState (const Object *obj, bool open) |
| |
| MRVIEWER_API void | expandObjectTreeAndScroll (const Object *obj) |
| | expands all objs parents in tree and scroll scene tree window so selection becomes visible
|
| |
| MRVIEWER_API void | setShowShortcuts (bool val) |
| | set show shortcuts state (enable / disable)
|
| |
| MRVIEWER_API bool | getShowShortcuts () const |
| | return show shortcuts state (enable / disable)
|
| |
| void | enableSavedDialogPositions (bool on) |
| | enables using of saved positions of plugin windows in the config file
|
| |
| bool | isSavedDialogPositionsEnabled () const |
| | returns true if enabled using of saved positions of plugin windows in the config file, false otherwise
|
| |
| virtual MRVIEWER_API UiRenderManager & | getUiRenderManager () |
| | This class helps the viewer to renderUi() from IRenderObjects.
|
| |
| MRVIEWER_API const std::shared_ptr< SceneObjectsListDrawer > & | getSceneObjectsList () |
| |
| MRVIEWER_API bool | simulateNameTagClick (Object &object, NameTagSelectionMode mode) |
| | Behaves as if the user clicked the object name tag, by invoking nameTagClickSignal.
|
| |
| MRVIEWER_API bool | simulateNameTagClickWithKeyboardModifiers (Object &object) |
| | This version uses the currently held keyboard modifiers instead of a custom mode.
|
| |
| MRVIEWER_API bool | anyImGuiWindowIsHovered () const |
| | Scene pick should be disabled because an ImGui window is in the way.
|
| |
| MRVIEWER_API bool | anyUiObjectIsHovered () const |
| | Scene pick should be disabled because a renderUi() UI of some object is in the way.
|
| |
| MRVIEWER_API SelectedTypesMask | calcSelectedTypesMask (const std::vector< std::shared_ptr< Object > > &selectedObjs) |
| |
| MRVIEWER_API bool | drawGeneralOptions (const std::vector< std::shared_ptr< Object > > &selectedObjs) |
| |
| MRVIEWER_API bool | drawAdvancedOptions (const std::vector< std::shared_ptr< VisualObject > > &selectedObjs, SelectedTypesMask selectedMask) |
| |
| MRVIEWER_API bool | drawRemoveButton (const std::vector< std::shared_ptr< Object > > &selectedObjs) |
| |
| MRVIEWER_API bool | drawDrawOptionsCheckboxes (const std::vector< std::shared_ptr< VisualObject > > &selectedObjs, SelectedTypesMask selectedMask) |
| |
| MRVIEWER_API bool | drawDrawOptionsColors (const std::vector< std::shared_ptr< VisualObject > > &selectedObjs) |
| |
| virtual | ~ViewerPlugin () |
| |
| virtual | ~MultiListener ()=default |
| |
| virtual void | connect (Viewer *viewer, int group=0, boost::signals2::connect_position pos=boost::signals2::connect_position::at_back) |
| |
| virtual void | disconnect () |
| |
|
| virtual MRVIEWER_API void | setupShortcuts_ () |
| |
| Vector4f | getStoredColor_ (const std::string &str, const Color &defaultColor) const |
| |
| virtual MRVIEWER_API void | drawModalMessage_ () |
| |
| virtual MRVIEWER_API bool | onMouseDown_ (MouseButton button, int modifier) override |
| | Mouse IO.
|
| |
| virtual MRVIEWER_API bool | onMouseUp_ (MouseButton button, int modifier) override |
| |
| virtual MRVIEWER_API bool | onMouseMove_ (int mouse_x, int mouse_y) override |
| |
| virtual MRVIEWER_API bool | onMouseScroll_ (float delta_y) override |
| |
| virtual MRVIEWER_API void | cursorEntrance_ (bool entered) override |
| |
| virtual MRVIEWER_API bool | onCharPressed_ (unsigned key, int modifiers) override |
| | Keyboard IO.
|
| |
| virtual MRVIEWER_API bool | onKeyDown_ (int key, int modifiers) override |
| |
| virtual MRVIEWER_API bool | onKeyUp_ (int key, int modifiers) override |
| |
| virtual MRVIEWER_API bool | onKeyRepeat_ (int key, int modifiers) override |
| |
| virtual MRVIEWER_API void | postResize_ (int width, int height) override |
| | Scene events.
|
| |
| virtual MRVIEWER_API void | postRescale_ (float x, float y) override |
| |
| virtual MRVIEWER_API bool | spaceMouseMove_ (const Vector3f &translate, const Vector3f &rotate) override |
| | Spacemouse events.
|
| |
| virtual MRVIEWER_API bool | spaceMouseDown_ (int key) override |
| |
| virtual MRVIEWER_API bool | touchpadRotateGestureBegin_ () override |
| | Touchpad gesture events.
|
| |
| virtual MRVIEWER_API bool | touchpadRotateGestureUpdate_ (float angle) override |
| |
| virtual MRVIEWER_API bool | touchpadRotateGestureEnd_ () override |
| |
| virtual MRVIEWER_API bool | touchpadSwipeGestureBegin_ () override |
| |
| virtual MRVIEWER_API bool | touchpadSwipeGestureUpdate_ (float deltaX, float deltaY, bool kinetic) override |
| |
| virtual MRVIEWER_API bool | touchpadSwipeGestureEnd_ () override |
| |
| virtual MRVIEWER_API bool | touchpadZoomGestureBegin_ () override |
| |
| virtual MRVIEWER_API bool | touchpadZoomGestureUpdate_ (float scale, bool kinetic) override |
| |
| virtual MRVIEWER_API bool | touchpadZoomGestureEnd_ () override |
| |
| virtual MRVIEWER_API void | postFocus_ (bool focused) override |
| | Other events.
|
| |
| virtual MRVIEWER_API void | rescaleStyle_ () |
| |
| MRVIEWER_API float | drawSelectionInformation_ () |
| |
| MRVIEWER_API void | drawFeaturePropertiesEditor_ (const std::shared_ptr< Object > &object) |
| |
| MRVIEWER_API void | drawComparablePropertiesEditor_ (ObjectComparableWithReference &object) |
| |
| virtual MRVIEWER_API void | drawCustomSelectionInformation_ (const std::vector< std::shared_ptr< Object > > &selected, const SelectionInformationStyle &style) |
| | draw additional selection information (e.g. for custom objects)
|
| |
| virtual MRVIEWER_API void | draw_custom_selection_properties (const std::vector< std::shared_ptr< Object > > &selected) |
| |
| MRVIEWER_API void | drawTagInformation_ (const std::vector< std::shared_ptr< Object > > &selected) |
| |
| MRVIEWER_API float | drawTransform_ () |
| |
| virtual MRVIEWER_API bool | drawTransformContextMenu_ (const std::shared_ptr< Object > &) |
| |
| virtual MRVIEWER_API void | drawShortcutsWindow_ () |
| | A virtual function for drawing of the dialog with shortcuts. It can be overriden in the inherited classes.
|
| |
| MRVIEWER_API float | getSceneInfoItemWidth_ (int itemCount=1) |
| | returns width of items in Scene Info window
|
| |