Version: 9.12.0
OCCViewer_Viewer Class Reference

#include <OCCViewer_ViewModel.h>

Inheritance diagram for OCCViewer_Viewer:
Inheritance graph

Public Types

enum  {
  HorizontalGradient , VerticalGradient , Diagonal1Gradient , Diagonal2Gradient ,
  Corner1Gradient , Corner2Gradient , Corner3Gradient , Corner4Gradient ,
  LastGradient = Corner4Gradient
}
 
enum  {
  QuadBufferType , AnaglyphType , RowInterlacedType , ColumnInterlacedType ,
  ChessBoardType , SideBySideType , OverUnderType
}
 
- Public Types inherited from SUIT_ViewModel
enum  HotOperation { PAN , ZOOM , ROTATE , FIT_AREA }
 
enum  InteractionStyle { STANDARD , KEY_FREE }
 
typedef QMap< HotOperation, Qt::KeyboardModifiers > StatesMap
 
typedef QMap< HotOperation, Qt::MouseButtons > ButtonsMap
 
typedef QMap< InteractionStyle, StatesMapInteractionStyle2StatesMap
 
typedef QMap< InteractionStyle, ButtonsMapInteractionStyle2ButtonsMap
 

Signals

void selectionChanged ()
 
void deselection ()
 

Public Member Functions

 OCCViewer_Viewer (bool DisplayTrihedron=true)
 
virtual ~OCCViewer_Viewer ()
 
void update ()
 
virtual SUIT_ViewWindowcreateView (SUIT_Desktop *theDesktop)
 
virtual void setViewManager (SUIT_ViewManager *theViewManager)
 
virtual QString getType () const
 
virtual void contextMenuPopup (QMenu *)
 
void getSelectedObjects (AIS_ListOfInteractive &theList)
 
void setObjectsSelected (const AIS_ListOfInteractive &theList)
 
void setSelected (const Handle(AIS_InteractiveObject)&theIO)
 
void performSelectionChanged ()
 
void setDefaultLights ()
 
QColor backgroundColor () const
 
void setBackgroundColor (const QColor &)
 
Qtx::BackgroundData background () const
 
void setBackground (const Qtx::BackgroundData &)
 
QColor backgroundColor (int theViewId) const
 
void setBackgroundColor (int theViewId, const QColor &)
 
Qtx::BackgroundData background (int theViewId) const
 
void setBackground (int theViewId, const Qtx::BackgroundData &)
 
bool isColorScaleVisible () const
 
virtual void setColorScaleShown (const bool)
 
bool trihedronActivated () const
 returns true if 3d Trihedron in viewer was created More...
 
bool isTrihedronVisible () const
 
virtual void setTrihedronShown (const bool)
 
double trihedronSize () const
 
virtual void setTrihedronSize (const double, bool isRelative=true)
 
bool trihedronRelative () const
 
bool computeTrihedronSize (double &theNewSize, double &theSize)
 
virtual double computeSceneSize (const Handle(V3d_View)&) const
 
void updateTrihedron ()
 
bool viewCubeActivated () const
 
bool isViewCubeVisible () const
 
virtual void setViewCubeShown (const bool)
 
void setViewCubeParamsFromPreferences ()
 
virtual OCCViewer_ViewWindowcreateSubWindow ()
 
OCCViewer_Fitterfitter () const
 Returns currently installed fitter. More...
 
void setFitter (OCCViewer_Fitter *theFitter)
 Installs new fitter. More...
 
 Handle (V3d_Viewer) getViewer3d() const
 
 Handle (AIS_InteractiveContext) getAISContext() const
 
 Handle (AIS_ColorScale) getColorScale() const
 
 Handle (AIS_Trihedron) getTrihedron() const
 
 Handle (AIS_ViewCube) getViewCube() const
 
int getTopLayerId ()
 
int interactionStyle () const
 
void setInteractionStyle (const int)
 
int projectionType () const
 
void setProjectionType (const int)
 
int stereoType () const
 
void setStereoType (const int)
 
OCCViewer_ViewWindow::SelectionStyle selectionStyle () const
 
void setSelectionStyle (OCCViewer_ViewWindow::SelectionStyle)
 
int anaglyphFilter () const
 
void setAnaglyphFilter (const int)
 
void setStereographicFocus (const int, const double)
 
int stereographicFocusType () const
 
double stereographicFocusValue () const
 
void setInterocularDistance (const int, const double)
 
int interocularDistanceType () const
 
double interocularDistanceValue () const
 
bool isReverseStereo () const
 
void setReverseStereo (const bool)
 
bool isVSync () const
 
void setVSync (const bool)
 
bool isQuadBufferSupport () const
 
void setQuadBufferSupport (const bool)
 
int zoomingStyle () const
 
void setZoomingStyle (const int)
 
void enablePreselection (bool isEnabled)
 
bool isPreselectionEnabled () const
 
void enableSelection (bool isEnabled)
 
bool isSelectionEnabled () const
 
void setSelectionOptions (bool, bool)
 
void enableMultiselection (bool isEnable)
 
bool isMultiSelectionEnabled () const
 
bool enableDrawMode (bool on)
 
void setClippingColor (const QColor &)
 
QColor clippingColor () const
 
void setClippingTextureParams (const bool, const QString &, const bool, const double)
 
bool isDefaultTextureUsed () const
 
QString clippingTexture () const
 
bool isTextureModulated () const
 
double clippingTextureScale () const
 
int getSelectionCount () const
 
void setStaticTrihedronDisplayed (const bool on)
 
 Handle (Graphic3d_ClipPlane) createClipPlane(const gp_Pln &thePlane
 
void setClipPlanes (ClipPlanesList theList)
 
ClipPlanesList getClipPlanes () const
 
void applyExistingClipPlanesToObject (const Handle(AIS_InteractiveObject)&theObject)
 
OCCViewer_ClippingDlggetClippingDlg () const
 
void setClippingDlg (OCCViewer_ClippingDlg *theDlg)
 
bool highlight (const Handle(AIS_InteractiveObject)&, bool, bool=true)
 
bool unHighlightAll (bool=true, bool=true)
 
bool isInViewer (const Handle(AIS_InteractiveObject)&, bool=false)
 
bool isVisible (const Handle(AIS_InteractiveObject)&)
 
void setColor (const Handle(AIS_InteractiveObject)&, const QColor &, bool=true)
 
void switchRepresentation (const Handle(AIS_InteractiveObject)&, int, bool=true)
 
void setTransparency (const Handle(AIS_InteractiveObject)&, float, bool=true)
 
void setIsos (const int u, const int v)
 
void isos (int &u, int &v) const
 
void initView (OCCViewer_ViewWindow *view)
 
- Public Member Functions inherited from SUIT_ViewModel
 SUIT_ViewModel ()
 
virtual ~SUIT_ViewModel ()
 
SUIT_ViewManagergetViewManager () const
 

Static Public Member Functions

static QString Type ()
 
static QString backgroundData (QStringList &, QIntList &, QIntList &)
 
static void stereoData (QStringList &, QIntList &)
 
- Static Public Member Functions inherited from SUIT_ViewModel
static void setHotButton (InteractionStyle theInteractionStyle, HotOperation theOper, Qt::KeyboardModifiers theState, Qt::MouseButtons theButton)
 
static void getHotButton (InteractionStyle theInteractionStyle, HotOperation theOper, Qt::KeyboardModifiers &theState, Qt::MouseButtons &theButton)
 

Public Attributes

const Standard_Boolean theIsOn
 

Protected Slots

virtual void onMousePress (SUIT_ViewWindow *, QMouseEvent *)
 
virtual void onMouseMove (SUIT_ViewWindow *, QMouseEvent *)
 
virtual void onMouseRelease (SUIT_ViewWindow *, QMouseEvent *)
 
virtual void onKeyPress (SUIT_ViewWindow *, QKeyEvent *)
 
virtual void onViewClosed (OCCViewer_ViewPort3d *)
 
virtual void onViewMapped (OCCViewer_ViewPort3d *)
 
void onDumpView ()
 
void onChangeBackground ()
 

Protected Member Functions

 Handle (V3d_Viewer) myV3dViewer
 
 Handle (AIS_ColorScale) myColorScale
 
 Handle (AIS_Trihedron) myTrihedron
 
 Handle (AIS_ViewCube) myViewCube
 
 Handle (AIS_InteractiveContext) myAISContext
 

Protected Attributes

int myInteractionStyle
 
int myZoomingStyle
 
int myProjectionType
 
int myStereoType
 
int myAnaglyphFilter
 
int myStereographicFocusType
 
int myInterocularDistanceType
 
OCCViewer_ViewWindow::SelectionStyle mySelectionStyle
 
double myStereographicFocusValue
 
double myInterocularDistanceValue
 
bool myPreselectionEnabled
 
bool mySelectionEnabled
 
bool myMultiSelectionEnabled
 
bool myIsRelative
 
bool myToReverseStereo
 
bool myVSyncMode
 
bool myQuadBufferSupport
 
int myTopLayerId
 
QPoint myStartPnt
 
QPoint myEndPnt
 
QPoint myCurPnt
 
double myTrihedronSize
 
QVector< Qtx::BackgroundDatamyBackgrounds
 
OCCViewer_ClippingDlgmyClippingDlg
 
ClipPlanesList myClipPlanes
 
Graphic3d_SequenceOfHClipPlane myInternalClipPlanes
 
QColor myClippingColor
 
bool myDefaultTextureUsed
 
QString myClippingTexture
 
bool myTextureModulated
 
double myClippingTextureScale
 
OCCViewer_FittermyFitter
 
- Protected Attributes inherited from SUIT_ViewModel
SUIT_ViewManagermyViewManager
 

Additional Inherited Members

- Static Public Attributes inherited from SUIT_ViewModel
static InteractionStyle2StatesMap myStateMap
 
static InteractionStyle2ButtonsMap myButtonMap
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

supported gradient types

Enumerator
HorizontalGradient 
VerticalGradient 
Diagonal1Gradient 
Diagonal2Gradient 
Corner1Gradient 
Corner2Gradient 
Corner3Gradient 
Corner4Gradient 
LastGradient 

◆ anonymous enum

anonymous enum

supported stereo types

Enumerator
QuadBufferType 
AnaglyphType 
RowInterlacedType 
ColumnInterlacedType 
ChessBoardType 
SideBySideType 
OverUnderType 

Constructor & Destructor Documentation

◆ OCCViewer_Viewer()

◆ ~OCCViewer_Viewer()

OCCViewer_Viewer::~OCCViewer_Viewer ( )
virtual

Destructor

Member Function Documentation

◆ anaglyphFilter()

int OCCViewer_Viewer::anaglyphFilter ( ) const
Returns
anaglyph filter

References myAnaglyphFilter.

◆ applyExistingClipPlanesToObject()

void OCCViewer_Viewer::applyExistingClipPlanesToObject ( const Handle(AIS_InteractiveObject)&  theObject)

Applies clipping planes to given object objects

References Handle(), and myInternalClipPlanes.

◆ background() [1/2]

Qtx::BackgroundData OCCViewer_Viewer::background ( ) const
Returns
background data of viewer

◆ background() [2/2]

Qtx::BackgroundData OCCViewer_Viewer::background ( int  theViewId) const

References myBackgrounds.

◆ backgroundColor() [1/2]

QColor OCCViewer_Viewer::backgroundColor ( ) const

[obsolete]

Returns
background color of viewer

◆ backgroundColor() [2/2]

QColor OCCViewer_Viewer::backgroundColor ( int  theViewId) const

◆ backgroundData()

QString OCCViewer_Viewer::backgroundData ( QStringList &  gradList,
QIntList idList,
QIntList txtList 
)
static

Get data for supported background modes: gradient types, identifiers and supported image formats

References Qtx::CenterTexture, Corner1Gradient, Corner2Gradient, Corner3Gradient, Corner4Gradient, Diagonal1Gradient, Diagonal2Gradient, HorizontalGradient, Qtx::StretchTexture, Qtx::TileTexture, and VerticalGradient.

◆ clippingColor()

QColor OCCViewer_Viewer::clippingColor ( ) const
Returns
clipping color

References myClippingColor.

◆ clippingTexture()

QString OCCViewer_Viewer::clippingTexture ( ) const
Returns
clipping texture

References myClippingTexture.

◆ clippingTextureScale()

double OCCViewer_Viewer::clippingTextureScale ( ) const
Returns
scale factor of texture

References myClippingTextureScale.

◆ computeSceneSize()

double OCCViewer_Viewer::computeSceneSize ( const Handle(V3d_View)&  view3d) const
virtual

Compute scene size

◆ computeTrihedronSize()

bool OCCViewer_Viewer::computeTrihedronSize ( double &  theNewSize,
double &  theSize 
)

Get new and current trihedron size corresponding to the current model size

References computeSceneSize(), QtxResourceMgr::doubleValue(), EPS, Handle(), SUIT_Session::resourceMgr(), and SUIT_Session::session().

◆ contextMenuPopup()

void OCCViewer_Viewer::contextMenuPopup ( QMenu thePopup)
virtual

Builds popup for occ viewer

Reimplemented from SUIT_ViewModel.

References SUIT_ViewManager::getActiveView(), SUIT_ViewModel::myViewManager, onChangeBackground(), and onDumpView().

◆ createSubWindow()

OCCViewer_ViewWindow * OCCViewer_Viewer::createSubWindow ( )
virtual

Reimplemented in SOCC_Viewer.

◆ createView()

SUIT_ViewWindow * OCCViewer_Viewer::createView ( SUIT_Desktop theDesktop)
virtual

Creates new view window

Parameters
theDesktop- main window of application

Reimplemented from SUIT_ViewModel.

References background(), OCCViewer_ViewFrame::getView(), initView(), OCCViewer_ViewFrame::MAIN_VIEW, and OCCViewer_ViewWindow::setBackground().

◆ deselection

void OCCViewer_Viewer::deselection ( )
signal

◆ enableDrawMode()

bool OCCViewer_Viewer::enableDrawMode ( bool  on)

◆ enableMultiselection()

void OCCViewer_Viewer::enableMultiselection ( bool  isEnable)

Sets multiselection enabled status

Parameters
isEnabled- new status

! To be done for view windows

References SUIT_ViewManager::getViews(), myMultiSelectionEnabled, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::updateEnabledDrawMode().

◆ enablePreselection()

void OCCViewer_Viewer::enablePreselection ( bool  isEnabled)

Enables/disables preselection

Parameters
isEnabled- new status

References OCCViewer_ViewWindow::enablePreselection(), SUIT_ViewManager::getViews(), myPreselectionEnabled, and SUIT_ViewModel::myViewManager.

◆ enableSelection()

void OCCViewer_Viewer::enableSelection ( bool  isEnabled)

Enables/disables selection

Parameters
isEnabled- new status

! To be done for view windows

References OCCViewer_ViewWindow::enableSelection(), SUIT_ViewManager::getViews(), mySelectionEnabled, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::updateEnabledDrawMode().

◆ fitter()

OCCViewer_Fitter* OCCViewer_Viewer::fitter ( ) const
inline

Returns currently installed fitter.

◆ getClippingDlg()

OCCViewer_ClippingDlg * OCCViewer_Viewer::getClippingDlg ( ) const

Returns the pointer to the clipping dialog box.

References myClippingDlg.

◆ getClipPlanes()

ClipPlanesList OCCViewer_Viewer::getClipPlanes ( ) const

Returns the clipping planes applied to the displayed objects.

References myClipPlanes.

◆ getSelectedObjects()

void OCCViewer_Viewer::getSelectedObjects ( AIS_ListOfInteractive &  theList)
Returns
objects selected in 3D viewer
Parameters
theList- list to be filled with selected objects

◆ getSelectionCount()

int OCCViewer_Viewer::getSelectionCount ( ) const
inline

◆ getTopLayerId()

int OCCViewer_Viewer::getTopLayerId ( )

References myTopLayerId.

◆ getType()

virtual QString OCCViewer_Viewer::getType ( ) const
inlinevirtual

Reimplemented from SUIT_ViewModel.

◆ Handle() [1/11]

OCCViewer_Viewer::Handle ( AIS_ColorScale  ) const
inline

◆ Handle() [2/11]

OCCViewer_Viewer::Handle ( AIS_ColorScale  )
protected

◆ Handle() [3/11]

OCCViewer_Viewer::Handle ( AIS_InteractiveContext  ) const
inline

◆ Handle() [4/11]

OCCViewer_Viewer::Handle ( AIS_InteractiveContext  )
protected

◆ Handle() [5/11]

OCCViewer_Viewer::Handle ( AIS_Trihedron  ) const
inline

◆ Handle() [6/11]

OCCViewer_Viewer::Handle ( AIS_Trihedron  )
protected

◆ Handle() [7/11]

OCCViewer_Viewer::Handle ( AIS_ViewCube  ) const
inline

◆ Handle() [8/11]

OCCViewer_Viewer::Handle ( AIS_ViewCube  )
protected

◆ Handle() [9/11]

OCCViewer_Viewer::Handle ( Graphic3d_ClipPlane  ) const &

◆ Handle() [10/11]

OCCViewer_Viewer::Handle ( V3d_Viewer  ) const
inline

◆ Handle() [11/11]

OCCViewer_Viewer::Handle ( V3d_Viewer  )
protected

◆ highlight()

bool OCCViewer_Viewer::highlight ( const Handle(AIS_InteractiveObject)&  obj,
bool  hilight,
bool  update = true 
)

Hilights/unhilights object in viewer

Parameters
obj- object to be updated
hilight- if it is true, object will be hilighted, otherwise it will be unhilighted
update- update current viewer

References update().

◆ initView()

◆ interactionStyle()

int OCCViewer_Viewer::interactionStyle ( ) const
Returns
interaction style

References myInteractionStyle.

◆ interocularDistanceType()

int OCCViewer_Viewer::interocularDistanceType ( ) const
Returns
stereographic focus type

References myInterocularDistanceType.

◆ interocularDistanceValue()

double OCCViewer_Viewer::interocularDistanceValue ( ) const
Returns
stereographic focus value

References myInterocularDistanceValue.

◆ isColorScaleVisible()

bool OCCViewer_Viewer::isColorScaleVisible ( ) const

◆ isDefaultTextureUsed()

bool OCCViewer_Viewer::isDefaultTextureUsed ( ) const
Returns
true if default texture is used

References myDefaultTextureUsed.

◆ isInViewer()

bool OCCViewer_Viewer::isInViewer ( const Handle(AIS_InteractiveObject)&  obj,
bool  = false 
)
Returns
true if object is in viewer or in collector
Parameters
obj- object to be checked
onlyInViewer- search object only in viewer (so object must be displayed)

◆ isMultiSelectionEnabled()

bool OCCViewer_Viewer::isMultiSelectionEnabled ( ) const
inline

◆ isos()

void OCCViewer_Viewer::isos ( int &  u,
int &  v 
) const
Returns
number of isolines
Parameters
u- to return u-isolines (first parametric co-ordinate)
v- to return v-isolines (second parametric co-ordinate)

References Handle().

◆ isPreselectionEnabled()

bool OCCViewer_Viewer::isPreselectionEnabled ( ) const
Returns
true if preselection is enabled

References myPreselectionEnabled.

◆ isQuadBufferSupport()

bool OCCViewer_Viewer::isQuadBufferSupport ( ) const
Returns
support quad-buffered stereo

References myQuadBufferSupport.

◆ isReverseStereo()

bool OCCViewer_Viewer::isReverseStereo ( ) const
Returns
reverse stereo

References myToReverseStereo.

◆ isSelectionEnabled()

bool OCCViewer_Viewer::isSelectionEnabled ( ) const
Returns
true if selection is enabled

References mySelectionEnabled.

◆ isTextureModulated()

bool OCCViewer_Viewer::isTextureModulated ( ) const
Returns
true if texture is modulated

References myTextureModulated.

◆ isTrihedronVisible()

bool OCCViewer_Viewer::isTrihedronVisible ( ) const
Returns
true if trihedron is visible

◆ isViewCubeVisible()

bool OCCViewer_Viewer::isViewCubeVisible ( ) const
Returns
true if view cube is visible

◆ isVisible()

bool OCCViewer_Viewer::isVisible ( const Handle(AIS_InteractiveObject)&  obj)
Returns
true if object is displayed in viewer
Parameters
obj- object to be checked

◆ isVSync()

bool OCCViewer_Viewer::isVSync ( ) const
Returns
V-Sync mode

References myVSyncMode.

◆ onChangeBackground

void OCCViewer_Viewer::onChangeBackground ( )
protectedslot

◆ onDumpView

void OCCViewer_Viewer::onDumpView ( )
protectedslot

SLOT: called on dump view operation is activated, stores scene to raster file

References SUIT_ViewManager::getActiveView(), SUIT_ViewModel::myViewManager, and SUIT_ViewWindow::onDumpView().

◆ onKeyPress

void OCCViewer_Viewer::onKeyPress ( SUIT_ViewWindow theWindow,
QKeyEvent *  theEvent 
)
protectedvirtualslot

SLOT: called on key press, processes selection in "key free" interaction style

References deselection(), OCCViewer_ViewWindow::getViewPort(), Handle(), isPreselectionEnabled(), myCurPnt, myMultiSelectionEnabled, mySelectionEnabled, and selectionChanged().

◆ onMouseMove

void OCCViewer_Viewer::onMouseMove ( SUIT_ViewWindow theWindow,
QMouseEvent *  theEvent 
)
protectedvirtualslot

SLOT: called on mouse move, processes transformation or hilighting

References OCCViewer_ViewWindow::getViewPort(), Handle(), OCCViewer_ViewPort3d::isBusy(), isPreselectionEnabled(), isSelectionEnabled(), myCurPnt, and mySelectionEnabled.

◆ onMousePress

void OCCViewer_Viewer::onMousePress ( SUIT_ViewWindow ,
QMouseEvent *  theEvent 
)
protectedvirtualslot

SLOT: called on mouse button press, stores current mouse position as start point for transformations

References myStartPnt.

◆ onMouseRelease

void OCCViewer_Viewer::onMouseRelease ( SUIT_ViewWindow theWindow,
QMouseEvent *  theEvent 
)
protectedvirtualslot

SLOT: called on mouse button release, finishes transformation or selection

References deselection(), OCCViewer_ViewWindow::getViewPort(), Handle(), isPreselectionEnabled(), myEndPnt, myMultiSelectionEnabled, mySelectionEnabled, myStartPnt, and selectionChanged().

◆ onViewClosed

void OCCViewer_Viewer::onViewClosed ( OCCViewer_ViewPort3d )
protectedvirtualslot

◆ onViewMapped

◆ performSelectionChanged()

void OCCViewer_Viewer::performSelectionChanged ( )

Auxiliary method to emit signal selectionChanged()

References selectionChanged().

◆ projectionType()

int OCCViewer_Viewer::projectionType ( ) const
Returns
projection type

References myProjectionType.

◆ selectionChanged

void OCCViewer_Viewer::selectionChanged ( )
signal

◆ selectionStyle()

OCCViewer_ViewWindow::SelectionStyle OCCViewer_Viewer::selectionStyle ( ) const

References mySelectionStyle.

◆ setAnaglyphFilter()

void OCCViewer_Viewer::setAnaglyphFilter ( const int  theType)

Sets anaglyph filter

Parameters
theType- new anaglyph filter

References SUIT_ViewManager::getViews(), myAnaglyphFilter, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setAnaglyphFilter().

◆ setBackground() [1/2]

void OCCViewer_Viewer::setBackground ( const Qtx::BackgroundData theBackground)

Sets background data

Parameters
d- new background data

◆ setBackground() [2/2]

void OCCViewer_Viewer::setBackground ( int  theViewId,
const Qtx::BackgroundData theBackground 
)

◆ setBackgroundColor() [1/2]

void OCCViewer_Viewer::setBackgroundColor ( const QColor &  c)

Sets background color [obsolete]

Parameters
c- new background color

◆ setBackgroundColor() [2/2]

void OCCViewer_Viewer::setBackgroundColor ( int  theViewId,
const QColor &  theColor 
)

◆ setClippingColor()

void OCCViewer_Viewer::setClippingColor ( const QColor &  theColor)

Sets a color of the clipped region

Parameters
theColor- a new color of the clipped region

References myClippingColor, myInternalClipPlanes, and update().

◆ setClippingDlg()

void OCCViewer_Viewer::setClippingDlg ( OCCViewer_ClippingDlg theDlg)

Stores pointer to the clipping dialog box.

References myClippingDlg.

◆ setClippingTextureParams()

void OCCViewer_Viewer::setClippingTextureParams ( const bool  isDefault,
const QString &  theTexture,
const bool  isModulate,
const double  theScale 
)

Sets default texture parameters

Parameters
isDefault- use/non-use default texture
theTexture- new texture of the clipped region
isModulate- enable/disable texture modulate mode
theScale- scale factor.

References aTexture, Handle(), isModulate, myClippingTexture, myClippingTextureScale, myDefaultTextureUsed, myInternalClipPlanes, myTextureModulated, theScale, theTexture, and update().

◆ setClipPlanes()

void OCCViewer_Viewer::setClipPlanes ( ClipPlanesList  theList)

◆ setColor()

void OCCViewer_Viewer::setColor ( const Handle(AIS_InteractiveObject)&  obj,
const QColor &  color,
bool  update = true 
)

Sets color of object

Parameters
obj- object to be updated
color- new color
update- update current viewer

References OCCViewer::color(), and update().

◆ setColorScaleShown()

void OCCViewer_Viewer::setColorScaleShown ( const bool  on)
virtual

◆ setDefaultLights()

◆ setFitter()

void OCCViewer_Viewer::setFitter ( OCCViewer_Fitter theFitter)
inline

Installs new fitter.

Parameters
theFittera new fitter

◆ setInteractionStyle()

void OCCViewer_Viewer::setInteractionStyle ( const int  theStyle)

Sets interaction style: 0 - standard, 1 - keyboard free interaction

Parameters
theStyle- new interaction style

! To be done for view windows

References SUIT_ViewManager::getViews(), myInteractionStyle, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setInteractionStyle().

◆ setInterocularDistance()

void OCCViewer_Viewer::setInterocularDistance ( const int  theType,
const double  theValue 
)

Sets interocular distance parameters

Parameters
theType- new IOD type
theValue- new IOD value

References SUIT_ViewManager::getViews(), myInterocularDistanceType, myInterocularDistanceValue, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setInterocularDistance().

◆ setIsos()

void OCCViewer_Viewer::setIsos ( const int  u,
const int  v 
)

Set number of isolines

Parameters
u- u-isolines (first parametric co-ordinate)
v- v-isolines (second parametric co-ordinate)

References Handle().

◆ setObjectsSelected()

void OCCViewer_Viewer::setObjectsSelected ( const AIS_ListOfInteractive &  theList)

Selects objects in 3D viewer. Other selected objects are left as selected

Parameters
theList- list objects to be selected

◆ setProjectionType()

void OCCViewer_Viewer::setProjectionType ( const int  theType)

Sets projection type: 0 - orthographic, 1 - perspective

Parameters
theType- new projection type

References SUIT_ViewManager::getViews(), myProjectionType, SUIT_ViewModel::myViewManager, OCCViewer_ViewWindow::setProjectionType(), and OCCViewer_ViewWindow::Stereo.

◆ setQuadBufferSupport()

void OCCViewer_Viewer::setQuadBufferSupport ( const bool  theEnable)

Set support quad-buffered stereo

Parameters
theEnable- enable/disable support quad-buffered stereo

References SUIT_ViewManager::getViews(), myQuadBufferSupport, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setQuadBufferSupport().

◆ setReverseStereo()

void OCCViewer_Viewer::setReverseStereo ( const bool  theReverse)

Sets reverse stereo

Parameters
theReverse- enable/disable reverse mode

References SUIT_ViewManager::getViews(), myToReverseStereo, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setReverseStereo().

◆ setSelected()

void OCCViewer_Viewer::setSelected ( const Handle(AIS_InteractiveObject)&  theIO)
inline

◆ setSelectionOptions()

void OCCViewer_Viewer::setSelectionOptions ( bool  isPreselectionEnabled,
bool  isSelectionEnabled 
)

Set number of isolines

Parameters
u- u-isolines (first parametric co-ordinate)
v- v-isolines (second parametric co-ordinate)

References isPreselectionEnabled(), isSelectionEnabled(), myPreselectionEnabled, and mySelectionEnabled.

◆ setSelectionStyle()

◆ setStaticTrihedronDisplayed()

void OCCViewer_Viewer::setStaticTrihedronDisplayed ( const bool  on)

◆ setStereographicFocus()

void OCCViewer_Viewer::setStereographicFocus ( const int  theType,
const double  theValue 
)

Sets stereographic focus parameters

Parameters
theType- new stereographic focus type
theValue- new stereographic focus value

References SUIT_ViewManager::getViews(), myStereographicFocusType, myStereographicFocusValue, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setStereographicFocus().

◆ setStereoType()

void OCCViewer_Viewer::setStereoType ( const int  theType)

Sets stereo type

Parameters
theType- new stereo type

References SUIT_ViewManager::getViews(), myStereoType, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setStereoType().

◆ setTransparency()

void OCCViewer_Viewer::setTransparency ( const Handle(AIS_InteractiveObject)&  obj,
float  trans,
bool  update = true 
)

Changes transparency of object

Parameters
obj- object to be processed
trans- new transparency
update- update current viewer

References update().

◆ setTrihedronShown()

void OCCViewer_Viewer::setTrihedronShown ( const bool  on)
virtual

Sets visibility state of trihedron

Parameters
on- new state

◆ setTrihedronSize()

void OCCViewer_Viewer::setTrihedronSize ( const double  sz,
bool  isRelative = true 
)
virtual

Changes trihedron size

Parameters
sz- new size

References myIsRelative, myTrihedronSize, and updateTrihedron().

◆ setViewCubeParamsFromPreferences()

void OCCViewer_Viewer::setViewCubeParamsFromPreferences ( )

◆ setViewCubeShown()

void OCCViewer_Viewer::setViewCubeShown ( const bool  on)
virtual

Sets visibility state of view cube

Parameters
on- new state

◆ setViewManager()

void OCCViewer_Viewer::setViewManager ( SUIT_ViewManager theViewManager)
virtual

Sets new view manager

Parameters
theViewManager- new view manager

Reimplemented from SUIT_ViewModel.

References onKeyPress(), onMouseMove(), onMousePress(), onMouseRelease(), and SUIT_ViewModel::setViewManager().

◆ setVSync()

void OCCViewer_Viewer::setVSync ( const bool  theEnable)

Set V-Sync mode

Parameters
theEnable- enable/disable V-Sync mode

References SUIT_ViewManager::getViews(), SUIT_ViewModel::myViewManager, myVSyncMode, and OCCViewer_ViewWindow::setVSync().

◆ setZoomingStyle()

void OCCViewer_Viewer::setZoomingStyle ( const int  theStyle)

Sets zooming style: 0 - standard, 1 - advanced (at cursor)

Parameters
theStyle- new zooming style

! To be done for view windows

References SUIT_ViewManager::getViews(), SUIT_ViewModel::myViewManager, myZoomingStyle, and OCCViewer_ViewWindow::setZoomingStyle().

◆ stereoData()

void OCCViewer_Viewer::stereoData ( QStringList &  typeList,
QIntList idList 
)
static

Get data for supported stereo pair modes: stereo types and identifiers

References AnaglyphType, ChessBoardType, ColumnInterlacedType, OverUnderType, QuadBufferType, RowInterlacedType, and SideBySideType.

◆ stereographicFocusType()

int OCCViewer_Viewer::stereographicFocusType ( ) const
Returns
stereographic focus type

References myStereographicFocusType.

◆ stereographicFocusValue()

double OCCViewer_Viewer::stereographicFocusValue ( ) const
Returns
stereographic focus value

References myStereographicFocusValue.

◆ stereoType()

int OCCViewer_Viewer::stereoType ( ) const
Returns
stereo type

References myStereoType.

◆ switchRepresentation()

void OCCViewer_Viewer::switchRepresentation ( const Handle(AIS_InteractiveObject)&  obj,
int  mode,
bool  update = true 
)

Changes display mode of object

Parameters
obj- object to be processed
mode- new display mode
update- update current viewer

References update().

◆ trihedronActivated()

bool OCCViewer_Viewer::trihedronActivated ( ) const
inline

returns true if 3d Trihedron in viewer was created

◆ trihedronRelative()

bool OCCViewer_Viewer::trihedronRelative ( ) const
inline

◆ trihedronSize()

double OCCViewer_Viewer::trihedronSize ( ) const
Returns
trihedron size

◆ Type()

static QString OCCViewer_Viewer::Type ( )
inlinestatic

◆ unHighlightAll()

bool OCCViewer_Viewer::unHighlightAll ( bool  updateviewer = true,
bool  unselect = true 
)

Unhilights all objects in viewer

Parameters
updateviewer- update current viewer

◆ update()

void OCCViewer_Viewer::update ( )

◆ updateTrihedron()

void OCCViewer_Viewer::updateTrihedron ( )

Update the size of the trihedron

References computeTrihedronSize(), myIsRelative, and myTrihedronSize.

◆ viewCubeActivated()

bool OCCViewer_Viewer::viewCubeActivated ( ) const
inline

◆ zoomingStyle()

int OCCViewer_Viewer::zoomingStyle ( ) const
Returns
zooming style

References myZoomingStyle.

Member Data Documentation

◆ myAnaglyphFilter

int OCCViewer_Viewer::myAnaglyphFilter
protected

◆ myBackgrounds

QVector<Qtx::BackgroundData> OCCViewer_Viewer::myBackgrounds
protected

◆ myClippingColor

QColor OCCViewer_Viewer::myClippingColor
protected

◆ myClippingDlg

OCCViewer_ClippingDlg* OCCViewer_Viewer::myClippingDlg
protected

◆ myClippingTexture

QString OCCViewer_Viewer::myClippingTexture
protected

◆ myClippingTextureScale

double OCCViewer_Viewer::myClippingTextureScale
protected

◆ myClipPlanes

ClipPlanesList OCCViewer_Viewer::myClipPlanes
protected

◆ myCurPnt

QPoint OCCViewer_Viewer::myCurPnt
protected

◆ myDefaultTextureUsed

bool OCCViewer_Viewer::myDefaultTextureUsed
protected

◆ myEndPnt

QPoint OCCViewer_Viewer::myEndPnt
protected

◆ myFitter

OCCViewer_Fitter* OCCViewer_Viewer::myFitter
protected

◆ myInteractionStyle

int OCCViewer_Viewer::myInteractionStyle
protected

◆ myInternalClipPlanes

Graphic3d_SequenceOfHClipPlane OCCViewer_Viewer::myInternalClipPlanes
protected

◆ myInterocularDistanceType

int OCCViewer_Viewer::myInterocularDistanceType
protected

◆ myInterocularDistanceValue

double OCCViewer_Viewer::myInterocularDistanceValue
protected

◆ myIsRelative

bool OCCViewer_Viewer::myIsRelative
protected

◆ myMultiSelectionEnabled

bool OCCViewer_Viewer::myMultiSelectionEnabled
protected

◆ myPreselectionEnabled

bool OCCViewer_Viewer::myPreselectionEnabled
protected

◆ myProjectionType

int OCCViewer_Viewer::myProjectionType
protected

◆ myQuadBufferSupport

bool OCCViewer_Viewer::myQuadBufferSupport
protected

◆ mySelectionEnabled

bool OCCViewer_Viewer::mySelectionEnabled
protected

◆ mySelectionStyle

OCCViewer_ViewWindow::SelectionStyle OCCViewer_Viewer::mySelectionStyle
protected

◆ myStartPnt

QPoint OCCViewer_Viewer::myStartPnt
protected

◆ myStereographicFocusType

int OCCViewer_Viewer::myStereographicFocusType
protected

◆ myStereographicFocusValue

double OCCViewer_Viewer::myStereographicFocusValue
protected

◆ myStereoType

int OCCViewer_Viewer::myStereoType
protected

◆ myTextureModulated

bool OCCViewer_Viewer::myTextureModulated
protected

◆ myTopLayerId

int OCCViewer_Viewer::myTopLayerId
protected

◆ myToReverseStereo

bool OCCViewer_Viewer::myToReverseStereo
protected

◆ myTrihedronSize

double OCCViewer_Viewer::myTrihedronSize
protected

◆ myVSyncMode

bool OCCViewer_Viewer::myVSyncMode
protected

◆ myZoomingStyle

int OCCViewer_Viewer::myZoomingStyle
protected

◆ theIsOn

const Standard_Boolean OCCViewer_Viewer::theIsOn

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