OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Viewer Class Reference

Simple 3D viewer. More...

#include "Viewer.h"

Inheritance diagram for Viewer:

Public Member Functions

 Viewer ()=delete
 
 Viewer (ot::UID modelID, ot::UID viewerID, double scaleWidth, double scaleHeight, int backgroundR, int backgroundG, int backgroundB, int overlayTextR, int overlayTextG, int overlayTextB)
 
virtual ~Viewer ()
 
void reset ()
 
void refresh (bool _ignoreUpdateSettingsRequest=true)
 
void setClearColorAutomatic (int backgroundR, int backgroundG, int backgroundB, int foregroundR, int foregroundG, int foregroundB)
 
void removeOverlay (void)
 
void setOverlayText (const std::string &text)
 
ot::UID getViewerID (void)
 
void detachFromModel (void)
 
ot::PlotManagerView * get1DPlot (void) const
 
void setTabNames (const std::string &_osgViewTabName, const std::string &_plotTabName, const std::string &_versionGraphTabName)
 
void set1DPlotItemSelected (unsigned long long treeItemID, bool controlPressed)
 
void reset1DPlotItemSelection (void)
 
RubberbandgetRubberband (void)
 
void createRubberband (ot::serviceID_t _senderId, std::string &_note, const std::string &_configurationJson)
 
void finishRubberbandExecution (void)
 
void cancelRubberband (void)
 
void settingsItemChanged (const ot::Property *_property)
 
bool workingPlaneSettingsItemChanged (const std::string &_logicalName, const ot::Property *_item, bool &_settingsUpdateRequired)
 
bool axisCrossSettingsItemChanged (const std::string &_logicalName, const ot::Property *_item, bool &_settingsUpdateRequired)
 
bool geometrySettingsItemChanged (const std::string &_logicalName, const ot::Property *_item, bool &_settingsUpdateRequired)
 
bool displaySettingsItemChanged (const std::string &_logicalName, const ot::Property *_item, bool &_settingsUpdateRequired)
 
void toggleWorkingPlane (void)
 
void setWorkingPlaneTransform (osg::Matrix matrix)
 
osg::Matrix getWorkingPlaneTransform (void)
 
void toggleAxisCross (void)
 
void toggleCenterAxisCross (void)
 
void toggleCutplane (void)
 
void setLightSourceDistance (const std::string &value)
 
void freeze3DView (bool flag)
 
void addHandler (HandlerBase *handler)
 
void removeHandler (HandlerBase *handler)
 
bool hasHandlers (void)
 
void processHoverViewHandlers (osgUtil::LineSegmentIntersector *intersector)
 
HandlerBasegetCurrentHandler (void)
 
ModelgetModel (void)
 
bool propertyGridValueChanged (const ot::Property *_property)
 
void enableClipPlane (osg::Vec3d normal, osg::Vec3d point)
 
void updateClipPlane (osg::Vec3d normal, osg::Vec3d point)
 
void disableClipPlane (void)
 
void showClipPlaneHandles (void)
 
void hideClipPlaneHandles (void)
 
void setCursorText (const std::string &text)
 
void setFreezeWorkingPlane (bool flag)
 
bool getFreezeWorkingPlane ()
 
 Viewer (const int left, const int top, const int width, const int height)
 
Vieweroperator<< (const TopoDS_Shape &shape)
 
void AddShape (const TopoDS_Shape &shape)
 
void StartMessageLoop ()
 Starts message loop.
 

Protected Member Functions

virtual void paintGL () override
 
virtual void resizeGL (int width, int height) override
 
virtual void initializeGL () override
 
virtual void mouseDoubleClickEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void leaveEvent (QEvent *event) override
 
virtual void enterEvent (QEnterEvent *event) override
 
virtual void wheelEvent (QWheelEvent *event) override
 
virtual bool event (QEvent *evnt) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void keyReleaseEvent (QKeyEvent *event) override
 

Detailed Description

Simple 3D viewer.

Constructor & Destructor Documentation

◆ Viewer() [1/3]

Viewer::Viewer ( )
delete

◆ Viewer() [2/3]

Viewer::Viewer ( ot::UID modelID,
ot::UID viewerID,
double scaleWidth,
double scaleHeight,
int backgroundR,
int backgroundG,
int backgroundB,
int overlayTextR,
int overlayTextG,
int overlayTextB )

◆ ~Viewer()

Viewer::~Viewer ( )
virtual

◆ Viewer() [3/3]

Viewer::Viewer ( const int left,
const int top,
const int width,
const int height )

Member Function Documentation

◆ addHandler()

void Viewer::addHandler ( HandlerBase * handler)

◆ AddShape()

void Viewer::AddShape ( const TopoDS_Shape & shape)

◆ axisCrossSettingsItemChanged()

bool Viewer::axisCrossSettingsItemChanged ( const std::string & _logicalName,
const ot::Property * _item,
bool & _settingsUpdateRequired )

◆ cancelRubberband()

void Viewer::cancelRubberband ( void )

◆ createRubberband()

void Viewer::createRubberband ( ot::serviceID_t _senderId,
std::string & _note,
const std::string & _configurationJson )

◆ detachFromModel()

void Viewer::detachFromModel ( void )

◆ disableClipPlane()

void Viewer::disableClipPlane ( void )

◆ displaySettingsItemChanged()

bool Viewer::displaySettingsItemChanged ( const std::string & _logicalName,
const ot::Property * _item,
bool & _settingsUpdateRequired )

◆ enableClipPlane()

void Viewer::enableClipPlane ( osg::Vec3d normal,
osg::Vec3d point )

◆ enterEvent()

void Viewer::enterEvent ( QEnterEvent * event)
overrideprotectedvirtual

◆ event()

bool Viewer::event ( QEvent * evnt)
overrideprotectedvirtual

◆ finishRubberbandExecution()

void Viewer::finishRubberbandExecution ( void )

◆ freeze3DView()

void Viewer::freeze3DView ( bool flag)

◆ geometrySettingsItemChanged()

bool Viewer::geometrySettingsItemChanged ( const std::string & _logicalName,
const ot::Property * _item,
bool & _settingsUpdateRequired )

◆ get1DPlot()

ot::PlotManagerView * Viewer::get1DPlot ( void ) const
inline

◆ getCurrentHandler()

HandlerBase * Viewer::getCurrentHandler ( void )
inline

◆ getFreezeWorkingPlane()

bool Viewer::getFreezeWorkingPlane ( )
inline

◆ getModel()

Model * Viewer::getModel ( void )
inline

◆ getRubberband()

Rubberband * Viewer::getRubberband ( void )
inline

◆ getViewerID()

ot::UID Viewer::getViewerID ( void )
inline

◆ getWorkingPlaneTransform()

osg::Matrix Viewer::getWorkingPlaneTransform ( void )

◆ hasHandlers()

bool Viewer::hasHandlers ( void )
inline

◆ hideClipPlaneHandles()

void Viewer::hideClipPlaneHandles ( void )

◆ initializeGL()

void Viewer::initializeGL ( )
overrideprotectedvirtual

◆ keyPressEvent()

void Viewer::keyPressEvent ( QKeyEvent * event)
overrideprotectedvirtual

◆ keyReleaseEvent()

void Viewer::keyReleaseEvent ( QKeyEvent * event)
overrideprotectedvirtual

◆ leaveEvent()

void Viewer::leaveEvent ( QEvent * event)
overrideprotectedvirtual

◆ mouseDoubleClickEvent()

void Viewer::mouseDoubleClickEvent ( QMouseEvent * event)
overrideprotectedvirtual

◆ mouseMoveEvent()

void Viewer::mouseMoveEvent ( QMouseEvent * event)
overrideprotectedvirtual

◆ mousePressEvent()

void Viewer::mousePressEvent ( QMouseEvent * event)
overrideprotectedvirtual

◆ mouseReleaseEvent()

void Viewer::mouseReleaseEvent ( QMouseEvent * event)
overrideprotectedvirtual

◆ operator<<()

Viewer & Viewer::operator<< ( const TopoDS_Shape & shape)
inline

◆ paintGL()

void Viewer::paintGL ( )
overrideprotectedvirtual

◆ processHoverViewHandlers()

void Viewer::processHoverViewHandlers ( osgUtil::LineSegmentIntersector * intersector)

◆ propertyGridValueChanged()

bool Viewer::propertyGridValueChanged ( const ot::Property * _property)

◆ refresh()

void Viewer::refresh ( bool _ignoreUpdateSettingsRequest = true)

◆ removeHandler()

void Viewer::removeHandler ( HandlerBase * handler)

◆ removeOverlay()

void Viewer::removeOverlay ( void )

◆ reset()

void Viewer::reset ( )

◆ reset1DPlotItemSelection()

void Viewer::reset1DPlotItemSelection ( void )

◆ resizeGL()

void Viewer::resizeGL ( int width,
int height )
overrideprotectedvirtual

◆ set1DPlotItemSelected()

void Viewer::set1DPlotItemSelected ( unsigned long long treeItemID,
bool controlPressed )

◆ setClearColorAutomatic()

void Viewer::setClearColorAutomatic ( int backgroundR,
int backgroundG,
int backgroundB,
int foregroundR,
int foregroundG,
int foregroundB )

◆ setCursorText()

void Viewer::setCursorText ( const std::string & text)

◆ setFreezeWorkingPlane()

void Viewer::setFreezeWorkingPlane ( bool flag)
inline

◆ setLightSourceDistance()

void Viewer::setLightSourceDistance ( const std::string & value)

◆ setOverlayText()

void Viewer::setOverlayText ( const std::string & text)

◆ setTabNames()

void Viewer::setTabNames ( const std::string & _osgViewTabName,
const std::string & _plotTabName,
const std::string & _versionGraphTabName )

◆ settingsItemChanged()

void Viewer::settingsItemChanged ( const ot::Property * _property)

◆ setWorkingPlaneTransform()

void Viewer::setWorkingPlaneTransform ( osg::Matrix matrix)

◆ showClipPlaneHandles()

void Viewer::showClipPlaneHandles ( void )

◆ StartMessageLoop()

void Viewer::StartMessageLoop ( )

Starts message loop.

◆ toggleAxisCross()

void Viewer::toggleAxisCross ( void )

◆ toggleCenterAxisCross()

void Viewer::toggleCenterAxisCross ( void )

◆ toggleCutplane()

void Viewer::toggleCutplane ( void )

◆ toggleWorkingPlane()

void Viewer::toggleWorkingPlane ( void )

◆ updateClipPlane()

void Viewer::updateClipPlane ( osg::Vec3d normal,
osg::Vec3d point )

◆ wheelEvent()

void Viewer::wheelEvent ( QWheelEvent * event)
overrideprotectedvirtual

◆ workingPlaneSettingsItemChanged()

bool Viewer::workingPlaneSettingsItemChanged ( const std::string & _logicalName,
const ot::Property * _item,
bool & _settingsUpdateRequired )

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