MeshLib
 
Loading...
Searching...
No Matches
MR::Viewer Class Reference

#include <MRViewer.h>

Public Types

enum class  EventType {
  MouseDown , MouseUp , MouseMove , MouseScroll ,
  KeyDown , KeyUp , KeyRepeat , CharPressed ,
  Count
}
 
enum class  GLPrimitivesType {
  PointArraySize , LineArraySize , TriangleArraySize , PointElementsNum ,
  LineElementsNum , TriangleElementsNum , Count
}
 
using MouseButton = MR::MouseButton
 
using MouseMode = MR::MouseMode
 
using LaunchParams = MR::LaunchParams
 
using PointInAllSpaces = MR::PointInAllSpaces
 
using SignalStopHandler = StopOnTrueCombiner
 
using MouseUpDownSignal = boost::signals2::signal<bool( MouseButton btn, int modifier ), SignalStopHandler>
 
using MouseMoveSignal = boost::signals2::signal<bool( int x, int y ), SignalStopHandler>
 
using MouseScrollSignal = boost::signals2::signal<bool( float delta ), SignalStopHandler>
 
using CursorEntranceSignal = boost::signals2::signal<void(bool)>
 
using CharPressedSignal = boost::signals2::signal<bool( unsigned unicodeKey, int modifier ), SignalStopHandler>
 
using KeySignal = boost::signals2::signal<bool( int key, int modifier ), SignalStopHandler>
 
using SpaceMouseMoveSignal = boost::signals2::signal<bool( const Vector3f& translate, const Vector3f& rotate ), SignalStopHandler>
 
using SpaceMouseKeySignal = boost::signals2::signal<bool( int ), SignalStopHandler>
 
using RenderSignal = boost::signals2::signal<void()>
 
using DragDropSignal = boost::signals2::signal<bool( const std::vector<std::filesystem::path>& paths ), SignalStopHandler>
 
using PostResizeSignal = boost::signals2::signal<void( int x, int y )>
 
using PostRescaleSignal = boost::signals2::signal<void( float xscale, float yscale )>
 
using InterruptCloseSignal = boost::signals2::signal<bool(), SignalStopHandler>
 
using TouchSignal = boost::signals2::signal<bool(int,int,int), SignalStopHandler>
 
using TouchpadGestureBeginSignal = boost::signals2::signal<bool(), SignalStopHandler>
 
using TouchpadGestureEndSignal = boost::signals2::signal<bool(), SignalStopHandler>
 
using TouchpadRotateGestureUpdateSignal = boost::signals2::signal<bool( float angle ), SignalStopHandler>
 
using TouchpadSwipeGestureUpdateSignal = boost::signals2::signal<bool( float deltaX, float deltaY, bool kinetic ), SignalStopHandler>
 
using TouchpadZoomGestureUpdateSignal = boost::signals2::signal<bool( float scale, bool kinetic ), SignalStopHandler>
 
using PostFocusSignal = boost::signals2::signal<void( bool )>
 

Public Member Functions

MRVIEWER_API int launch (const LaunchParams &params)
 
MRVIEWER_API void launchEventLoop ()
 
MRVIEWER_API void launchShut ()
 
bool isLaunched () const
 
const LaunchParamsgetLaunchParams () const
 
template<typename PluginType >
PluginType * getPluginInstance ()
 
MRVIEWER_API bool isSupportedFormat (const std::filesystem::path &file_name)
 
MRVIEWER_API bool loadFiles (const std::vector< std::filesystem::path > &filesList)
 
MRVIEWER_API bool saveToFile (const std::filesystem::path &mesh_file_name)
 
MRVIEWER_API bool keyPressed (unsigned int unicode_key, int modifier)
 
MRVIEWER_API bool keyDown (int key, int modifier)
 
MRVIEWER_API bool keyUp (int key, int modifier)
 
MRVIEWER_API bool keyRepeat (int key, int modifier)
 
MRVIEWER_API bool mouseDown (MouseButton button, int modifier)
 
MRVIEWER_API bool mouseUp (MouseButton button, int modifier)
 
MRVIEWER_API bool mouseMove (int mouse_x, int mouse_y)
 
MRVIEWER_API bool mouseScroll (float delta_y)
 
MRVIEWER_API bool spaceMouseMove (const Vector3f &translate, const Vector3f &rotate)
 
MRVIEWER_API bool spaceMouseDown (int key)
 
MRVIEWER_API bool spaceMouseUp (int key)
 
MRVIEWER_API bool spaceMouseRepeat (int key)
 
MRVIEWER_API bool dragDrop (const std::vector< std::filesystem::path > &paths)
 
MRVIEWER_API bool touchStart (int id, int x, int y)
 
MRVIEWER_API bool touchMove (int id, int x, int y)
 
MRVIEWER_API bool touchEnd (int id, int x, int y)
 
MRVIEWER_API bool touchpadRotateGestureBegin ()
 
MRVIEWER_API bool touchpadRotateGestureUpdate (float angle)
 
MRVIEWER_API bool touchpadRotateGestureEnd ()
 
MRVIEWER_API bool touchpadSwipeGestureBegin ()
 
MRVIEWER_API bool touchpadSwipeGestureUpdate (float dx, float dy, bool kinetic)
 
MRVIEWER_API bool touchpadSwipeGestureEnd ()
 
MRVIEWER_API bool touchpadZoomGestureBegin ()
 
MRVIEWER_API bool touchpadZoomGestureUpdate (float scale, bool kinetic)
 
MRVIEWER_API bool touchpadZoomGestureEnd ()
 
MRVIEWER_API bool interruptWindowClose ()
 
MRVIEWER_API void joystickUpdateConnected (int jid, int event)
 
MRVIEWER_API void draw (bool force=false)
 
MRVIEWER_API void drawFull (bool dirtyScene)
 
MRVIEWER_API void drawScene ()
 
void setSceneDirty ()
 
MRVIEWER_API void setupScene ()
 
MRVIEWER_API void clearFramebuffers ()
 
MRVIEWER_API void resize (int w, int h)
 
MRVIEWER_API void postResize (int w, int h)
 
MRVIEWER_API void postSetPosition (int xPos, int yPos)
 
MRVIEWER_API void postSetMaximized (bool maximized)
 
MRVIEWER_API void postSetIconified (bool iconified)
 
MRVIEWER_API void postFocus (bool focused)
 
MRVIEWER_API void postRescale (float x, float y)
 
MRVIEWER_API void set_root (SceneRootObject &newRoot)
 
MRVIEWER_API void clearScene ()
 
MRVIEWER_API Viewportviewport (ViewportId viewportId={})
 
MRVIEWER_API const Viewportviewport (ViewportId viewportId={}) const
 
MRVIEWER_API ViewportId append_viewport (const ViewportRectangle &viewportRect, bool append_empty=false)
 
MRVIEWER_API Box2f getViewportsBounds () const
 
MRVIEWER_API bool erase_viewport (const size_t index)
 
MRVIEWER_API bool erase_viewport (ViewportId viewport_id)
 
MRVIEWER_API int viewport_index (ViewportId viewport_id) const
 
MRVIEWER_API ViewportId getHoveredViewportId () const
 
MRVIEWER_API void select_hovered_viewport ()
 
MRVIEWER_API void fitDataViewport (MR::ViewportMask vpList=MR::ViewportMask::all(), float fill=0.6f, bool snapView=true)
 
MRVIEWER_API void fitBoxViewport (const Box3f &box, MR::ViewportMask vpList=MR::ViewportMask::all(), float fill=0.6f, bool snapView=true)
 
MRVIEWER_API void preciseFitDataViewport (MR::ViewportMask vpList=MR::ViewportMask::all())
 
MRVIEWER_API void preciseFitDataViewport (MR::ViewportMask vpList, const FitDataParams &param)
 
MRVIEWER_API size_t getTotalFrames () const
 
MRVIEWER_API size_t getSwappedFrames () const
 
MRVIEWER_API size_t getFPS () const
 
MRVIEWER_API double getPrevFrameDrawTimeMillisec () const
 
MRVIEWER_API size_t getStaticGLBufferSize () const
 
MRVIEWER_API void incrementForceRedrawFrames (int i=1, bool swapOnLastOnly=false)
 
MRVIEWER_API bool isCurrentFrameSwapping () const
 
MRVIEWER_API size_t getEventsCount (EventType type) const
 
MRVIEWER_API size_t getLastFrameGLPrimitivesCount (GLPrimitivesType type) const
 
MRVIEWER_API void incrementThisFrameGLPrimitivesCount (GLPrimitivesType type, size_t num)
 
ViewportMask getPresentViewports () const
 
MRVIEWER_API void resetAllCounters ()
 
MRVIEWER_API Image captureSceneScreenShot (const Vector2i &resolution=Vector2i())
 
MRVIEWER_API void captureUIScreenShot (std::function< void(const Image &)> callback, const Vector2i &pos=Vector2i(), const Vector2i &size=Vector2i())
 
MRVIEWER_API bool isAlphaSortAvailable () const
 
MRVIEWER_API bool enableAlphaSort (bool on)
 
bool isAlphaSortEnabled () const
 
MRVIEWER_API bool isSceneTextureBound () const
 
MRVIEWER_API void bindSceneTexture (bool bind)
 
MRVIEWER_API void setViewportSettingsManager (std::unique_ptr< IViewerSettingsManager > mng)
 
MRVIEWER_API const std::unique_ptr< IViewerSettingsManager > & getViewportSettingsManager () const
 
MRVIEWER_API PointInAllSpaces getPixelPointInfo (const Vector3f &screenPoint) const
 
MRVIEWER_API PointInAllSpaces getMousePointInfo () const
 
MRVIEWER_API Vector3f screenToViewport (const Vector3f &screenPoint, ViewportId id) const
 
MRVIEWER_API Vector3f viewportToScreen (const Vector3f &viewportPoint, ViewportId id) const
 
MRVIEWER_API std::vector< std::reference_wrapper< Viewport > > getViewports (ViewportMask mask=ViewportMask::any())
 
MRVIEWER_API void enableGlobalHistory (bool on)
 
bool isGlobalHistoryEnabled () const
 
MRVIEWER_API void appendHistoryAction (const std::shared_ptr< HistoryAction > &action)
 
MRVIEWER_API bool globalHistoryUndo ()
 
MRVIEWER_API bool globalHistoryRedo ()
 
const std::shared_ptr< HistoryStore > & getGlobalHistoryStore () const
 
const std::shared_ptr< SpaceMouseHandler > & getSpaceMouseHandler () const
 
MRVIEWER_API void onSceneSaved (const std::filesystem::path &savePath, bool storeInRecent=true)
 
MRVIEWER_API const std::shared_ptr< ImGuiMenu > & getMenuPlugin () const
 
MRVIEWER_API void setMenuPlugin (std::shared_ptr< ImGuiMenu > menu)
 
template<typename T >
std::shared_ptr< T > getMenuPluginAs () const
 
void stopEventLoop ()
 
bool getStopEventLoopFlag () const
 
bool windowShouldClose ()
 
bool isGLInitialized () const
 
bool isDeveloperFeaturesEnabled () const
 
MRVIEWER_API void makeTitleFromSceneRootPath ()
 
MRVIEWER_API void emplaceEvent (std::string name, ViewerEventCallback cb, bool skipable=false)
 
MRVIEWER_API void popEventByName (const std::string &name)
 
MRVIEWER_API void postEmptyEvent ()
 
MRVIEWER_API const TouchpadParametersgetTouchpadParameters () const
 
MRVIEWER_API void setTouchpadParameters (const TouchpadParameters &)
 
MRVIEWER_API SpaceMouseParameters getSpaceMouseParameters () const
 
MRVIEWER_API void setSpaceMouseParameters (const SpaceMouseParameters &)
 
const MouseControllermouseController () const
 
MouseControllermouseController ()
 
const RecentFilesStorerecentFilesStore () const
 
RecentFilesStorerecentFilesStore ()
 

Static Public Member Functions

static MRVIEWER_API void parseLaunchParams (LaunchParams &params)
 
static Viewerinstance ()
 
static ViewerinstanceRef ()
 
static const ViewerconstInstance ()
 
static const ViewerconstInstanceRef ()
 

Public Attributes

bool swapOnLastPostEventsRedraw { true }
 
int forceRedrawMinimumIncrementAfterEvents { 4 }
 
GLFWwindow * window
 
std::function< void(Viewer *viewer) resetSettingsFunction )
 
std::vector< Viewportviewport_list
 
size_t selected_viewport_index
 
std::vector< ViewerPlugin * > plugins
 
float pixelRatio { 1.0f }
 
Vector2i framebufferSize
 
Vector2i windowSavePos
 
Vector2i windowSaveSize
 
Vector2i windowOldPos
 
bool windowMaximized { false }
 
bool isAnimating { false }
 
int animationMaxFps { 30 }
 
float scrollForce { }
 
uint16_t glPickRadius { }
 
std::vector< std::string > commandArgs
 
std::unique_ptr< ObjectMeshbasisAxes
 
std::unique_ptr< ObjectMeshglobalBasisAxes
 
std::unique_ptr< ObjectMeshrotationSphere
 
std::unique_ptr< ObjectMeshclippingPlaneObject
 
std::string defaultWindowTitle
 
MouseUpDownSignal mouseDownSignal
 
MouseUpDownSignal mouseUpSignal
 
MouseMoveSignal mouseMoveSignal
 
MouseScrollSignal mouseScrollSignal
 
CursorEntranceSignal cursorEntranceSignal
 
CharPressedSignal charPressedSignal
 
KeySignal keyUpSignal
 
KeySignal keyDownSignal
 
KeySignal keyRepeatSignal
 
SpaceMouseMoveSignal spaceMouseMoveSignal
 
SpaceMouseKeySignal spaceMouseDownSignal
 
SpaceMouseKeySignal spaceMouseUpSignal
 
SpaceMouseKeySignal spaceMouseRepeatSignal
 
RenderSignal preDrawSignal
 
RenderSignal preDrawPostViewportSignal
 
RenderSignal drawSignal
 
RenderSignal postDrawPreViewportSignal
 
RenderSignal postDrawSignal
 
DragDropSignal dragDropSignal
 
PostResizeSignal postResizeSignal
 
PostRescaleSignal postRescaleSignal
 
InterruptCloseSignal interruptCloseSignal
 
TouchSignal touchStartSignal
 
TouchSignal touchMoveSignal
 
TouchSignal touchEndSignal
 
TouchpadGestureBeginSignal touchpadRotateGestureBeginSignal
 
TouchpadRotateGestureUpdateSignal touchpadRotateGestureUpdateSignal
 
TouchpadGestureEndSignal touchpadRotateGestureEndSignal
 
TouchpadGestureBeginSignal touchpadSwipeGestureBeginSignal
 
TouchpadSwipeGestureUpdateSignal touchpadSwipeGestureUpdateSignal
 
TouchpadGestureEndSignal touchpadSwipeGestureEndSignal
 
TouchpadGestureBeginSignal touchpadZoomGestureBeginSignal
 
TouchpadZoomGestureUpdateSignal touchpadZoomGestureUpdateSignal
 
TouchpadGestureEndSignal touchpadZoomGestureEndSignal
 
PostFocusSignal postFocusSignal
 

Friends

MRVIEWER_API ViewergetViewerInstance ()
 

Member Typedef Documentation

◆ CharPressedSignal

using MR::Viewer::CharPressedSignal = boost::signals2::signal<bool( unsigned unicodeKey, int modifier ), SignalStopHandler>

◆ CursorEntranceSignal

using MR::Viewer::CursorEntranceSignal = boost::signals2::signal<void(bool)>

◆ DragDropSignal

using MR::Viewer::DragDropSignal = boost::signals2::signal<bool( const std::vector<std::filesystem::path>& paths ), SignalStopHandler>

◆ InterruptCloseSignal

using MR::Viewer::InterruptCloseSignal = boost::signals2::signal<bool(), SignalStopHandler>

◆ KeySignal

using MR::Viewer::KeySignal = boost::signals2::signal<bool( int key, int modifier ), SignalStopHandler>

◆ LaunchParams

◆ MouseButton

◆ MouseMode

◆ MouseMoveSignal

using MR::Viewer::MouseMoveSignal = boost::signals2::signal<bool( int x, int y ), SignalStopHandler>

◆ MouseScrollSignal

using MR::Viewer::MouseScrollSignal = boost::signals2::signal<bool( float delta ), SignalStopHandler>

◆ MouseUpDownSignal

using MR::Viewer::MouseUpDownSignal = boost::signals2::signal<bool( MouseButton btn, int modifier ), SignalStopHandler>

◆ PointInAllSpaces

◆ PostFocusSignal

using MR::Viewer::PostFocusSignal = boost::signals2::signal<void( bool )>

◆ PostRescaleSignal

using MR::Viewer::PostRescaleSignal = boost::signals2::signal<void( float xscale, float yscale )>

◆ PostResizeSignal

using MR::Viewer::PostResizeSignal = boost::signals2::signal<void( int x, int y )>

◆ RenderSignal

using MR::Viewer::RenderSignal = boost::signals2::signal<void()>

◆ SignalStopHandler

◆ SpaceMouseKeySignal

using MR::Viewer::SpaceMouseKeySignal = boost::signals2::signal<bool( int ), SignalStopHandler>

◆ SpaceMouseMoveSignal

using MR::Viewer::SpaceMouseMoveSignal = boost::signals2::signal<bool( const Vector3f& translate, const Vector3f& rotate ), SignalStopHandler>

◆ TouchpadGestureBeginSignal

using MR::Viewer::TouchpadGestureBeginSignal = boost::signals2::signal<bool(), SignalStopHandler>

◆ TouchpadGestureEndSignal

using MR::Viewer::TouchpadGestureEndSignal = boost::signals2::signal<bool(), SignalStopHandler>

◆ TouchpadRotateGestureUpdateSignal

using MR::Viewer::TouchpadRotateGestureUpdateSignal = boost::signals2::signal<bool( float angle ), SignalStopHandler>

◆ TouchpadSwipeGestureUpdateSignal

using MR::Viewer::TouchpadSwipeGestureUpdateSignal = boost::signals2::signal<bool( float deltaX, float deltaY, bool kinetic ), SignalStopHandler>

◆ TouchpadZoomGestureUpdateSignal

using MR::Viewer::TouchpadZoomGestureUpdateSignal = boost::signals2::signal<bool( float scale, bool kinetic ), SignalStopHandler>

◆ TouchSignal

using MR::Viewer::TouchSignal = boost::signals2::signal<bool(int,int,int), SignalStopHandler>

Member Enumeration Documentation

◆ EventType

enum class MR::Viewer::EventType
strong
Enumerator
MouseDown 
MouseUp 
MouseMove 
MouseScroll 
KeyDown 
KeyUp 
KeyRepeat 
CharPressed 
Count 

◆ GLPrimitivesType

enum class MR::Viewer::GLPrimitivesType
strong
Enumerator
PointArraySize 
LineArraySize 
TriangleArraySize 
PointElementsNum 
LineElementsNum 
TriangleElementsNum 
Count 

Member Function Documentation

◆ append_viewport()

MRVIEWER_API ViewportId MR::Viewer::append_viewport ( const ViewportRectangle & viewportRect,
bool append_empty = false )

◆ appendHistoryAction()

MRVIEWER_API void MR::Viewer::appendHistoryAction ( const std::shared_ptr< HistoryAction > & action)

◆ bindSceneTexture()

MRVIEWER_API void MR::Viewer::bindSceneTexture ( bool bind)

◆ captureSceneScreenShot()

MRVIEWER_API Image MR::Viewer::captureSceneScreenShot ( const Vector2i & resolution = Vector2i())

Captures 3d scene

Parameters
resolutionresolution of the image <= 0 means default

◆ captureUIScreenShot()

MRVIEWER_API void MR::Viewer::captureUIScreenShot ( std::function< void(const Image &)> callback,
const Vector2i & pos = Vector2i(),
const Vector2i & size = Vector2i() )

Captures part of window in the beginning of next frame, capturing all that was drawn in this frame

Parameters
callbackwill be called right when screenshot is taken
posleft-bottom corner of capturing area relative of left-down corner of window. default = size(0, 0)
sizesize of capturing area. default = size(0, 0) - auto size to right-top corner of window.

◆ clearFramebuffers()

MRVIEWER_API void MR::Viewer::clearFramebuffers ( )

◆ clearScene()

MRVIEWER_API void MR::Viewer::clearScene ( )

◆ constInstance()

static const Viewer * MR::Viewer::constInstance ( )
inlinestatic

◆ constInstanceRef()

static const Viewer & MR::Viewer::constInstanceRef ( )
inlinestatic

◆ dragDrop()

MRVIEWER_API bool MR::Viewer::dragDrop ( const std::vector< std::filesystem::path > & paths)

◆ draw()

MRVIEWER_API void MR::Viewer::draw ( bool force = false)

◆ drawFull()

MRVIEWER_API void MR::Viewer::drawFull ( bool dirtyScene)

◆ drawScene()

MRVIEWER_API void MR::Viewer::drawScene ( )

◆ emplaceEvent()

MRVIEWER_API void MR::Viewer::emplaceEvent ( std::string name,
ViewerEventCallback cb,
bool skipable = false )

emplace event at the end of the queue replace last skipable with new skipable

◆ enableAlphaSort()

MRVIEWER_API bool MR::Viewer::enableAlphaSort ( bool on)

◆ enableGlobalHistory()

MRVIEWER_API void MR::Viewer::enableGlobalHistory ( bool on)

◆ erase_viewport() [1/2]

MRVIEWER_API bool MR::Viewer::erase_viewport ( const size_t index)

◆ erase_viewport() [2/2]

MRVIEWER_API bool MR::Viewer::erase_viewport ( ViewportId viewport_id)

◆ fitBoxViewport()

MRVIEWER_API void MR::Viewer::fitBoxViewport ( const Box3f & box,
MR::ViewportMask vpList = MR::ViewportMask::all(),
float fill = 0.6f,
bool snapView = true )

◆ fitDataViewport()

MRVIEWER_API void MR::Viewer::fitDataViewport ( MR::ViewportMask vpList = MR::ViewportMask::all(),
float fill = 0.6f,
bool snapView = true )

◆ getEventsCount()

MRVIEWER_API size_t MR::Viewer::getEventsCount ( EventType type) const

◆ getFPS()

MRVIEWER_API size_t MR::Viewer::getFPS ( ) const

◆ getGlobalHistoryStore()

const std::shared_ptr< HistoryStore > & MR::Viewer::getGlobalHistoryStore ( ) const
inline

◆ getHoveredViewportId()

MRVIEWER_API ViewportId MR::Viewer::getHoveredViewportId ( ) const

◆ getLastFrameGLPrimitivesCount()

MRVIEWER_API size_t MR::Viewer::getLastFrameGLPrimitivesCount ( GLPrimitivesType type) const

◆ getLaunchParams()

const LaunchParams & MR::Viewer::getLaunchParams ( ) const
inline

◆ getMenuPlugin()

MRVIEWER_API const std::shared_ptr< ImGuiMenu > & MR::Viewer::getMenuPlugin ( ) const

◆ getMenuPluginAs()

template<typename T >
std::shared_ptr< T > MR::Viewer::getMenuPluginAs ( ) const
inline

◆ getMousePointInfo()

MRVIEWER_API PointInAllSpaces MR::Viewer::getMousePointInfo ( ) const

◆ getPixelPointInfo()

MRVIEWER_API PointInAllSpaces MR::Viewer::getPixelPointInfo ( const Vector3f & screenPoint) const

◆ getPluginInstance()

template<typename PluginType >
PluginType * MR::Viewer::getPluginInstance ( )
inline

◆ getPresentViewports()

ViewportMask MR::Viewer::getPresentViewports ( ) const
inline

◆ getPrevFrameDrawTimeMillisec()

MRVIEWER_API double MR::Viewer::getPrevFrameDrawTimeMillisec ( ) const

◆ getSpaceMouseHandler()

const std::shared_ptr< SpaceMouseHandler > & MR::Viewer::getSpaceMouseHandler ( ) const
inline

◆ getSpaceMouseParameters()

MRVIEWER_API SpaceMouseParameters MR::Viewer::getSpaceMouseParameters ( ) const

◆ getStaticGLBufferSize()

MRVIEWER_API size_t MR::Viewer::getStaticGLBufferSize ( ) const

◆ getStopEventLoopFlag()

bool MR::Viewer::getStopEventLoopFlag ( ) const
inline

◆ getSwappedFrames()

MRVIEWER_API size_t MR::Viewer::getSwappedFrames ( ) const

◆ getTotalFrames()

MRVIEWER_API size_t MR::Viewer::getTotalFrames ( ) const

◆ getTouchpadParameters()

MRVIEWER_API const TouchpadParameters & MR::Viewer::getTouchpadParameters ( ) const

◆ getViewports()

MRVIEWER_API std::vector< std::reference_wrapper< Viewport > > MR::Viewer::getViewports ( ViewportMask mask = ViewportMask::any())

◆ getViewportsBounds()

MRVIEWER_API Box2f MR::Viewer::getViewportsBounds ( ) const

◆ getViewportSettingsManager()

MRVIEWER_API const std::unique_ptr< IViewerSettingsManager > & MR::Viewer::getViewportSettingsManager ( ) const
inline

◆ globalHistoryRedo()

MRVIEWER_API bool MR::Viewer::globalHistoryRedo ( )

◆ globalHistoryUndo()

MRVIEWER_API bool MR::Viewer::globalHistoryUndo ( )

◆ incrementForceRedrawFrames()

MRVIEWER_API void MR::Viewer::incrementForceRedrawFrames ( int i = 1,
bool swapOnLastOnly = false )

◆ incrementThisFrameGLPrimitivesCount()

MRVIEWER_API void MR::Viewer::incrementThisFrameGLPrimitivesCount ( GLPrimitivesType type,
size_t num )

◆ instance()

static Viewer * MR::Viewer::instance ( )
inlinestatic

◆ instanceRef()

static Viewer & MR::Viewer::instanceRef ( )
inlinestatic

◆ interruptWindowClose()

MRVIEWER_API bool MR::Viewer::interruptWindowClose ( )

◆ isAlphaSortAvailable()

MRVIEWER_API bool MR::Viewer::isAlphaSortAvailable ( ) const

◆ isAlphaSortEnabled()

bool MR::Viewer::isAlphaSortEnabled ( ) const
inline

◆ isCurrentFrameSwapping()

MRVIEWER_API bool MR::Viewer::isCurrentFrameSwapping ( ) const

◆ isDeveloperFeaturesEnabled()

bool MR::Viewer::isDeveloperFeaturesEnabled ( ) const
inline

◆ isGLInitialized()

bool MR::Viewer::isGLInitialized ( ) const
inline

◆ isGlobalHistoryEnabled()

bool MR::Viewer::isGlobalHistoryEnabled ( ) const
inline

◆ isLaunched()

bool MR::Viewer::isLaunched ( ) const
inline

◆ isSceneTextureBound()

MRVIEWER_API bool MR::Viewer::isSceneTextureBound ( ) const

◆ isSupportedFormat()

MRVIEWER_API bool MR::Viewer::isSupportedFormat ( const std::filesystem::path & file_name)

◆ joystickUpdateConnected()

MRVIEWER_API void MR::Viewer::joystickUpdateConnected ( int jid,
int event )

◆ keyDown()

MRVIEWER_API bool MR::Viewer::keyDown ( int key,
int modifier )

◆ keyPressed()

MRVIEWER_API bool MR::Viewer::keyPressed ( unsigned int unicode_key,
int modifier )

◆ keyRepeat()

MRVIEWER_API bool MR::Viewer::keyRepeat ( int key,
int modifier )

◆ keyUp()

MRVIEWER_API bool MR::Viewer::keyUp ( int key,
int modifier )

◆ launch()

MRVIEWER_API int MR::Viewer::launch ( const LaunchParams & params)

◆ launchEventLoop()

MRVIEWER_API void MR::Viewer::launchEventLoop ( )

◆ launchShut()

MRVIEWER_API void MR::Viewer::launchShut ( )

◆ loadFiles()

MRVIEWER_API bool MR::Viewer::loadFiles ( const std::vector< std::filesystem::path > & filesList)

◆ makeTitleFromSceneRootPath()

MRVIEWER_API void MR::Viewer::makeTitleFromSceneRootPath ( )

◆ mouseController() [1/2]

MouseController & MR::Viewer::mouseController ( )
inline

◆ mouseController() [2/2]

const MouseController & MR::Viewer::mouseController ( ) const
inline

◆ mouseDown()

MRVIEWER_API bool MR::Viewer::mouseDown ( MouseButton button,
int modifier )

◆ mouseMove()

MRVIEWER_API bool MR::Viewer::mouseMove ( int mouse_x,
int mouse_y )

◆ mouseScroll()

MRVIEWER_API bool MR::Viewer::mouseScroll ( float delta_y)

◆ mouseUp()

MRVIEWER_API bool MR::Viewer::mouseUp ( MouseButton button,
int modifier )

◆ onSceneSaved()

MRVIEWER_API void MR::Viewer::onSceneSaved ( const std::filesystem::path & savePath,
bool storeInRecent = true )

◆ parseLaunchParams()

static MRVIEWER_API void MR::Viewer::parseLaunchParams ( LaunchParams & params)
static

◆ popEventByName()

MRVIEWER_API void MR::Viewer::popEventByName ( const std::string & name)

◆ postEmptyEvent()

MRVIEWER_API void MR::Viewer::postEmptyEvent ( )

◆ postFocus()

MRVIEWER_API void MR::Viewer::postFocus ( bool focused)

◆ postRescale()

MRVIEWER_API void MR::Viewer::postRescale ( float x,
float y )

◆ postResize()

MRVIEWER_API void MR::Viewer::postResize ( int w,
int h )

◆ postSetIconified()

MRVIEWER_API void MR::Viewer::postSetIconified ( bool iconified)

◆ postSetMaximized()

MRVIEWER_API void MR::Viewer::postSetMaximized ( bool maximized)

◆ postSetPosition()

MRVIEWER_API void MR::Viewer::postSetPosition ( int xPos,
int yPos )

◆ preciseFitDataViewport() [1/2]

MRVIEWER_API void MR::Viewer::preciseFitDataViewport ( MR::ViewportMask vpList,
const FitDataParams & param )

◆ preciseFitDataViewport() [2/2]

MRVIEWER_API void MR::Viewer::preciseFitDataViewport ( MR::ViewportMask vpList = MR::ViewportMask::all())

◆ recentFilesStore() [1/2]

RecentFilesStore & MR::Viewer::recentFilesStore ( )
inline

◆ recentFilesStore() [2/2]

const RecentFilesStore & MR::Viewer::recentFilesStore ( ) const
inline

◆ resetAllCounters()

MRVIEWER_API void MR::Viewer::resetAllCounters ( )

◆ resize()

MRVIEWER_API void MR::Viewer::resize ( int w,
int h )

◆ saveToFile()

MRVIEWER_API bool MR::Viewer::saveToFile ( const std::filesystem::path & mesh_file_name)

◆ screenToViewport()

MRVIEWER_API Vector3f MR::Viewer::screenToViewport ( const Vector3f & screenPoint,
ViewportId id ) const

◆ select_hovered_viewport()

MRVIEWER_API void MR::Viewer::select_hovered_viewport ( )

◆ set_root()

MRVIEWER_API void MR::Viewer::set_root ( SceneRootObject & newRoot)

◆ setMenuPlugin()

MRVIEWER_API void MR::Viewer::setMenuPlugin ( std::shared_ptr< ImGuiMenu > menu)

◆ setSceneDirty()

void MR::Viewer::setSceneDirty ( )
inline

◆ setSpaceMouseParameters()

MRVIEWER_API void MR::Viewer::setSpaceMouseParameters ( const SpaceMouseParameters & )

◆ setTouchpadParameters()

MRVIEWER_API void MR::Viewer::setTouchpadParameters ( const TouchpadParameters & )

◆ setupScene()

MRVIEWER_API void MR::Viewer::setupScene ( )

◆ setViewportSettingsManager()

MRVIEWER_API void MR::Viewer::setViewportSettingsManager ( std::unique_ptr< IViewerSettingsManager > mng)

◆ spaceMouseDown()

MRVIEWER_API bool MR::Viewer::spaceMouseDown ( int key)

◆ spaceMouseMove()

MRVIEWER_API bool MR::Viewer::spaceMouseMove ( const Vector3f & translate,
const Vector3f & rotate )

◆ spaceMouseRepeat()

MRVIEWER_API bool MR::Viewer::spaceMouseRepeat ( int key)

◆ spaceMouseUp()

MRVIEWER_API bool MR::Viewer::spaceMouseUp ( int key)

◆ stopEventLoop()

void MR::Viewer::stopEventLoop ( )
inline

◆ touchEnd()

MRVIEWER_API bool MR::Viewer::touchEnd ( int id,
int x,
int y )

◆ touchMove()

MRVIEWER_API bool MR::Viewer::touchMove ( int id,
int x,
int y )

◆ touchpadRotateGestureBegin()

MRVIEWER_API bool MR::Viewer::touchpadRotateGestureBegin ( )

◆ touchpadRotateGestureEnd()

MRVIEWER_API bool MR::Viewer::touchpadRotateGestureEnd ( )

◆ touchpadRotateGestureUpdate()

MRVIEWER_API bool MR::Viewer::touchpadRotateGestureUpdate ( float angle)

◆ touchpadSwipeGestureBegin()

MRVIEWER_API bool MR::Viewer::touchpadSwipeGestureBegin ( )

◆ touchpadSwipeGestureEnd()

MRVIEWER_API bool MR::Viewer::touchpadSwipeGestureEnd ( )

◆ touchpadSwipeGestureUpdate()

MRVIEWER_API bool MR::Viewer::touchpadSwipeGestureUpdate ( float dx,
float dy,
bool kinetic )

◆ touchpadZoomGestureBegin()

MRVIEWER_API bool MR::Viewer::touchpadZoomGestureBegin ( )

◆ touchpadZoomGestureEnd()

MRVIEWER_API bool MR::Viewer::touchpadZoomGestureEnd ( )

◆ touchpadZoomGestureUpdate()

MRVIEWER_API bool MR::Viewer::touchpadZoomGestureUpdate ( float scale,
bool kinetic )

◆ touchStart()

MRVIEWER_API bool MR::Viewer::touchStart ( int id,
int x,
int y )

◆ viewport() [1/2]

MRVIEWER_API Viewport & MR::Viewer::viewport ( ViewportId viewportId = {})

◆ viewport() [2/2]

MRVIEWER_API const Viewport & MR::Viewer::viewport ( ViewportId viewportId = {}) const

◆ viewport_index()

MRVIEWER_API int MR::Viewer::viewport_index ( ViewportId viewport_id) const

◆ viewportToScreen()

MRVIEWER_API Vector3f MR::Viewer::viewportToScreen ( const Vector3f & viewportPoint,
ViewportId id ) const

◆ windowShouldClose()

bool MR::Viewer::windowShouldClose ( )

Friends And Related Symbol Documentation

◆ getViewerInstance

MRVIEWER_API Viewer & getViewerInstance ( )
friend

Member Data Documentation

◆ animationMaxFps

int MR::Viewer::animationMaxFps { 30 }

◆ basisAxes

std::unique_ptr<ObjectMesh> MR::Viewer::basisAxes

◆ charPressedSignal

CharPressedSignal MR::Viewer::charPressedSignal

◆ clippingPlaneObject

std::unique_ptr<ObjectMesh> MR::Viewer::clippingPlaneObject

◆ commandArgs

std::vector<std::string> MR::Viewer::commandArgs

◆ cursorEntranceSignal

CursorEntranceSignal MR::Viewer::cursorEntranceSignal

◆ defaultWindowTitle

std::string MR::Viewer::defaultWindowTitle

◆ dragDropSignal

DragDropSignal MR::Viewer::dragDropSignal

◆ drawSignal

RenderSignal MR::Viewer::drawSignal

◆ forceRedrawMinimumIncrementAfterEvents

int MR::Viewer::forceRedrawMinimumIncrementAfterEvents { 4 }

◆ framebufferSize

Vector2i MR::Viewer::framebufferSize

◆ globalBasisAxes

std::unique_ptr<ObjectMesh> MR::Viewer::globalBasisAxes

◆ glPickRadius

uint16_t MR::Viewer::glPickRadius { }

◆ interruptCloseSignal

InterruptCloseSignal MR::Viewer::interruptCloseSignal

◆ isAnimating

bool MR::Viewer::isAnimating { false }

◆ keyDownSignal

KeySignal MR::Viewer::keyDownSignal

◆ keyRepeatSignal

KeySignal MR::Viewer::keyRepeatSignal

◆ keyUpSignal

KeySignal MR::Viewer::keyUpSignal

◆ mouseDownSignal

MouseUpDownSignal MR::Viewer::mouseDownSignal

◆ mouseMoveSignal

MouseMoveSignal MR::Viewer::mouseMoveSignal

◆ mouseScrollSignal

MouseScrollSignal MR::Viewer::mouseScrollSignal

◆ mouseUpSignal

MouseUpDownSignal MR::Viewer::mouseUpSignal

◆ pixelRatio

float MR::Viewer::pixelRatio { 1.0f }

◆ plugins

std::vector<ViewerPlugin*> MR::Viewer::plugins

◆ postDrawPreViewportSignal

RenderSignal MR::Viewer::postDrawPreViewportSignal

◆ postDrawSignal

RenderSignal MR::Viewer::postDrawSignal

◆ postFocusSignal

PostFocusSignal MR::Viewer::postFocusSignal

◆ postRescaleSignal

PostRescaleSignal MR::Viewer::postRescaleSignal

◆ postResizeSignal

PostResizeSignal MR::Viewer::postResizeSignal

◆ preDrawPostViewportSignal

RenderSignal MR::Viewer::preDrawPostViewportSignal

◆ preDrawSignal

RenderSignal MR::Viewer::preDrawSignal

◆ resetSettingsFunction

std::function<void( Viewer* viewer ) MR::Viewer::resetSettingsFunction)

◆ rotationSphere

std::unique_ptr<ObjectMesh> MR::Viewer::rotationSphere

◆ scrollForce

float MR::Viewer::scrollForce { }

◆ selected_viewport_index

size_t MR::Viewer::selected_viewport_index

◆ spaceMouseDownSignal

SpaceMouseKeySignal MR::Viewer::spaceMouseDownSignal

◆ spaceMouseMoveSignal

SpaceMouseMoveSignal MR::Viewer::spaceMouseMoveSignal

◆ spaceMouseRepeatSignal

SpaceMouseKeySignal MR::Viewer::spaceMouseRepeatSignal

◆ spaceMouseUpSignal

SpaceMouseKeySignal MR::Viewer::spaceMouseUpSignal

◆ swapOnLastPostEventsRedraw

bool MR::Viewer::swapOnLastPostEventsRedraw { true }

◆ touchEndSignal

TouchSignal MR::Viewer::touchEndSignal

◆ touchMoveSignal

TouchSignal MR::Viewer::touchMoveSignal

◆ touchpadRotateGestureBeginSignal

TouchpadGestureBeginSignal MR::Viewer::touchpadRotateGestureBeginSignal

◆ touchpadRotateGestureEndSignal

TouchpadGestureEndSignal MR::Viewer::touchpadRotateGestureEndSignal

◆ touchpadRotateGestureUpdateSignal

TouchpadRotateGestureUpdateSignal MR::Viewer::touchpadRotateGestureUpdateSignal

◆ touchpadSwipeGestureBeginSignal

TouchpadGestureBeginSignal MR::Viewer::touchpadSwipeGestureBeginSignal

◆ touchpadSwipeGestureEndSignal

TouchpadGestureEndSignal MR::Viewer::touchpadSwipeGestureEndSignal

◆ touchpadSwipeGestureUpdateSignal

TouchpadSwipeGestureUpdateSignal MR::Viewer::touchpadSwipeGestureUpdateSignal

◆ touchpadZoomGestureBeginSignal

TouchpadGestureBeginSignal MR::Viewer::touchpadZoomGestureBeginSignal

◆ touchpadZoomGestureEndSignal

TouchpadGestureEndSignal MR::Viewer::touchpadZoomGestureEndSignal

◆ touchpadZoomGestureUpdateSignal

TouchpadZoomGestureUpdateSignal MR::Viewer::touchpadZoomGestureUpdateSignal

◆ touchStartSignal

TouchSignal MR::Viewer::touchStartSignal

◆ viewport_list

std::vector<Viewport> MR::Viewer::viewport_list

◆ window

GLFWwindow* MR::Viewer::window

◆ windowMaximized

bool MR::Viewer::windowMaximized { false }

◆ windowOldPos

Vector2i MR::Viewer::windowOldPos

◆ windowSavePos

Vector2i MR::Viewer::windowSavePos

◆ windowSaveSize

Vector2i MR::Viewer::windowSaveSize

The documentation for this class was generated from the following file: