Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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,
StatesMap
InteractionStyle2StatesMap
 
typedef QMap< InteractionStyle,
ButtonsMap
InteractionStyle2ButtonsMap
 

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 trihedronActivated () const
 returns true if 3d Trihedron in viewer was created More...
 
void toggleTrihedron ()
 
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 ()
 
virtual OCCViewer_ViewWindowcreateSubWindow ()
 
 Handle (V3d_Viewer) getViewer3d() const
 
 Handle (AIS_InteractiveContext) getAISContext() const
 
 Handle (AIS_Trihedron) getTrihedron() const
 
int getTopLayerId ()
 
int interactionStyle () const
 
void setInteractionStyle (const int)
 
int projectionType () const
 
void setProjectionType (const int)
 
int stereoType () const
 
void setStereoType (const int)
 
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_Trihedron) myTrihedron
 
 Handle (AIS_InteractiveContext) myAISContext
 

Protected Attributes

int myInteractionStyle
 
int myZoomingStyle
 
int myProjectionType
 
int myStereoType
 
int myAnaglyphFilter
 
int myStereographicFocusType
 
int myInterocularDistanceType
 
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
 
- 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

supported gradient types

Enumerator
HorizontalGradient 
VerticalGradient 
Diagonal1Gradient 
Diagonal2Gradient 
Corner1Gradient 
Corner2Gradient 
Corner3Gradient 
Corner4Gradient 
LastGradient 
anonymous enum

supported stereo types

Enumerator
QuadBufferType 
AnaglyphType 
RowInterlacedType 
ColumnInterlacedType 
ChessBoardType 
SideBySideType 
OverUnderType 

Constructor & Destructor Documentation

OCCViewer_Viewer::~OCCViewer_Viewer ( )
virtual

Destructor

Member Function Documentation

int OCCViewer_Viewer::anaglyphFilter ( ) const
Returns
anaglyph filter

References myAnaglyphFilter.

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

Applies clipping planes to given object objects

References Handle(), and myInternalClipPlanes.

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

References myBackgrounds.

QColor OCCViewer_Viewer::backgroundColor ( ) const

[obsolete]

Returns
background color of viewer
QColor OCCViewer_Viewer::backgroundColor ( int  theViewId) const
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.

QColor OCCViewer_Viewer::clippingColor ( ) const
Returns
clipping color

References myClippingColor.

QString OCCViewer_Viewer::clippingTexture ( ) const
Returns
clipping texture

References myClippingTexture.

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

References myClippingTextureScale.

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

Compute scene size

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(), SUIT_Session::session(), and viewer.

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().

OCCViewer_ViewWindow * OCCViewer_Viewer::createSubWindow ( )
virtual

Reimplemented in SOCC_Viewer.

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().

void OCCViewer_Viewer::deselection ( )
signal
bool OCCViewer_Viewer::enableDrawMode ( bool  on)
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().

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.

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().

OCCViewer_ClippingDlg * OCCViewer_Viewer::getClippingDlg ( ) const

Returns the pointer to the clipping dialog box.

References myClippingDlg.

ClipPlanesList OCCViewer_Viewer::getClipPlanes ( ) const

Returns the clipping planes applied to the displayed objects.

References myClipPlanes.

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

References myTopLayerId.

virtual QString OCCViewer_Viewer::getType ( ) const
inlinevirtual

Reimplemented from SUIT_ViewModel.

OCCViewer_Viewer::Handle ( V3d_Viewer  ) const
inline
OCCViewer_Viewer::Handle ( AIS_InteractiveContext  ) const
inline
OCCViewer_Viewer::Handle ( AIS_Trihedron  ) const
inline
OCCViewer_Viewer::Handle ( Graphic3d_ClipPlane  ) const
OCCViewer_Viewer::Handle ( V3d_Viewer  )
protected
OCCViewer_Viewer::Handle ( AIS_Trihedron  )
protected
OCCViewer_Viewer::Handle ( AIS_InteractiveContext  )
protected
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
int OCCViewer_Viewer::interactionStyle ( ) const
Returns
interaction style

References myInteractionStyle.

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

References myInterocularDistanceType.

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

References myInterocularDistanceValue.

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

References myDefaultTextureUsed.

bool OCCViewer_Viewer::isInViewer ( const Handle(AIS_InteractiveObject)&  obj,
bool  onlyInViewer = 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)

References obj.

bool OCCViewer_Viewer::isMultiSelectionEnabled ( ) const
inline
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().

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

References myPreselectionEnabled.

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

References myQuadBufferSupport.

bool OCCViewer_Viewer::isReverseStereo ( ) const
Returns
reverse stereo

References myToReverseStereo.

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

References mySelectionEnabled.

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

References myTextureModulated.

bool OCCViewer_Viewer::isTrihedronVisible ( ) const
Returns
true if trihedron is visible
bool OCCViewer_Viewer::isVisible ( const Handle(AIS_InteractiveObject)&  obj)
Returns
true if object is displayed in viewer
Parameters
obj- object to be checked
bool OCCViewer_Viewer::isVSync ( ) const
Returns
V-Sync mode

References myVSyncMode.

void OCCViewer_Viewer::onChangeBackground ( )
protectedslot
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().

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().

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.

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

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

References myStartPnt.

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().

void OCCViewer_Viewer::onViewClosed ( OCCViewer_ViewPort3d )
protectedvirtualslot
void OCCViewer_Viewer::performSelectionChanged ( )

Auxiliary method to emit signal selectionChanged()

References selectionChanged().

int OCCViewer_Viewer::projectionType ( ) const
Returns
projection type

References myProjectionType.

void OCCViewer_Viewer::selectionChanged ( )
signal
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().

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

Sets background data

Parameters
d- new background data
void OCCViewer_Viewer::setBackground ( int  theViewId,
const Qtx::BackgroundData theBackground 
)
void OCCViewer_Viewer::setBackgroundColor ( const QColor &  c)

Sets background color [obsolete]

Parameters
c- new background color
void OCCViewer_Viewer::setBackgroundColor ( int  theViewId,
const QColor &  theColor 
)
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().

void OCCViewer_Viewer::setClippingDlg ( OCCViewer_ClippingDlg theDlg)

Stores pointer to the clipping dialog box.

References myClippingDlg.

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, theTexture, and update().

void OCCViewer_Viewer::setClipPlanes ( ClipPlanesList  theList)
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
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().

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().

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().

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
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.

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().

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().

void OCCViewer_Viewer::setSelected ( const Handle(AIS_InteractiveObject)&  theIO)
inline
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.

void OCCViewer_Viewer::setStaticTrihedronDisplayed ( const bool  on)
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().

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().

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
void OCCViewer_Viewer::setTrihedronShown ( const bool  on)
virtual

Sets visibility state of trihedron

Parameters
on- new state
void OCCViewer_Viewer::setTrihedronSize ( const double  sz,
bool  isRelative = true 
)
virtual

Changes trihedron size

Parameters
sz- new size

References myIsRelative, myTrihedronSize, and updateTrihedron().

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().

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().

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().

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.

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

References myStereographicFocusType.

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

References myStereographicFocusValue.

int OCCViewer_Viewer::stereoType ( ) const
Returns
stereo type

References myStereoType.

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
void OCCViewer_Viewer::toggleTrihedron ( )

Changes visibility of trihedron to opposite

References isTrihedronVisible(), and setTrihedronShown().

bool OCCViewer_Viewer::trihedronActivated ( ) const
inline
bool OCCViewer_Viewer::trihedronRelative ( ) const
inline
double OCCViewer_Viewer::trihedronSize ( ) const
Returns
trihedron size
static QString OCCViewer_Viewer::Type ( )
inlinestatic
bool OCCViewer_Viewer::unHighlightAll ( bool  updateviewer = true,
bool  unselect = true 
)

Unhilights all objects in viewer

Parameters
updateviewer- update current viewer
void OCCViewer_Viewer::update ( )
void OCCViewer_Viewer::updateTrihedron ( )

Update the size of the trihedron

References computeTrihedronSize(), myIsRelative, and myTrihedronSize.

int OCCViewer_Viewer::zoomingStyle ( ) const
Returns
zooming style

References myZoomingStyle.

Member Data Documentation

int OCCViewer_Viewer::myAnaglyphFilter
protected
QVector<Qtx::BackgroundData> OCCViewer_Viewer::myBackgrounds
protected
QColor OCCViewer_Viewer::myClippingColor
protected
OCCViewer_ClippingDlg* OCCViewer_Viewer::myClippingDlg
protected
QString OCCViewer_Viewer::myClippingTexture
protected
double OCCViewer_Viewer::myClippingTextureScale
protected
ClipPlanesList OCCViewer_Viewer::myClipPlanes
protected
QPoint OCCViewer_Viewer::myCurPnt
protected
bool OCCViewer_Viewer::myDefaultTextureUsed
protected
QPoint OCCViewer_Viewer::myEndPnt
protected
int OCCViewer_Viewer::myInteractionStyle
protected
Graphic3d_SequenceOfHClipPlane OCCViewer_Viewer::myInternalClipPlanes
protected
int OCCViewer_Viewer::myInterocularDistanceType
protected
double OCCViewer_Viewer::myInterocularDistanceValue
protected
bool OCCViewer_Viewer::myIsRelative
protected
bool OCCViewer_Viewer::myMultiSelectionEnabled
protected
bool OCCViewer_Viewer::myPreselectionEnabled
protected
int OCCViewer_Viewer::myProjectionType
protected
bool OCCViewer_Viewer::myQuadBufferSupport
protected
bool OCCViewer_Viewer::mySelectionEnabled
protected
QPoint OCCViewer_Viewer::myStartPnt
protected
int OCCViewer_Viewer::myStereographicFocusType
protected
double OCCViewer_Viewer::myStereographicFocusValue
protected
int OCCViewer_Viewer::myStereoType
protected
bool OCCViewer_Viewer::myTextureModulated
protected
int OCCViewer_Viewer::myTopLayerId
protected
bool OCCViewer_Viewer::myToReverseStereo
protected
double OCCViewer_Viewer::myTrihedronSize
protected
bool OCCViewer_Viewer::myVSyncMode
protected
int OCCViewer_Viewer::myZoomingStyle
protected
const Standard_Boolean OCCViewer_Viewer::theIsOn

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