From: enk Date: Mon, 4 Jul 2005 13:42:11 +0000 (+0000) Subject: Added documentation code for goxygen X-Git-Tag: V3_0_1~93 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5392d52725936aa8919c590783abb8e3796f5094;p=modules%2Fgui.git Added documentation code for goxygen --- diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.h b/src/VTKViewer/VTKViewer_GeometryFilter.h index cb1f44355..abff74f35 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.h +++ b/src/VTKViewer/VTKViewer_GeometryFilter.h @@ -6,26 +6,66 @@ #include #include - +/*! \brief This class used same as vtkGeometryFilter. See documentation on VTK for more information. + */ class VTKVIEWER_EXPORT VTKViewer_GeometryFilter : public vtkGeometryFilter { public: + /*! \fn static VTKViewer_GeometryFilter *New() + */ static VTKViewer_GeometryFilter *New(); + + /*! \fn vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter) + * \brief VTK type revision macros. + */ vtkTypeRevisionMacro(VTKViewer_GeometryFilter, vtkGeometryFilter); + /*! \fn void SetInside(int theShowInside) + * \brief Sets \a myShowInside flag. \a myShowInside is changed, call this->Modified(). + * \param theShowInside - used for changing value of \a myShowInside variable. + */ void SetInside(int theShowInside); + /*! \fn int GetInside() + * \brief Return value of \a myShowInside + * \retval myShowInside + */ int GetInside(); - + /*! \fn void SetStoreMapping(int theStoreMapping); + * \brief Sets \a myStoreMapping flag and call this->Modified() + * \param theStoreMapping - used for changing value of \a myStoreMapping variable. + */ void SetStoreMapping(int theStoreMapping); + /*! \fn int GetStoreMapping() + * \brief Return value of \a myStoreMapping + * \retval myStoreMapping + */ int GetStoreMapping(){ return myStoreMapping;} - + /*! \fn virtual vtkIdType GetNodeObjId(int theVtkID) + * \brief Return input value theVtkID + * \retval theVtkID + */ virtual vtkIdType GetNodeObjId(int theVtkID) { return theVtkID;} + /*! \fn virtual vtkIdType GetElemObjId(int theVtkID); + * \brief Return object ID by VTK ID cell + * \retval myVTK2ObjIds[theVtkID] + */ virtual vtkIdType GetElemObjId(int theVtkID); protected: + /*! \fn VTKViewer_GeometryFilter(); + * \brief Constructor which sets \a myShowInside = 0 and \a myStoreMapping = 0 + */ VTKViewer_GeometryFilter(); + /*! \fn ~VTKViewer_GeometryFilter(); + * \brief Destructor. + */ ~VTKViewer_GeometryFilter(); - + /*! \fn void Execute(); + * \brief Filter culculation method. + */ void Execute(); + /*! \fn void UnstructuredGridExecute(); + * \brief Filter culculation method for data object type is VTK_UNSTRUCTURED_GRID. + */ void UnstructuredGridExecute(); private: diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index 46fa889eb..9f27fe403 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -73,7 +73,7 @@ void VTKViewer_LineActor::Render(vtkRenderer *theRenderer) //**************************************************************** VTKViewer_Axis::VTKViewer_Axis() { - // Initialize the Line pipe-line representation + /*! \li Initialize the Line pipe-line representation*/ myLineSource = vtkLineSource::New(); myLineSource->SetPoint1(0.0,0.0,0.0); @@ -84,7 +84,7 @@ VTKViewer_Axis::VTKViewer_Axis() myLineActor->SetMapper(myMapper[0]); myLineActor->PickableOff(); - // Initialize the Arrow pipe-line representation + /*! \li Initialize the Arrow pipe-line representation*/ myConeSource = vtkConeSource::New(); myConeSource->SetResolution(2); myConeSource->SetAngle(10); @@ -100,7 +100,7 @@ VTKViewer_Axis::VTKViewer_Axis() myLineActor->SetArrowActor(myArrowActor); - // Initialize the Label pipe-line representation + /*! \li Initialize the Label pipe-line representation */ myVectorText = VTKViewer_VectorText::New(); myMapper[2] = vtkPolyDataMapper::New(); @@ -115,14 +115,14 @@ VTKViewer_Axis::VTKViewer_Axis() myLineActor->SetLabelActor(myLabelActor); - // Initialise visibility param. + /*! \li Initialise visibility param.*/ myVisibility = VTKViewer_Trihedron::eOn; } //**************************************************************** VTKViewer_Axis::~VTKViewer_Axis() { - // Destroy of the Label pipe-line representation + /*! \li Destroy of the Label pipe-line representation */ myLabelActor->Delete(); myMapper[2]->RemoveAllInputs(); @@ -130,7 +130,7 @@ VTKViewer_Axis::~VTKViewer_Axis() myVectorText->Delete(); - // Destroy of the Arrow pipe-line representation + /*! \li Destroy of the Arrow pipe-line representation */ myArrowActor->Delete(); myMapper[1]->RemoveAllInputs(); @@ -138,7 +138,7 @@ VTKViewer_Axis::~VTKViewer_Axis() myConeSource->Delete(); - // Destroy of the Arrow pipe-line representation + /*! \li Destroy of the Line pipe-line representation */ myLineActor->Delete(); myMapper[2]->RemoveAllInputs(); @@ -149,7 +149,7 @@ VTKViewer_Axis::~VTKViewer_Axis() //**************************************************************** void VTKViewer_Axis::AddToRender(vtkRenderer* theRenderer){ - //Order of the calls are important + /*! \li Order of the calls are important*/ theRenderer->AddActor(myLineActor); theRenderer->AddActor(myLabelActor); theRenderer->AddActor(myArrowActor); @@ -203,6 +203,9 @@ void VTKViewer_Axis::SetSize(float theSize) } //**************************************************************** +/*! \class VTKViewer_XAxis + * \brief X Axis actor + */ class VTKViewer_XAxis : public VTKViewer_Axis { protected: @@ -226,6 +229,9 @@ VTKViewer_XAxis::VTKViewer_XAxis(){ } //============================================================================== +/*! \class VTKViewer_YAxis + * \brief Y Axis actor + */ class VTKViewer_YAxis : public VTKViewer_Axis{ protected: VTKViewer_YAxis(); @@ -250,6 +256,9 @@ VTKViewer_YAxis::VTKViewer_YAxis() } //**************************************************************** +/*! \class VTKViewer_ZAxis + * \brief Z Axis actor + */ class VTKViewer_ZAxis : public VTKViewer_Axis { protected: diff --git a/src/VTKViewer/VTKViewer_Trihedron.h b/src/VTKViewer/VTKViewer_Trihedron.h index 25e30a19b..4618931e3 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.h +++ b/src/VTKViewer/VTKViewer_Trihedron.h @@ -18,119 +18,333 @@ class VTKViewer_Axis; class VTKViewer_VectorText; //**************************************************************** +/*! \class VTKViewer_UnScaledActor + * \brief Same as VTK class vtkFollower + */ class VTKViewer_UnScaledActor: public vtkFollower { + /*! \fn VTKViewer_UnScaledActor(const VTKViewer_UnScaledActor&) + */ VTKViewer_UnScaledActor(const VTKViewer_UnScaledActor&); public: + + /*! \fn vtkTypeMacro(VTKViewer_UnScaledActor,vtkFollower); + * \brief VTK type macros. + */ vtkTypeMacro(VTKViewer_UnScaledActor,vtkFollower); + + /*! \fn static VTKViewer_UnScaledActor *New(); + */ static VTKViewer_UnScaledActor *New(); + /*! \fn virtual void SetSize(int theSize); + * \brief Sets \a mySize= \a theSize variable. + * \param theSize - integer size + */ virtual void SetSize(int theSize); + /*! \fn virtual void Render(vtkRenderer *theRenderer); + * \brief Render function. + */ virtual void Render(vtkRenderer *theRenderer); protected: + /*! \fn VTKViewer_UnScaledActor(); + * \brief Constructor. + */ VTKViewer_UnScaledActor(); + /*! \fn VTKViewer_UnScaledActor(); + * \brief Destructor.. + */ ~VTKViewer_UnScaledActor(){} + int mySize; }; //**************************************************************** +/*! \class VTKViewer_LineActor + */ class VTKViewer_LineActor: public vtkFollower { + /*! \fn VTKViewer_LineActor(const VTKViewer_LineActor&); + */ VTKViewer_LineActor(const VTKViewer_LineActor&); public: + /*! \fn vtkTypeMacro(VTKViewer_LineActor,vtkFollower); + * \brief VTK type macros. + */ vtkTypeMacro(VTKViewer_LineActor,vtkFollower); + + /*! \fn static VTKViewer_LineActor *New(); + */ static VTKViewer_LineActor *New(); + /*! \fn void SetLabelActor(VTKViewer_UnScaledActor* theLabelActor); + * \brief Sets Lable actor. + * \param theLabelActor - VTKViewer_UnScaledActor + */ void SetLabelActor(VTKViewer_UnScaledActor* theLabelActor); + + /*! \fn void SetArrowActor(VTKViewer_UnScaledActor* theLabelActor); + * \brief Sets Arrow actor. + * \param theLabelActor - VTKViewer_UnScaledActor + */ void SetArrowActor(VTKViewer_UnScaledActor* theLabelActor); + + /*! \fn virtual void Render(vtkRenderer *theRenderer); + * \brief Adds theRenderer to \a LabelActor and \a ArrowActor, if need. + */ virtual void Render(vtkRenderer *theRenderer); protected: + + /*! \fn VTKViewer_LineActor() + * \brief Constructor which sets \a LabelActor and \a ArrowActor to NULL + */ VTKViewer_LineActor(){ LabelActor = NULL; ArrowActor = NULL; } + + /*! \fn ~VTKViewer_LineActor() + * \brief Destructor which call SetLabelActor(NULL) and SetArrowActor(NULL) + */ ~VTKViewer_LineActor(){ SetLabelActor(NULL); SetArrowActor(NULL); } - + + /*! \var LabelActor + * \brief Label actor pointer + */ VTKViewer_UnScaledActor* LabelActor; + + /*! \var ArrowActor + * \brief Arrow actor pointer + */ VTKViewer_UnScaledActor* ArrowActor; }; //**************************************************************** +/*! \class VTKViewer_Trihedron + */ class VTKVIEWER_EXPORT VTKViewer_Trihedron : public vtkObject { protected: + /*! \fn VTKViewer_Trihedron(); + * \brief Initialize fields by default values. + */ VTKViewer_Trihedron(); + + /*! \fn VTKViewer_Trihedron(const VTKViewer_Trihedron&); + * \brief Const copy constructor. + */ VTKViewer_Trihedron(const VTKViewer_Trihedron&); + + /*! \fn ~VTKViewer_Trihedron(); + * \brief Destructor. Remove all fileds. + */ virtual ~VTKViewer_Trihedron(); public: + /*! \fn vtkTypeMacro(VTKViewer_Trihedron,vtkObject); + * \brief VTK type macros. + */ vtkTypeMacro(VTKViewer_Trihedron,vtkObject); + + /*! \fn static VTKViewer_Trihedron *New(); + */ static VTKViewer_Trihedron *New(); + /*! \fn virtual void SetSize(float theSize); + * \brief Sets size of trihedron. + * \param theSize - float value + */ virtual void SetSize(float theSize); + + /*! \fn virtual float GetSize() { return mySize;} + * \brief Get size of trihedron. + * \retval mySize - float value + */ virtual float GetSize() { return mySize;} enum TVisibility{eOff, eOn, eOnlyLineOn}; + + /*! \fn virtual void SetVisibility(TVisibility theVis); + * \brief Sets visibility for all Axis in \a theVis + */ virtual void SetVisibility(TVisibility theVis); + + /*! \fn virtual void VisibilityOff() + * \brief OFF visibility for all Axis. + */ virtual void VisibilityOff() { SetVisibility(eOff);} + + /*! \fn virtual void VisibilityOn() + * \brief ON visibility for all Axis. + */ virtual void VisibilityOn() { SetVisibility(eOn);} + + /*! \fn virtual TVisibility GetVisibility(); + * \brief Gets visibility of myAxis[0] actor. + */ virtual TVisibility GetVisibility(); + /*! \fn virtual void AddToRender(vtkRenderer* theRenderer); + * \brief Add to render all Axis + * \param theRenderer - vtkRenderer pointer + */ virtual void AddToRender(vtkRenderer* theRenderer); + + /*! \fn virtual void RemoveFromRender(vtkRenderer* theRenderer); + * \brief Remove all actors from \a theRenderer which are in myPresent. + * \param theRenderer - vtkRenderer pointer + */ virtual void RemoveFromRender(vtkRenderer* theRenderer); + /*! \fn virtual int GetVisibleActorCount(vtkRenderer* theRenderer); + * \brief Return count of visible actors. + * \param theRenderer - vtkRenderer pointer + */ virtual int GetVisibleActorCount(vtkRenderer* theRenderer); protected: + /*! \var myPresent + * \brief Actor collection + */ vtkActorCollection* myPresent; + + /*! \var myAxis[3] + * \brief \li myAxis[0] - X Axis actor + * \brief \li myAxis[1] - Y Axis actor + * \brief \li myAxis[2] - Z Axis actor + */ VTKViewer_Axis* myAxis[3]; + + /*! \var mySize + * \brief Common size for trihedron, for each axis. + */ float mySize; }; //**************************************************************** -// The base class for concreate Axis -// Its only duty is to give correct initialization and destruction -// of its pipe-lines +/*! \class VTKViewer_Axis + * \brief The base class for concreate Axis. + * Its only duty is to give correct initialization and destruction + * of its pipe-lines + */ class VTKViewer_Axis : public vtkObject { protected: + /*! \fn VTKViewer_Axis() + */ VTKViewer_Axis(); + /*! \fn VTKViewer_Axis(const VTKViewer_Axis&) + */ VTKViewer_Axis(const VTKViewer_Axis&); + /*! \fn virtual ~VTKViewer_Axis() + */ virtual ~VTKViewer_Axis(); + public: + /*! \fn vtkTypeMacro(VTKViewer_Axis,vtkObject); + * \brief VTK type macros. + */ vtkTypeMacro(VTKViewer_Axis,vtkObject); + /*! \fn virtual void AddToRender(vtkRenderer* theRenderer); + * \brief Add to \a theRenderer actors: myLineActor,myLabelActor,myArrowActor + */ virtual void AddToRender(vtkRenderer* theRenderer); + /*! \fn virtual void SetVisibility(VTKViewer_Trihedron::TVisibility theVis); + * \brief Sets visibility for actors: myLineActor,myLabelActor,myArrowActor + */ virtual void SetVisibility(VTKViewer_Trihedron::TVisibility theVis); + + /*! \fn virtual VTKViewer_Trihedron::TVisibility GetVisibility() + * \brief Return visibility of VTKViewer_Axis + * \retval myVisibility + */ virtual VTKViewer_Trihedron::TVisibility GetVisibility() { return myVisibility; } + /*! \fn virtual void SetCamera(vtkCamera* theCamera); + * \brief Set camera for myLabelActor + */ virtual void SetCamera(vtkCamera* theCamera); - virtual void SetProperty(vtkProperty* theProperty); + + /*! \fn virtual void SetProperty(vtkProperty* theProperty); + * \brief Sets \a theProperty for actors: myLineActor,myLabelActor,myArrowActor + */ + virtual void SetProperty(vtkProperty* theProperty); + + /*! \fn virtual void SetSize(float theSize); + * \brief Set size of VTKViewer_Axis + */ virtual void SetSize(float theSize); + /*! \fn virtual VTKViewer_UnScaledActor* GetLabel() + * \brief Get label actor. + * \retval Return myLabelActor. + */ virtual VTKViewer_UnScaledActor* GetLabel() { return myLabelActor; } + + /*! \fn virtual VTKViewer_UnScaledActor* GetArrow() + * \brief Get arrow actor. + * \retval Return myArrowActor + */ virtual VTKViewer_UnScaledActor* GetArrow() { return myArrowActor; } protected: + /*! \var myVisibility + * \brief Visibility flag. + */ VTKViewer_Trihedron::TVisibility myVisibility; + + /*! \var myDir[3] + * \brief Direction vector + */ + /*! \var myRot[3] + * \brief Orientation vector + */ float myDir[3], myRot[3]; + /*! \var myLineActor + * \brief VTKViewer_LineActor actor pointer + */ VTKViewer_LineActor *myLineActor; - //vtkActor *myLineActor; + + /*! \var myArrowActor + * \brief VTKViewer_UnScaledActor actor pointer + */ VTKViewer_UnScaledActor *myArrowActor; + + /*! \var myLabelActor + * \brief VTKViewer_UnScaledActor actor pointer + */ VTKViewer_UnScaledActor *myLabelActor; + /*! \var myMapper[3] + * \brief \li myMapper[0] - for the Line pipe-line representation + * \brief \li myMapper[1] - for the Arrow pipe-line representation + * \brief \li myMapper[2] - for the Label pipe-line representation + */ vtkPolyDataMapper *myMapper[3]; + + /*! \var myLineSource + * \brief vtkLineSource pointer (Line) + */ vtkLineSource *myLineSource; + + /*! \var myConeSource + * \brief vtkConeSource pointer (Arrow) + */ vtkConeSource *myConeSource; + + /*! \var myVectorText + * \brief VTKViewer_VectorText pointer (Label) + */ VTKViewer_VectorText* myVectorText; };