From 82c6a9496c986d3ea8440f4214945fc708e50020 Mon Sep 17 00:00:00 2001 From: enk Date: Thu, 7 Jul 2005 07:22:54 +0000 Subject: [PATCH] Update comments --- src/Prs/SALOME_Prs.cxx | 120 ++++++------- src/Prs/SALOME_Prs.h | 160 +++++++++--------- src/VTKViewer/VTKViewer_Actor.h | 23 ++- src/VTKViewer/VTKViewer_CellRectPicker.h | 57 +++++-- .../VTKViewer_ExtractUnstructuredGrid.h | 37 +++- src/VTKViewer/VTKViewer_RectPicker.h | 49 +++--- src/VTKViewer/VTKViewer_Trihedron.h | 4 +- 7 files changed, 255 insertions(+), 195 deletions(-) diff --git a/src/Prs/SALOME_Prs.cxx b/src/Prs/SALOME_Prs.cxx index 2008d9a19..b6ec98587 100755 --- a/src/Prs/SALOME_Prs.cxx +++ b/src/Prs/SALOME_Prs.cxx @@ -12,8 +12,8 @@ //=========================================================== /*! - * Function: SALOME_OCCPrs::DisplayIn - * Purpose: Dispatches display operation to proper Display() + * Function: SALOME_OCCPrs::DisplayIn \n + * Purpose: Dispatches display operation to proper Display() \n * method of SALOME_View */ //=========================================================== @@ -24,8 +24,8 @@ void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const //=========================================================== /*! - * Function: SALOME_OCCPrs::EraseIn - * Purpose: Dispatches display operation to proper Erase() + * Function: SALOME_OCCPrs::EraseIn \n + * Purpose: Dispatches display operation to proper Erase() \n * method of SALOME_View */ //=========================================================== @@ -36,8 +36,8 @@ void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const //=========================================================== /*! - * Function: SALOME_OCCPrs::LocalSelectionIn - * Purpose: Dispatches operation to proper LocalSelectionIn() + * Function: SALOME_OCCPrs::LocalSelectionIn \n + * Purpose: Dispatches operation to proper LocalSelectionIn() \n * method of SALOME_View */ //=========================================================== @@ -48,8 +48,8 @@ void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const //=========================================================== /*! - * Function: SALOME_OCCPrs::Update - * Purpose: Dispatches update operation to proper Update() + * Function: SALOME_OCCPrs::Update \n + * Purpose: Dispatches update operation to proper Update() \n * method of SALOME_Displayer */ //=========================================================== @@ -60,8 +60,8 @@ void SALOME_OCCPrs::Update( SALOME_Displayer* d ) //=========================================================== /*! - * Function: SALOME_VTKPrs::DisplayIn - * Purpose: Dispatches display operation to proper Display() + * Function: SALOME_VTKPrs::DisplayIn \n + * Purpose: Dispatches display operation to proper Display() \n * method of SALOME_View */ //=========================================================== @@ -72,8 +72,8 @@ void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const //=========================================================== /*! - * Function: SALOME_VTKPrs::EraseIn - * Purpose: Dispatches display operation to proper Erase() + * Function: SALOME_VTKPrs::EraseIn \n + * Purpose: Dispatches display operation to proper Erase() \n * method of SALOME_View */ //=========================================================== @@ -84,8 +84,8 @@ void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const //=========================================================== /*! - * Function: SALOME_VTKPrs::LocalSelectionIn - * Purpose: Dispatches operation to proper LocalSelectionIn() + * Function: SALOME_VTKPrs::LocalSelectionIn \n + * Purpose: Dispatches operation to proper LocalSelectionIn() \n * method of SALOME_View */ //=========================================================== @@ -96,8 +96,8 @@ void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const //=========================================================== /*! - * Function: SALOME_VTKPrs::Update - * Purpose: Dispatches update operation to proper Update() + * Function: SALOME_VTKPrs::Update \n + * Purpose: Dispatches update operation to proper Update() \n * method of SALOME_Displayer */ //=========================================================== @@ -108,8 +108,8 @@ void SALOME_VTKPrs::Update( SALOME_Displayer* d ) //=========================================================== /*! - * Function: SALOME_Prs2d::DisplayIn - * Purpose: Dispatches display operation to proper Display() + * Function: SALOME_Prs2d::DisplayIn \n + * Purpose: Dispatches display operation to proper Display() \n * method of SALOME_View */ //=========================================================== @@ -120,8 +120,8 @@ void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const //=========================================================== /*! - * Function: SALOME_Prs2d::EraseIn - * Purpose: Dispatches display operation to proper Erase() + * Function: SALOME_Prs2d::EraseIn \n + * Purpose: Dispatches display operation to proper Erase() \n * method of SALOME_View */ //=========================================================== @@ -132,8 +132,8 @@ void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const //=========================================================== /*! - * Function: SALOME_Prs2d::LocalSelectionIn - * Purpose: Dispatches operation to proper LocalSelectionIn() + * Function: SALOME_Prs2d::LocalSelectionIn \n + * Purpose: Dispatches operation to proper LocalSelectionIn() \n * method of SALOME_View */ //=========================================================== @@ -144,8 +144,8 @@ void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const //=========================================================== /*! - * Function: SALOME_Prs2d::Update - * Purpose: Dispatches update operation to proper Update() + * Function: SALOME_Prs2d::Update \n + * Purpose: Dispatches update operation to proper Update() \n * method of SALOME_Displayer */ //=========================================================== @@ -156,8 +156,8 @@ void SALOME_Prs2d::Update( SALOME_Displayer* d ) //=========================================================== /*! - * Function: SALOME_View::Display - * Purpose: Gives control to SALOME_Prs object, so that + * Function: SALOME_View::Display \n + * Purpose: Gives control to SALOME_Prs object, so that \n * it could perform double dispatch */ //=========================================================== @@ -168,8 +168,8 @@ void SALOME_View::Display( const SALOME_Prs* prs ) //=========================================================== /*! - * Function: SALOME_View::Erase - * Purpose: Gives control to SALOME_Prs object, so that + * Function: SALOME_View::Erase \n + * Purpose: Gives control to SALOME_Prs object, so that \n * it could perform double dispatch */ //=========================================================== @@ -180,8 +180,8 @@ void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced ) //=========================================================== /*! - * Function: SALOME_View::LocalSelection - * Purpose: Gives control to SALOME_Prs object, so that + * Function: SALOME_View::LocalSelection \n + * Purpose: Gives control to SALOME_Prs object, so that \n * it could perform double dispatch */ //=========================================================== @@ -192,8 +192,8 @@ void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode ) //=========================================================== /*! - * Function: SALOME_View::Display - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::Display \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -204,8 +204,8 @@ void SALOME_View::Display( const SALOME_OCCPrs* ) //=========================================================== /*! - * Function: SALOME_View::Display - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::Display \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -216,8 +216,8 @@ void SALOME_View::Display( const SALOME_VTKPrs* ) //=========================================================== /*! - * Function: SALOME_View::Display - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::Display \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -228,8 +228,8 @@ void SALOME_View::Display( const SALOME_Prs2d* ) //=========================================================== /*! - * Function: SALOME_View::Erase - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::Erase \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -240,8 +240,8 @@ void SALOME_View::Erase( const SALOME_OCCPrs*, const bool ) //=========================================================== /*! - * Function: SALOME_View::Erase - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::Erase \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -252,8 +252,8 @@ void SALOME_View::Erase( const SALOME_VTKPrs*, const bool ) //=========================================================== /*! - * Function: SALOME_View::Erase - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::Erase \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -264,8 +264,8 @@ void SALOME_View::Erase( const SALOME_Prs2d*, const bool ) //=========================================================== /*! - * Function: SALOME_View::EraseAll - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::EraseAll \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -276,8 +276,8 @@ void SALOME_View::EraseAll( const bool ) //=========================================================== /*! - * Function: SALOME_View::LocalSelection - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::LocalSelection \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -289,8 +289,8 @@ void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int ) //=========================================================== /*! - * Function: SALOME_View::LocalSelection - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::LocalSelection \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -302,8 +302,8 @@ void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int ) //=========================================================== /*! - * Function: SALOME_View::LocalSelection - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::LocalSelection \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -315,8 +315,8 @@ void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int ) //=========================================================== /*! - * Function: SALOME_View::GlobalSelection - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_View::GlobalSelection \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -328,8 +328,8 @@ void SALOME_View::GlobalSelection( const bool ) const //=========================================================== /*! - * Function: SALOME_Displayer::UpdatePrs - * Purpose: Gives control to SALOME_Prs object, so that + * Function: SALOME_Displayer::UpdatePrs \n + * Purpose: Gives control to SALOME_Prs object, so that \n * it could perform double dispatch */ //=========================================================== @@ -340,8 +340,8 @@ void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs ) //=========================================================== /*! - * Function: SALOME_Displayer::Update - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_Displayer::Update \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -352,8 +352,8 @@ void SALOME_Displayer::Update( SALOME_OCCPrs* ) //=========================================================== /*! - * Function: SALOME_Displayer::Update - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_Displayer::Update \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== @@ -364,8 +364,8 @@ void SALOME_Displayer::Update( SALOME_VTKPrs* ) //=========================================================== /*! - * Function: SALOME_Displayer::Update - * Purpose: Virtual method, should be reimplemented in successors, + * Function: SALOME_Displayer::Update \n + * Purpose: Virtual method, should be reimplemented in successors, \n * by default issues a warning and does nothing. */ //=========================================================== diff --git a/src/Prs/SALOME_Prs.h b/src/Prs/SALOME_Prs.h index 32182d36b..a35f713e7 100755 --- a/src/Prs/SALOME_Prs.h +++ b/src/Prs/SALOME_Prs.h @@ -17,91 +17,90 @@ class Handle_SALOME_InteractiveObject; //=========================================================== /*! - * Class: SALOME_Prs - * Description: Base class for SALOME graphic object wrappers - presentations. - * Presentations are temporary objects, so they can be created on the stack. + * Class: SALOME_Prs \n + * Description: Base class for SALOME graphic object wrappers - presentations.\n + * Presentations are temporary objects, so they can be created on the stack. */ //=========================================================== class PRS_EXPORT SALOME_Prs { public: + //! Destructor virtual ~SALOME_Prs() {} - // Destructor + //! Key method for double dispatch of display operation virtual void DisplayIn( SALOME_View* ) const = 0; - // Key method for double dispatch of display operation + //! Key method for double dispatch of erase operation virtual void EraseIn( SALOME_View*, const bool = false ) const = 0; - // Key method for double dispatch of erase operation + //! Key method for double dispatch of update operation virtual void Update( SALOME_Displayer* ) = 0; - // Key method for double dispatch of update operation + //! Should return true, if this presentation contains a graphic object virtual bool IsNull() const = 0; - // Should return true, if this presentation contains a graphic object + //! Key method for double dispatch of activation of subshapes selection virtual void LocalSelectionIn( SALOME_View*, const int ) const = 0; - // Key method for double dispatch of activation of subshapes selection }; //=========================================================== /*! - * Class: SALOME_OCCPrs - * Description: Base class for OpenCASCADE graphic object (AIS_InteractiveObject) wrappers. - * This intermediate class is necessary to avoid dependencies from OCC libs. + * Class: SALOME_OCCPrs \n + * Description: Base class for OpenCASCADE graphic object (AIS_InteractiveObject) wrappers.\n + * This intermediate class is necessary to avoid dependencies from OCC libs. */ //=========================================================== class PRS_EXPORT SALOME_OCCPrs : public SALOME_Prs { public: + //! It uses double dispatch in order to \n + //! invoke Display() method corresponding to the actual type of presentation. virtual void DisplayIn( SALOME_View* ) const; - // It uses double dispatch in order to - // invoke Display() method corresponding to the actual type of presentation. + //! It uses double dispatch in order to \n + //! invoke Erase() method corresponding to the actual type of presentation. virtual void EraseIn( SALOME_View*, const bool = false ) const; - // It uses double dispatch in order to - // invoke Erase() method corresponding to the actual type of presentation. + //! It uses double dispatch in order to \n + //! invoke Update() method corresponding to the actual type of presentation. virtual void Update( SALOME_Displayer* ); - // It uses double dispatch in order to - // invoke Update() method corresponding to the actual type of presentation. + //! Key method for double dispatch of activation of subshapes selection virtual void LocalSelectionIn( SALOME_View*, const int ) const; - // Key method for double dispatch of activation of subshapes selection }; //=========================================================== /*! - * Class: SALOME_VTKPrs - * Description: Base class for VTK graphic object (vtkActor) wrappers + * Class: SALOME_VTKPrs \n + * Description: Base class for VTK graphic object (vtkActor) wrappers \n * This intermediate class is necessary to avoid dependencies from VTK libs. */ //=========================================================== - class PRS_EXPORT SALOME_VTKPrs : public SALOME_Prs { public: + //! It uses double dispatch in order to \n + //! invoke Display() method corresponding to the actual type of presentation. virtual void DisplayIn( SALOME_View* ) const; - // It uses double dispatch in order to - // invoke Display() method corresponding to the actual type of presentation. + //! It uses double dispatch in order to \n + //! invoke Erase() method corresponding to the actual type of presentation. virtual void EraseIn( SALOME_View*, const bool = false ) const; - // It uses double dispatch in order to - // invoke Erase() method corresponding to the actual type of presentation. + //! It uses double dispatch in order to \n + //! invoke Update() method corresponding to the actual type of presentation. virtual void Update( SALOME_Displayer* ); - // It uses double dispatch in order to - // invoke Update() method corresponding to the actual type of presentation. + //! Key method for double dispatch of activation of subshapes selection virtual void LocalSelectionIn( SALOME_View*, const int ) const; - // Key method for double dispatch of activation of subshapes selection }; //=========================================================== /*! - * Class: SALOME_Prs2d + * Class: SALOME_Prs2d \n * Description: Base class for Plot2d graphic object (Plot2d_Curve) wrappers. */ //=========================================================== @@ -109,20 +108,20 @@ public: class PRS_EXPORT SALOME_Prs2d : public SALOME_Prs { public: + //! It uses double dispatch in order to + //! invoke Display() method corresponding to the actual type of presentation. virtual void DisplayIn( SALOME_View* ) const; - // It uses double dispatch in order to - // invoke Display() method corresponding to the actual type of presentation. + //! It uses double dispatch in order to + //! invoke Erase() method corresponding to the actual type of presentation. virtual void EraseIn( SALOME_View*, const bool = false ) const; - // It uses double dispatch in order to - // invoke Erase() method corresponding to the actual type of presentation. + //! It uses double dispatch in order to + //! invoke Update() method corresponding to the actual type of presentation. virtual void Update( SALOME_Displayer* ); - // It uses double dispatch in order to - // invoke Update() method corresponding to the actual type of presentation. + //! Key method for double dispatch of activation of subshapes selection virtual void LocalSelectionIn( SALOME_View*, const int ) const; - // Key method for double dispatch of activation of subshapes selection }; ///////////////////////////////////////////////////////////////////////// @@ -132,7 +131,7 @@ public: //=========================================================== /*! - * Class: SALOME_View + * Class: SALOME_View \n * Description: Base class for SALOME views (or view frames) */ //=========================================================== @@ -140,73 +139,74 @@ public: class PRS_EXPORT SALOME_View { public: + //! Destructor virtual ~SALOME_View() {} - // Destructor + //! This Display() method should be called to display given presentation \n + //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n + //! so that it could perform double dispatch. void Display( const SALOME_Prs* ); - // This Display() method should be called to display given presentation - // created anywhere by anybody. It simply passes control to SALOME_Prs object - // so that it could perform double dispatch. + + //! This Erase() method should be called to erase given presentation \n + //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n + //! so that it could perform double dispatch. void Erase( const SALOME_Prs*, const bool = false ); - // This Erase() method should be called to erase given presentation - // created anywhere by anybody. It simply passes control to SALOME_Prs object - // so that it could perform double dispatch. + //! This LocalSelection() method should be called to activate sub-shapes selection \n + //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n + //! so that it could perform double dispatch. void LocalSelection( const SALOME_Prs*, const int ); - // This LocalSelection() method should be called to activate sub-shapes selection - // created anywhere by anybody. It simply passes control to SALOME_Prs object - // so that it could perform double dispatch. // Interface for derived views // Display() methods for ALL kinds of presentation should appear here - virtual void Display( const SALOME_OCCPrs* ); - virtual void Display( const SALOME_VTKPrs* ); - virtual void Display( const SALOME_Prs2d* ); + virtual void Display( const SALOME_OCCPrs* );//!< Display SALOME_OCCPrs presentation. + virtual void Display( const SALOME_VTKPrs* );//!< Display SALOME_VTKPrs presentation. + virtual void Display( const SALOME_Prs2d* );//!< Display SALOME_Prs2d presentation. // Add new Display() methods here... // Erase() methods for ALL kinds of presentation should appear here - virtual void Erase( const SALOME_OCCPrs*, const bool = false ); - virtual void Erase( const SALOME_VTKPrs*, const bool = false ); - virtual void Erase( const SALOME_Prs2d*, const bool = false ); + virtual void Erase( const SALOME_OCCPrs*, const bool = false );//!< Erase SALOME_OCCPrs + virtual void Erase( const SALOME_VTKPrs*, const bool = false );//!< Erase SALOME_VTKPrs + virtual void Erase( const SALOME_Prs2d*, const bool = false );//!< Erase SALOME_Prs2d virtual void EraseAll( const bool = false ); // Add new Erase() methods here... // LocalSelection() methods for ALL kinds of presentation should appear here - virtual void LocalSelection( const SALOME_OCCPrs*, const int ); - virtual void LocalSelection( const SALOME_VTKPrs*, const int ); - virtual void LocalSelection( const SALOME_Prs2d* , const int ); + virtual void LocalSelection( const SALOME_OCCPrs*, const int );//!< Local selection SALOME_OCCPrs + virtual void LocalSelection( const SALOME_VTKPrs*, const int );//!< Local selection SALOME_VTKPrs + virtual void LocalSelection( const SALOME_Prs2d* , const int );//!< Local selection SALOME_Prs2d + //! Deactivates selection of sub-shapes (must be redefined with OCC viewer) virtual void GlobalSelection( const bool = false ) const; - // Deactivates selection of sub-shapes (must be redefined with OCC viewer) - // Creates empty presenation of corresponding type + //! Creates empty presenation of corresponding type virtual SALOME_Prs* CreatePrs( const char* entry = 0 ) { return 0; } // Axiluary methods called before and after displaying of objects - virtual void BeforeDisplay( SALOME_Displayer* d ) {} - virtual void AfterDisplay ( SALOME_Displayer* d ) {} + virtual void BeforeDisplay( SALOME_Displayer* d ) {} //!< Null body here + virtual void AfterDisplay ( SALOME_Displayer* d ) {} //!< Null body here // New methods (asv) - virtual bool isVisible( const Handle_SALOME_InteractiveObject& ) { return false; } - virtual void Repaint() {} + //! \retval Return false. + virtual bool isVisible( const Handle_SALOME_InteractiveObject& ){ return false; } + virtual void Repaint() {} //!< Null body here. }; //=========================================================== -/*! +/* * Classes: SALOME_Displayer * Description: These classes are used to specify type of view * VTK, OCC or Plot2d */ //=========================================================== - class PRS_EXPORT SALOME_OCCViewType {}; class PRS_EXPORT SALOME_VTKViewType {}; class PRS_EXPORT SALOME_Plot2dViewType {}; //=========================================================== /*! - * Class: SALOME_Displayer + * Class: SALOME_Displayer \n * Description: Base class for SALOME displayers */ //=========================================================== @@ -214,29 +214,29 @@ class PRS_EXPORT SALOME_Plot2dViewType {}; class PRS_EXPORT SALOME_Displayer { public: - virtual ~SALOME_Displayer() {} - // Destructor + //! Destructor + virtual ~SALOME_Displayer() {/*! Null body here*/} + //! This Update() method should be called to update given presentation \n + //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n + //! so that it could perform double dispatch. void UpdatePrs( SALOME_Prs* ); - // This Update() method should be called to update given presentation - // created anywhere by anybody. It simply passes control to SALOME_Prs object - // so that it could perform double dispatch. // Interface for derived displayers // Update() methods for ALL kinds of presentation should appear here - virtual void Update( SALOME_OCCPrs* ); - virtual void Update( SALOME_VTKPrs* ); - virtual void Update( SALOME_Prs2d* ); + virtual void Update( SALOME_OCCPrs* );//!< Update SALOME_OCCPrs presentation. + virtual void Update( SALOME_VTKPrs* );//!< Update SALOME_VTKPrs presentation. + virtual void Update( SALOME_Prs2d* );//!< Update SALOME_Prs2d presentation. // Add new Update() methods here... // Axiluary methods called before and after displaying of objects - virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCViewType& ) {}; - virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCViewType& ) {}; - virtual void BeforeDisplay( SALOME_View*, const SALOME_VTKViewType& ) {}; - virtual void AfterDisplay ( SALOME_View*, const SALOME_VTKViewType& ) {}; - virtual void BeforeDisplay( SALOME_View*, const SALOME_Plot2dViewType& ) {}; - virtual void AfterDisplay ( SALOME_View*, const SALOME_Plot2dViewType& ) {}; + virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCViewType& ){/*! Null body here*/}; + virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCViewType& ){/*! Null body here*/}; + virtual void BeforeDisplay( SALOME_View*, const SALOME_VTKViewType& ){/*! Null body here*/}; + virtual void AfterDisplay ( SALOME_View*, const SALOME_VTKViewType& ){/*! Null body here*/}; + virtual void BeforeDisplay( SALOME_View*, const SALOME_Plot2dViewType& ){/*! Null body here*/}; + virtual void AfterDisplay ( SALOME_View*, const SALOME_Plot2dViewType& ){/*! Null body here*/}; }; #endif diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index a58306d9c..557af907d 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -21,7 +21,9 @@ class VTKViewer_TransformFilter; class VTKViewer_PassThroughFilter; #define VTKViewer_POINT_SIZE 3 - +/*! \class vtkLODActor + * \brief For more information see VTK documentation + */ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor { public: @@ -32,11 +34,13 @@ public: virtual const char* getName() { return myName.c_str(); } virtual void setName(const char* theName){ myName = theName;} - // To generate highlight automaticaly - virtual bool hasHighlight() { return false; } - virtual void highlight(bool theHighlight) { myIsHighlighted = theHighlight; } + //! To generate highlight automaticaly + virtual bool hasHighlight() { return false; } + //! Sets highlight. + virtual void highlight(bool theHighlight) { myIsHighlighted = theHighlight; } + //! Check highlight. virtual bool isHighlighted() { return myIsHighlighted; } - + virtual void SetOpacity(float theOpacity); virtual float GetOpacity(); @@ -48,14 +52,14 @@ public: virtual void SetPreSelected(bool thePreselect = false) { myIsPreselected = thePreselect;} - // Used to obtain all dependent actors + //! Used to obtain all dependent actors virtual void GetChildActors(vtkActorCollection*) {}; virtual void AddToRender(vtkRenderer* theRenderer); virtual void RemoveFromRender(vtkRenderer* theRenderer); - // For selection mapping purpose + /*! For selection mapping purpose */ virtual int GetNodeObjId(int theVtkID) { return theVtkID;} virtual float* GetNodeCoord(int theObjID); @@ -77,8 +81,8 @@ public: virtual int getDisplayMode(); virtual void setDisplayMode(int theMode); - // Infinitive means actor without size (point for example), - // which is not taken into account in calculation of boundaries of the scene + //! Infinitive means actor without size (point for example), + //! which is not taken into account in calculation of boundaries of the scene void SetInfinitive(bool theIsInfinite) { myIsInfinite = theIsInfinite; } virtual bool IsInfinitive(); @@ -111,6 +115,7 @@ protected: int myRepresentation; vtkProperty *myProperty; + //! Main method, which calculate output. void InitPipeLine(vtkMapper* theMapper); VTKViewer_Actor(); diff --git a/src/VTKViewer/VTKViewer_CellRectPicker.h b/src/VTKViewer/VTKViewer_CellRectPicker.h index 76b0b8c40..94785d295 100755 --- a/src/VTKViewer/VTKViewer_CellRectPicker.h +++ b/src/VTKViewer/VTKViewer_CellRectPicker.h @@ -19,11 +19,10 @@ // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // -// -// -// File : VTKViewer_CellRectPicker.h -// Author : Natalia KOPNOVA -// Module : SALOME +// File : VTKViewer_CellRectPicker.h +// Author : Natalia KOPNOVA +// Module : SALOME + #ifndef __VTKViewer_CellRectPicker_h #define __VTKViewer_CellRectPicker_h @@ -32,6 +31,7 @@ #include #include +/*! \brief Cell data structure*/ typedef struct { vtkIdType cellId; int subId; @@ -46,40 +46,67 @@ typedef std::map VTKViewer_ActorDataMap; class vtkCell; class vtkGenericCell; class vtkQuad; - +/*! \class VTKViewer_CellRectPicker + * \brief Rectangular cell picker class. + */ class VTK_EXPORT VTKViewer_CellRectPicker : public VTKViewer_RectPicker { public: static VTKViewer_CellRectPicker *New(); + /*! \fn vtkTypeMacro(VTKViewer_CellRectPicker,VTKViewer_RectPicker); + * \brief VTK type macros. + */ vtkTypeMacro(VTKViewer_CellRectPicker,VTKViewer_RectPicker); - // Description: - // Get the id of the picked cells. - // (Notes: use GetActors() to get picked actors list) + /*! \fn VTKViewer_CellDataSet GetCellData(vtkActor* actor) + * \brief Get the id of the picked cells. + * \brief (Notes: use GetActors() to get picked actors list) + * \param actor - vtkActor pointer + */ VTKViewer_CellDataSet GetCellData(vtkActor* actor) { return this->ActorData[actor]; } - // Description: - // The method returns a non-zero value if the cells intersect each other - // in the direction dir[3]. Returned value is 1 if the first cell is top of - // the second one according to direction and 2 if the second cell is top. + /*! \fn static int IntersectCells(vtkCell* c1, float d1, vtkCell* c2, float d2, float dir[3]); + * \brief The method returns a non-zero value, if the cells intersect each other + * in the direction dir[3]. + * \param c1 - first vtkCell pointer + * \param d1 - + * \param c2 - second vtkCell pointer + * \param d2 - + * \param dir[3] - direction + * \retval integer - Returned value is 1 if the first cell is top of + * the second one according to direction and 2 if the second cell is top. + */ static int IntersectCells(vtkCell* c1, float d1, vtkCell* c2, float d2, float dir[3]); - // Description: - // The method returns a non-zero value if the point is inlide point data set + /*! \fn static char PointInside(float point[3], vtkPoints* list); + * \brief Check point position. + * \param point[3] - point + * \param list - point data set + * \retval 0 or 1 - The method returns a non-zero value, if the point is inlide point data set + */ static char PointInside(float point[3], vtkPoints* list); protected: + VTKViewer_CellRectPicker(); ~VTKViewer_CellRectPicker(); VTKViewer_ActorDataMap ActorData; + /*! \fn virtual float IntersectWithHex(float p1[4][4], float p2[4][4], float tol, + * vtkAssemblyPath *path, vtkProp3D *p, + * vtkAbstractMapper3D *m); + */ virtual float IntersectWithHex(float p1[4][4], float p2[4][4], float tol, vtkAssemblyPath *path, vtkProp3D *p, vtkAbstractMapper3D *m); + /*! \fn void Initialize(); + * \brief Clear \a ActorData and call VTKViewer_RectPicker::Initialize() method + */ void Initialize(); + void IncludeCell(vtkDataSet* input, VTKViewer_CellData cellData, VTKViewer_CellDataSet& dalaList); void IncludeActor(vtkProp3D* prop, vtkDataSet* input, VTKViewer_CellDataSet& dataList); diff --git a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h index 7f2951dff..b8f0190f1 100755 --- a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h +++ b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.h @@ -8,53 +8,69 @@ #include #include #include - +/*! \class vtkUnstructuredGridToUnstructuredGridFilter + * \brief For more information see VTK documentation + */ +/*! \class vtkUnstructuredGridToUnstructuredGridFilter + * \brief For more information see VTK documentation. + */ class VTKVIEWER_EXPORT VTKViewer_ExtractUnstructuredGrid : public vtkUnstructuredGridToUnstructuredGridFilter { public: + //! VTK type macros. vtkTypeMacro( VTKViewer_ExtractUnstructuredGrid, vtkUnstructuredGridToUnstructuredGridFilter ); - // Description: - // Construct with all types of clipping turned off. + //! \brief Construct with all types of clipping turned off. static VTKViewer_ExtractUnstructuredGrid *New(); enum EExtraction{ eCells, ePoints}; + //! Sets mode of extraction to \a theExtractionMode void SetModeOfExtraction(EExtraction theExtractionMode){ myExtractionMode = theExtractionMode; Modified(); } + //! Get Extraction mode (Return: \a myExtractionMode field) EExtraction GetModeOfExtraction(){ return myExtractionMode;} enum EChanging{ ePassAll, eAdding, eRemoving}; + //! Sets mode of changing to \a theChangeMode void SetModeOfChanging(EChanging theChangeMode){ myChangeMode = theChangeMode; Modified(); } + //! Return \a myChangeMode field EChanging GetModeOfChanging(){ return myChangeMode;} - // Remove the cell from the output + //! Add cell id to \a myCellIds std::set void RegisterCell(vtkIdType theCellId); + //! Check if myCellIds is empty. int IsCellsRegistered() { return !myCellIds.empty();} + //! Remove the cell from the output void ClearRegisteredCells() { myCellIds.clear(); Modified(); } - // Remove every cells with the type from the output + //! Add cell type to \a myCellTypes std::set void RegisterCellsWithType(vtkIdType theCellType); + //! Check if myCellTypes is empty. int IsCellsWithTypeRegistered() { return !myCellTypes.empty();} + //! Remove every cells with the type from the output void ClearRegisteredCellsWithType() { myCellTypes.clear(); Modified(); } - // Do the filter do some real work + //! \brief Do the filter do some real work int IsChanging() { return IsCellsRegistered() || IsCellsWithTypeRegistered();} - // Do it keep the mapping between input's and output's UnstructuredGrid + //! \brief Do it keep the mapping between input's and output's UnstructuredGrid void SetStoreMapping(int theStoreMapping); + //! Get \a myStoreMapping int GetStoreMapping(){ return myStoreMapping;} + //! Gets the input id by output id. vtkIdType GetInputId(int theOutId) const; + //! Gets the output id by input id. vtkIdType GetOutputId(int theInId) const; typedef std::vector TVectorId; @@ -64,6 +80,7 @@ protected: VTKViewer_ExtractUnstructuredGrid(); ~VTKViewer_ExtractUnstructuredGrid(); + //! Main method, which calculate output void Execute(); EExtraction myExtractionMode; @@ -78,8 +95,10 @@ protected: TMapId myIn2OutId; private: - VTKViewer_ExtractUnstructuredGrid(const VTKViewer_ExtractUnstructuredGrid&); // Not implemented. - void operator=(const VTKViewer_ExtractUnstructuredGrid&); // Not implemented. + //! Not implemented. + VTKViewer_ExtractUnstructuredGrid(const VTKViewer_ExtractUnstructuredGrid&); + //! Not implemented. + void operator=(const VTKViewer_ExtractUnstructuredGrid&); }; #endif diff --git a/src/VTKViewer/VTKViewer_RectPicker.h b/src/VTKViewer/VTKViewer_RectPicker.h index 44b7e0705..dbd1f8427 100755 --- a/src/VTKViewer/VTKViewer_RectPicker.h +++ b/src/VTKViewer/VTKViewer_RectPicker.h @@ -30,42 +30,49 @@ #include +/*! \class vtkPicker + * \brief For more information see VTK documentation + */ +/*! \class VTKViewer_RectPicker + * \brief Rectangular picker class. + */ class VTK_EXPORT VTKViewer_RectPicker : public vtkPicker { public: static VTKViewer_RectPicker *New(); vtkTypeMacro(VTKViewer_RectPicker,vtkPicker); - // Description: - // Perform pick operation with selection rectangle provided. Normally the - // first two values for the selection top-left and right-bottom points are - // x-y pixel coordinate, and the third value is =0. - // Return non-zero if something was successfully picked. + /*! \brief Perform pick operation with selection rectangle provided. Normally the + * first two values for the selection top-left and right-bottom points are + * x-y pixel coordinate, and the third value is =0. + * \retval Return non-zero if something was successfully picked. + */ virtual int Pick(float selectionX1, float selectionY1, float selectionZ1, float selectionX2, float selectionY2, float selectionZ2, vtkRenderer *renderer); - // Description: - // Perform pick operation with selection rectangle provided. Normally the first - // two values for the selection top-left and right-bottom points are x-y pixel - // coordinate, and the third value is =0. - // Return non-zero if something was successfully picked. + /*! + * \brief Perform pick operation with selection rectangle provided. Normally the first + * two values for the selection top-left and right-bottom points are x-y pixel + * coordinate, and the third value is =0. + * \retval Return non-zero if something was successfully picked. + */ int Pick(float selectionPt1[3], float selectionPt2[3], vtkRenderer *ren) {return this->Pick(selectionPt1[0], selectionPt1[1], selectionPt1[2], selectionPt2[0], selectionPt2[1], selectionPt2[2], ren);}; - // Description: - // Bounding box intersection with hexahedron. The method returns a non-zero value - // if the bounding box is hit. Origin[4][4] starts the ray from corner points, - // dir[4][3] is the vector components of the ray in the x-y-z directions. - // (Notes: the intersection ray dir[4][3] is NOT normalized.) + /*! \brief Bounding box intersection with hexahedron. Origin[4][4] starts the ray from corner points, + * dir[4][3] is the vector components of the ray in the x-y-z directions. + * (Notes: the intersection ray dir[4][3] is NOT normalized.) + * \retval The method returns a non-zero value, if the bounding box is hit. + */ static char HitBBox(float bounds[6], float origin[4][4], float dir[4][3]); - // Description: - // Position of point relative to hexahedron. The method returns a non-zero value - // if the point is inside. p1[4][4] is the corner points of top face, - // p2[4][4] is the corner points of bottom face. + /*! \brief Position of point relative to hexahedron. p1[4][4] is the corner points of top face, + * p2[4][4] is the corner points of bottom face. + * \retval The method returns a non-zero value, if the point is inside. + */ static char PointInside(float point[3], float p1[4][4], float p2[4][4], float tol=0); protected: @@ -73,8 +80,8 @@ protected: ~VTKViewer_RectPicker() {}; virtual float IntersectWithHex(float p1[4][4], float p2[4][4], float tol, - vtkAssemblyPath *path, vtkProp3D *p, - vtkAbstractMapper3D *m); + vtkAssemblyPath *path, vtkProp3D *p, + vtkAbstractMapper3D *m); private: }; diff --git a/src/VTKViewer/VTKViewer_Trihedron.h b/src/VTKViewer/VTKViewer_Trihedron.h index 4618931e3..fcfa9ee86 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.h +++ b/src/VTKViewer/VTKViewer_Trihedron.h @@ -17,7 +17,9 @@ class vtkConeSource; class VTKViewer_Axis; class VTKViewer_VectorText; -//**************************************************************** +/*! \class vtkFollower + * \brief For more information see VTK documentation + */ /*! \class VTKViewer_UnScaledActor * \brief Same as VTK class vtkFollower */ -- 2.39.2