#include <OCCViewer_ViewModel.h>
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_ViewWindow * | createView (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_ViewWindow * | createSubWindow () |
OCCViewer_Fitter * | fitter () 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_ClippingDlg * | getClippingDlg () 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_ViewManager * | getViewManager () 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::BackgroundData > | myBackgrounds |
OCCViewer_ClippingDlg * | myClippingDlg |
ClipPlanesList | myClipPlanes |
Graphic3d_SequenceOfHClipPlane | myInternalClipPlanes |
QColor | myClippingColor |
bool | myDefaultTextureUsed |
QString | myClippingTexture |
bool | myTextureModulated |
double | myClippingTextureScale |
OCCViewer_Fitter * | myFitter |
Protected Attributes inherited from SUIT_ViewModel | |
SUIT_ViewManager * | myViewManager |
Additional Inherited Members | |
Static Public Attributes inherited from SUIT_ViewModel | |
static InteractionStyle2StatesMap | myStateMap |
static InteractionStyle2ButtonsMap | myButtonMap |
anonymous enum |
anonymous enum |
OCCViewer_Viewer::OCCViewer_Viewer | ( | bool | DisplayTrihedron = true | ) |
Constructor
DisplayTrihedron | - is trihedron displayed |
References Handle(), myAnaglyphFilter, myClippingColor, myClippingTexture, myClippingTextureScale, myDefaultTextureUsed, myInteractionStyle, myInterocularDistanceType, myInterocularDistanceValue, myMultiSelectionEnabled, myPreselectionEnabled, myProjectionType, myQuadBufferSupport, mySelectionEnabled, mySelectionStyle, myStereographicFocusType, myStereographicFocusValue, myStereoType, myTextureModulated, myToReverseStereo, myVSyncMode, myZoomingStyle, OCCViewer_ViewWindow::RectStyle, setDefaultLights(), and setViewCubeParamsFromPreferences().
|
virtual |
Destructor
int OCCViewer_Viewer::anaglyphFilter | ( | ) | const |
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 |
Qtx::BackgroundData OCCViewer_Viewer::background | ( | int | theViewId | ) | const |
References myBackgrounds.
QColor OCCViewer_Viewer::backgroundColor | ( | ) | const |
[obsolete]
QColor OCCViewer_Viewer::backgroundColor | ( | int | theViewId | ) | const |
References background(), and Qtx::BackgroundData::color().
|
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 |
References myClippingColor.
QString OCCViewer_Viewer::clippingTexture | ( | ) | const |
References myClippingTexture.
double OCCViewer_Viewer::clippingTextureScale | ( | ) | const |
References myClippingTextureScale.
|
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(), and SUIT_Session::session().
|
virtual |
Builds popup for occ viewer
Reimplemented from SUIT_ViewModel.
References SUIT_ViewManager::getActiveView(), SUIT_ViewModel::myViewManager, onChangeBackground(), and onDumpView().
|
virtual |
Reimplemented in SOCC_Viewer.
|
virtual |
Creates new view window
theDesktop | - main window of application |
Reimplemented from SUIT_ViewModel.
References background(), OCCViewer_ViewFrame::getView(), initView(), OCCViewer_ViewFrame::MAIN_VIEW, and OCCViewer_ViewWindow::setBackground().
|
signal |
bool OCCViewer_Viewer::enableDrawMode | ( | bool | on | ) |
! To be done for view windows
References OCCViewer_ViewWindow::enableDrawMode(), SUIT_ViewManager::getViews(), and SUIT_ViewModel::myViewManager.
void OCCViewer_Viewer::enableMultiselection | ( | bool | isEnable | ) |
Sets multiselection enabled status
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
isEnabled | - new status |
References OCCViewer_ViewWindow::enablePreselection(), SUIT_ViewManager::getViews(), myPreselectionEnabled, and SUIT_ViewModel::myViewManager.
void OCCViewer_Viewer::enableSelection | ( | bool | isEnabled | ) |
Enables/disables selection
isEnabled | - new status |
! To be done for view windows
References OCCViewer_ViewWindow::enableSelection(), SUIT_ViewManager::getViews(), mySelectionEnabled, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::updateEnabledDrawMode().
|
inline |
Returns currently installed fitter.
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 | ) |
theList | - list to be filled with selected objects |
|
inline |
int OCCViewer_Viewer::getTopLayerId | ( | ) |
References myTopLayerId.
|
inlinevirtual |
Reimplemented from SUIT_ViewModel.
|
inline |
|
protected |
|
inline |
|
protected |
|
inline |
|
protected |
|
inline |
|
protected |
OCCViewer_Viewer::Handle | ( | Graphic3d_ClipPlane | ) | const & |
|
inline |
|
protected |
bool OCCViewer_Viewer::highlight | ( | const Handle(AIS_InteractiveObject)& | obj, |
bool | hilight, | ||
bool | update = true |
||
) |
Hilights/unhilights object in viewer
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().
void OCCViewer_Viewer::initView | ( | OCCViewer_ViewWindow * | view | ) |
Start initialization of view window
view | - view window to be initialized |
References anaglyphFilter(), OCCViewer_ViewWindow::enablePreselection(), OCCViewer_ViewWindow::enableSelection(), OCCViewer_ViewWindow::getViewPort(), OCCViewer_ViewWindow::initLayout(), OCCViewer_ViewWindow::initSketchers(), interactionStyle(), interocularDistanceType(), interocularDistanceValue(), isPreselectionEnabled(), isQuadBufferSupport(), isReverseStereo(), isSelectionEnabled(), isVSync(), onViewClosed(), onViewMapped(), projectionType(), selectionStyle(), OCCViewer_ViewWindow::setAnaglyphFilter(), OCCViewer_ViewWindow::setInteractionStyle(), OCCViewer_ViewWindow::setInterocularDistance(), OCCViewer_ViewWindow::setProjectionType(), OCCViewer_ViewWindow::setQuadBufferSupport(), OCCViewer_ViewWindow::setReverseStereo(), OCCViewer_ViewWindow::setSelectionStyle(), OCCViewer_ViewWindow::setStereographicFocus(), OCCViewer_ViewWindow::setStereoType(), OCCViewer_ViewWindow::setVSync(), OCCViewer_ViewWindow::setZoomingStyle(), stereographicFocusType(), stereographicFocusValue(), stereoType(), and zoomingStyle().
int OCCViewer_Viewer::interactionStyle | ( | ) | const |
References myInteractionStyle.
int OCCViewer_Viewer::interocularDistanceType | ( | ) | const |
References myInterocularDistanceType.
double OCCViewer_Viewer::interocularDistanceValue | ( | ) | const |
References myInterocularDistanceValue.
bool OCCViewer_Viewer::isColorScaleVisible | ( | ) | const |
bool OCCViewer_Viewer::isDefaultTextureUsed | ( | ) | const |
References myDefaultTextureUsed.
bool OCCViewer_Viewer::isInViewer | ( | const Handle(AIS_InteractiveObject)& | obj, |
bool | = false |
||
) |
obj | - object to be checked |
onlyInViewer | - search object only in viewer (so object must be displayed) |
|
inline |
void OCCViewer_Viewer::isos | ( | int & | u, |
int & | v | ||
) | const |
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 |
References myPreselectionEnabled.
bool OCCViewer_Viewer::isQuadBufferSupport | ( | ) | const |
References myQuadBufferSupport.
bool OCCViewer_Viewer::isReverseStereo | ( | ) | const |
References myToReverseStereo.
bool OCCViewer_Viewer::isSelectionEnabled | ( | ) | const |
References mySelectionEnabled.
bool OCCViewer_Viewer::isTextureModulated | ( | ) | const |
References myTextureModulated.
bool OCCViewer_Viewer::isTrihedronVisible | ( | ) | const |
bool OCCViewer_Viewer::isViewCubeVisible | ( | ) | const |
bool OCCViewer_Viewer::isVisible | ( | const Handle(AIS_InteractiveObject)& | obj | ) |
obj | - object to be checked |
bool OCCViewer_Viewer::isVSync | ( | ) | const |
References myVSyncMode.
|
protectedslot |
SLOT: called if background color is to be changed changed, passes new color to view port
References OCCViewer_ViewWindow::background(), backgroundData(), SUIT_ViewManager::getActiveView(), QtxBackgroundDialog::getBackground(), Qtx::BackgroundData::isValid(), SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setBackground().
|
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().
|
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().
|
protectedvirtualslot |
SLOT: called on mouse move, processes transformation or hilighting
References OCCViewer_ViewWindow::getViewPort(), Handle(), OCCViewer_ViewPort3d::isBusy(), isPreselectionEnabled(), isSelectionEnabled(), myCurPnt, and mySelectionEnabled.
|
protectedvirtualslot |
SLOT: called on mouse button press, stores current mouse position as start point for transformations
References myStartPnt.
|
protectedvirtualslot |
SLOT: called on mouse button release, finishes transformation or selection
References deselection(), OCCViewer_ViewWindow::getViewPort(), Handle(), isPreselectionEnabled(), myEndPnt, myMultiSelectionEnabled, mySelectionEnabled, myStartPnt, and selectionChanged().
|
protectedvirtualslot |
|
protectedvirtualslot |
void OCCViewer_Viewer::performSelectionChanged | ( | ) |
Auxiliary method to emit signal selectionChanged()
References selectionChanged().
int OCCViewer_Viewer::projectionType | ( | ) | const |
References myProjectionType.
|
signal |
OCCViewer_ViewWindow::SelectionStyle OCCViewer_Viewer::selectionStyle | ( | ) | const |
References mySelectionStyle.
void OCCViewer_Viewer::setAnaglyphFilter | ( | const int | theType | ) |
Sets anaglyph filter
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
d | - new background data |
void OCCViewer_Viewer::setBackground | ( | int | theViewId, |
const Qtx::BackgroundData & | theBackground | ||
) |
References Qtx::BackgroundData::isValid(), and myBackgrounds.
void OCCViewer_Viewer::setBackgroundColor | ( | const QColor & | c | ) |
Sets background color [obsolete]
c | - new background color |
void OCCViewer_Viewer::setBackgroundColor | ( | int | theViewId, |
const QColor & | theColor | ||
) |
References background(), setBackground(), and Qtx::BackgroundData::setColor().
void OCCViewer_Viewer::setClippingColor | ( | const QColor & | theColor | ) |
Sets a color of the clipped region
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
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().
void OCCViewer_Viewer::setClipPlanes | ( | ClipPlanesList | theList | ) |
Applies clipping planes to clippable objects
References Handle(), OCCViewer_ClipPlane::IsOn, myClipPlanes, myInternalClipPlanes, OCCViewer_ClipPlane::OrientationToXYZ(), OCCViewer_ClipPlane::X, OCCViewer_ClipPlane::Y, and OCCViewer_ClipPlane::Z.
void OCCViewer_Viewer::setColor | ( | const Handle(AIS_InteractiveObject)& | obj, |
const QColor & | color, | ||
bool | update = true |
||
) |
Sets color of object
obj | - object to be updated |
color | - new color |
update | - update current viewer |
References OCCViewer::color(), and update().
|
virtual |
void OCCViewer_Viewer::setDefaultLights | ( | ) |
|
inline |
Installs new fitter.
theFitter | a new fitter |
void OCCViewer_Viewer::setInteractionStyle | ( | const int | theStyle | ) |
Sets interaction style: 0 - standard, 1 - keyboard free interaction
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
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
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
theList | - list objects to be selected |
void OCCViewer_Viewer::setProjectionType | ( | const int | theType | ) |
Sets projection type: 0 - orthographic, 1 - perspective
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
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
theReverse | - enable/disable reverse mode |
References SUIT_ViewManager::getViews(), myToReverseStereo, SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::setReverseStereo().
|
inline |
void OCCViewer_Viewer::setSelectionOptions | ( | bool | isPreselectionEnabled, |
bool | isSelectionEnabled | ||
) |
Set number of isolines
u | - u-isolines (first parametric co-ordinate) |
v | - v-isolines (second parametric co-ordinate) |
References isPreselectionEnabled(), isSelectionEnabled(), myPreselectionEnabled, and mySelectionEnabled.
void OCCViewer_Viewer::setSelectionStyle | ( | OCCViewer_ViewWindow::SelectionStyle | theMode | ) |
void OCCViewer_Viewer::setStaticTrihedronDisplayed | ( | const bool | on | ) |
Set the show static trihedron flag
References SUIT_ViewManager::getActiveView(), SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::showStaticTrihedron().
void OCCViewer_Viewer::setStereographicFocus | ( | const int | theType, |
const double | theValue | ||
) |
Sets stereographic focus 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
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
obj | - object to be processed |
trans | - new transparency |
update | - update current viewer |
References update().
|
virtual |
Sets visibility state of trihedron
on | - new state |
|
virtual |
Changes trihedron size
sz | - new size |
References myIsRelative, myTrihedronSize, and updateTrihedron().
void OCCViewer_Viewer::setViewCubeParamsFromPreferences | ( | ) |
Set View Cube parameters from preferences
References QtxResourceMgr::booleanValue(), OCCViewer::color(), QtxResourceMgr::colorValue(), QtxResourceMgr::doubleValue(), isVisible(), SUIT_Session::resourceMgr(), and SUIT_Session::session().
|
virtual |
Sets visibility state of view cube
on | - new state |
|
virtual |
Sets new view manager
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
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)
theStyle | - new zooming style |
! To be done for view windows
References SUIT_ViewManager::getViews(), SUIT_ViewModel::myViewManager, myZoomingStyle, and OCCViewer_ViewWindow::setZoomingStyle().
|
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 |
References myStereographicFocusType.
double OCCViewer_Viewer::stereographicFocusValue | ( | ) | const |
References myStereographicFocusValue.
int OCCViewer_Viewer::stereoType | ( | ) | const |
References myStereoType.
void OCCViewer_Viewer::switchRepresentation | ( | const Handle(AIS_InteractiveObject)& | obj, |
int | mode, | ||
bool | update = true |
||
) |
Changes display mode of object
obj | - object to be processed |
mode | - new display mode |
update | - update current viewer |
References update().
|
inline |
returns true if 3d Trihedron in viewer was created
|
inline |
double OCCViewer_Viewer::trihedronSize | ( | ) | const |
|
inlinestatic |
bool OCCViewer_Viewer::unHighlightAll | ( | bool | updateviewer = true , |
bool | unselect = true |
||
) |
Unhilights all objects in viewer
updateviewer | - update current viewer |
void OCCViewer_Viewer::update | ( | ) |
Updates OCC 3D viewer
References SUIT_ViewManager::getActiveView(), SUIT_ViewModel::myViewManager, and OCCViewer_ViewWindow::updateGravityCoords().
void OCCViewer_Viewer::updateTrihedron | ( | ) |
Update the size of the trihedron
References computeTrihedronSize(), myIsRelative, and myTrihedronSize.
|
inline |
int OCCViewer_Viewer::zoomingStyle | ( | ) | const |
References myZoomingStyle.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const Standard_Boolean OCCViewer_Viewer::theIsOn |