//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
//===========================================================
/*!
- * 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.
*/
//===========================================================
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
};
/////////////////////////////////////////////////////////////////////////
//===========================================================
/*!
- * Class: SALOME_View
+ * Class: SALOME_View \n
* Description: Base class for SALOME views (or view frames)
*/
//===========================================================
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
*/
//===========================================================
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
class VTKViewer_PassThroughFilter;
#define VTKViewer_POINT_SIZE 3
-
+/*! \class vtkLODActor
+ * \brief For more information see <a href="http://www.vtk.org/">VTK documentation
+ */
class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
{
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();
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);
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();
int myRepresentation;
vtkProperty *myProperty;
+ //! Main method, which calculate output.
void InitPipeLine(vtkMapper* theMapper);
VTKViewer_Actor();
//
// 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
#include <map>
#include <vector>
+/*! \brief Cell data structure*/
typedef struct {
vtkIdType cellId;
int subId;
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);
#include <set>
#include <map>
#include <vector>
-
+/*! \class vtkUnstructuredGridToUnstructuredGridFilter
+ * \brief For more information see <a href="http://www.vtk.org/">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<vtkIdType> TVectorId;
VTKViewer_ExtractUnstructuredGrid();
~VTKViewer_ExtractUnstructuredGrid();
+ //! Main method, which calculate output
void Execute();
EExtraction myExtractionMode;
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
#include <vtkPicker.h>
+/*! \class vtkPicker
+ * \brief For more information see <a href="http://www.vtk.org/">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:
~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:
};
class VTKViewer_Axis;
class VTKViewer_VectorText;
-//****************************************************************
+/*! \class vtkFollower
+ * \brief For more information see <a href="http://www.vtk.org/">VTK documentation
+ */
/*! \class VTKViewer_UnScaledActor
* \brief Same as VTK class vtkFollower
*/