Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SOCC_Viewer Class Reference

#include <SOCC_ViewModel.h>

Inheritance diagram for SOCC_Viewer:
Inheritance graph

Public Member Functions

 SOCC_Viewer (bool DisplayTrihedron=true)
 
virtual ~SOCC_Viewer ()
 
bool highlight (const Handle(SALOME_InteractiveObject)&, bool, bool=true)
 
bool isInViewer (const Handle(SALOME_InteractiveObject)&, bool=false)
 
void setColor (const Handle(SALOME_InteractiveObject)&, const QColor &, bool=true)
 
void switchRepresentation (const Handle(SALOME_InteractiveObject)&, int, bool=true)
 
void setTransparency (const Handle(SALOME_InteractiveObject)&, float, bool=true)
 
void rename (const Handle(SALOME_InteractiveObject)&, const QString &)
 
virtual OCCViewer_ViewWindowcreateSubWindow ()
 
virtual void Display (const SALOME_OCCPrs *)
 
virtual void Erase (const SALOME_OCCPrs *, const bool=false)
 
virtual void EraseAll (SALOME_Displayer *, const bool=false)
 
virtual SALOME_PrsCreatePrs (const char *entry=0)
 
virtual void LocalSelection (const SALOME_OCCPrs *, const int)
 
virtual void LocalSelection (const SALOME_OCCPrs *, const std::list< int >)
 
virtual void GlobalSelection (const bool=false) const
 
virtual bool isVisible (const Handle(SALOME_InteractiveObject)&)
 
virtual void GetVisible (SALOME_ListIO &)
 
virtual void Repaint ()
 
- Public Member Functions inherited from OCCViewer_Viewer
 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 ()
 
 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
 
- Public Member Functions inherited from SALOME_View
virtual ~SALOME_View ()
 Destructor. More...
 
void Display (SALOME_Displayer *, const SALOME_Prs *)
 This Display() method should be called to display given presentation created anywhere by anybody. More...
 
void Erase (SALOME_Displayer *, const SALOME_Prs *, const bool=false)
 This Erase() method should be called to erase given presentation created anywhere by anybody. More...
 
void LocalSelection (const SALOME_Prs *, const int)
 This LocalSelection() method should be called to activate sub-shapes selection created anywhere by anybody. More...
 
void LocalSelection (const SALOME_Prs *, const std::list< int >)
 
virtual void Display (const SALOME_VTKPrs *)
 Display SALOME_VTKPrs presentation. More...
 
virtual void Display (const SALOME_Prs2d *)
 Display SALOME_Prs2d presentation. More...
 
virtual void Erase (const SALOME_VTKPrs *, const bool=false)
 Erase SALOME_VTKPrs. More...
 
virtual void Erase (const SALOME_Prs2d *, const bool=false)
 Erase SALOME_Prs2d. More...
 
virtual void LocalSelection (const SALOME_VTKPrs *, const int)
 Local selection SALOME_VTKPrs. More...
 
virtual void LocalSelection (const SALOME_Prs2d *, const int)
 Local selection SALOME_Prs2d. More...
 
virtual void BeforeDisplay (SALOME_Displayer *, const SALOME_Prs *)
 
virtual void AfterDisplay (SALOME_Displayer *, const SALOME_Prs *)
 
virtual void BeforeErase (SALOME_Displayer *, const SALOME_Prs *)
 
virtual void AfterErase (SALOME_Displayer *, const SALOME_Prs *)
 

Public Attributes

std::map< std::string,
std::vector< Handle(AIS_InteractiveObject)> > 
entry2aisobjects
 
- Public Attributes inherited from OCCViewer_Viewer
const Standard_Boolean theIsOn
 

Additional Inherited Members

- Public Types inherited from OCCViewer_Viewer
enum  {
  HorizontalGradient, VerticalGradient, Diagonal1Gradient, Diagonal2Gradient,
  Corner1Gradient, Corner2Gradient, Corner3Gradient, Corner4Gradient,
  LastGradient = Corner4Gradient
}
 
enum  {
  QuadBufferType, AnaglyphType, RowInterlacedType, ColumnInterlacedType,
  ChessBoardType, SideBySideType, OverUnderType
}
 
- Signals inherited from OCCViewer_Viewer
void selectionChanged ()
 
void deselection ()
 
- Static Public Member Functions inherited from OCCViewer_Viewer
static QString Type ()
 
static QString backgroundData (QStringList &, QIntList &, QIntList &)
 
static void stereoData (QStringList &, QIntList &)
 
- Static Public Attributes inherited from SUIT_ViewModel
static InteractionStyle2StatesMap myStateMap
 
static InteractionStyle2ButtonsMap myButtonMap
 
- Protected Slots inherited from OCCViewer_Viewer
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 inherited from OCCViewer_Viewer
 Handle (V3d_Viewer) myV3dViewer
 
 Handle (AIS_Trihedron) myTrihedron
 
 Handle (AIS_InteractiveContext) myAISContext
 
- Protected Attributes inherited from OCCViewer_Viewer
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
 

Constructor & Destructor Documentation

SOCC_Viewer::SOCC_Viewer ( bool  DisplayTrihedron = true)

Constructor

Parameters
DisplayTrihedron- is trihedron displayed
SOCC_Viewer::~SOCC_Viewer ( )
virtual

Destructor

Member Function Documentation

SALOME_Prs * SOCC_Viewer::CreatePrs ( const char *  entry = 0)
virtual

Create presentation corresponding to the entry

Parameters
entry- entry

Reimplemented from SALOME_View.

References SOCC_Prs::AddObject(), entry2aisobjects, and OCCViewer_Viewer::Handle().

OCCViewer_ViewWindow * SOCC_Viewer::createSubWindow ( )
virtual

create SOCC_ViewWindow

Reimplemented from OCCViewer_Viewer.

void SOCC_Viewer::Erase ( const SALOME_OCCPrs prs,
const bool  forced = false 
)
virtual

Erase presentation

Parameters
prs- presentation
forced- removes object from context

Reimplemented from SALOME_View.

References SOCC_Prs::GetObjects(), OCCViewer_Viewer::Handle(), SOCC_Prs::IsNull(), and OCCViewer_Viewer::updateTrihedron().

void SOCC_Viewer::EraseAll ( SALOME_Displayer d,
const bool  forced = false 
)
virtual

Erase all presentations

Parameters
forced- removes all objects from context

Reimplemented from SALOME_View.

References SALOME_View::EraseAll(), OCCViewer_Viewer::Handle(), Repaint(), and OCCViewer_Viewer::updateTrihedron().

void SOCC_Viewer::GetVisible ( SALOME_ListIO theList)
virtual

objects visible in viewer

Parameters
theList- visible objects collection

Reimplemented from SALOME_View.

References OCCViewer_Viewer::Handle().

void SOCC_Viewer::GlobalSelection ( const bool  update = false) const
virtual

Deactivates selection of sub-shapes

Reimplemented from SALOME_View.

References OCCViewer_Viewer::Handle().

bool SOCC_Viewer::highlight ( const Handle(SALOME_InteractiveObject)&  obj,
bool  hilight,
bool  upd = 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 OCCViewer_Viewer::Handle(), OCCViewer_Viewer::highlight(), and OCCViewer_Viewer::update().

bool SOCC_Viewer::isInViewer ( const Handle(SALOME_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 OCCViewer_Viewer::Handle().

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

Reimplemented from SALOME_View.

References entry2aisobjects, and OCCViewer_Viewer::Handle().

void SOCC_Viewer::LocalSelection ( const SALOME_OCCPrs thePrs,
const int  theMode 
)
virtual

Activates selection of sub-shapes

Reimplemented from SALOME_View.

void SOCC_Viewer::LocalSelection ( const SALOME_OCCPrs thePrs,
const std::list< int >  modes 
)
virtual

Activates selection of sub-shapes

Reimplemented from SALOME_View.

References SOCC_Prs::GetObjects(), OCCViewer_Viewer::Handle(), and SALOME_Prs::IsNull().

void SOCC_Viewer::rename ( const Handle(SALOME_InteractiveObject)&  obj,
const QString &  name 
)

Changes name of object

Parameters
obj- object to be renamed
name- new name

References OCCViewer_Viewer::Handle().

void SOCC_Viewer::Repaint ( )
virtual

Updates current viewer

Reimplemented from SALOME_View.

void SOCC_Viewer::setColor ( const Handle(SALOME_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 entry2aisobjects, OCCViewer_Viewer::Handle(), and OCCViewer_Viewer::setColor().

void SOCC_Viewer::setTransparency ( const Handle(SALOME_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 entry2aisobjects, OCCViewer_Viewer::Handle(), and OCCViewer_Viewer::setTransparency().

void SOCC_Viewer::switchRepresentation ( const Handle(SALOME_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 entry2aisobjects, OCCViewer_Viewer::Handle(), and OCCViewer_Viewer::switchRepresentation().

Member Data Documentation

std::map< std::string , std::vector<Handle(AIS_InteractiveObject)> > SOCC_Viewer::entry2aisobjects

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