From: enk Date: Fri, 22 Jul 2005 03:55:14 +0000 (+0000) Subject: Update comments. X-Git-Tag: V3_0_1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=08209796122a4ed12a8bf21b4b2e3e54119e6f4b;p=modules%2Fgui.git Update comments. --- diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx index e6dfc3f86..f980b5c0d 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.cxx +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.cxx @@ -46,16 +46,17 @@ static int MYDEBUGWITHFILES = 0; vtkCxxRevisionMacro(VTKViewer_ShrinkFilter, "$Revision$"); vtkStandardNewMacro(VTKViewer_ShrinkFilter); - +/*!Constructor. Sets store mapping to zero.*/ VTKViewer_ShrinkFilter::VTKViewer_ShrinkFilter(): myStoreMapping(0) {} - +/*!Destructor.*/ VTKViewer_ShrinkFilter::~VTKViewer_ShrinkFilter() {} +/*!Execute method. Calculate output.*/ void VTKViewer_ShrinkFilter::Execute() { vtkPoints *newPts; @@ -163,13 +164,16 @@ void VTKViewer_ShrinkFilter::Execute() newPts->Delete(); } - +/*!Sets store mapping.*/ void VTKViewer_ShrinkFilter::SetStoreMapping(int theStoreMapping){ myStoreMapping = theStoreMapping; this->Modified(); } +/*!Return node object id by vtk node id. + *\retval -1 - if no object, else return id. + */ vtkIdType VTKViewer_ShrinkFilter::GetNodeObjId(int theVtkID){ if(myVTK2ObjIds.empty() || theVtkID > myVTK2ObjIds.size()) return -1; return myVTK2ObjIds.at(theVtkID); diff --git a/src/VTKViewer/VTKViewer_ShrinkFilter.h b/src/VTKViewer/VTKViewer_ShrinkFilter.h index 7a72a05c5..51b4e6624 100755 --- a/src/VTKViewer/VTKViewer_ShrinkFilter.h +++ b/src/VTKViewer/VTKViewer_ShrinkFilter.h @@ -7,16 +7,22 @@ #include +/*!Shrink cells composing an arbitrary data set. + *\warning It is possible to turn cells inside out or cause self intersection in special cases. + */ class VTKVIEWER_EXPORT VTKViewer_ShrinkFilter : public vtkShrinkFilter { public: + /*!Create new instance of VTKViewer_ShrinkFilter.*/ static VTKViewer_ShrinkFilter *New(); vtkTypeRevisionMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter); void SetStoreMapping(int theStoreMapping); + /*!Gets store mapping flag.*/ int GetStoreMapping(){ return myStoreMapping;} virtual vtkIdType GetNodeObjId(int theVtkID); + /*!Return element id by vtk id.*/ virtual vtkIdType GetElemObjId(int theVtkID) { return theVtkID;} protected: @@ -24,6 +30,7 @@ protected: ~VTKViewer_ShrinkFilter(); void Execute(); + /*!Not implemented.*/ void UnstructuredGridExecute(); private: diff --git a/src/VTKViewer/VTKViewer_Transform.cxx b/src/VTKViewer/VTKViewer_Transform.cxx index 63d60d666..d0f7db712 100755 --- a/src/VTKViewer/VTKViewer_Transform.cxx +++ b/src/VTKViewer/VTKViewer_Transform.cxx @@ -36,6 +36,7 @@ static double EPS = 10e-4; vtkStandardNewMacro(VTKViewer_Transform); +/*!Sets matrix scale.*/ void VTKViewer_Transform::SetMatrixScale(double theScaleX, double theScaleY, double theScaleZ){ double aMatrix[16] = {theScaleX,0,0,0, 0,theScaleY,0,0, @@ -44,6 +45,7 @@ void VTKViewer_Transform::SetMatrixScale(double theScaleX, double theScaleY, dou this->SetMatrix(aMatrix); } +/*!Gets matrix scale.*/ void VTKViewer_Transform::GetMatrixScale(double theScale[3]){ vtkMatrix4x4 *aTMatrix=this->GetMatrix(); const double aScaleX = aTMatrix->GetElement(0,0); @@ -54,6 +56,9 @@ void VTKViewer_Transform::GetMatrixScale(double theScale[3]){ theScale[2] = aScaleZ; } +/*!Checks: Is matrix identity, where used EPS value. + *If |aScaleX-1|GetMatrixScale(aScale); diff --git a/src/VTKViewer/VTKViewer_Transform.h b/src/VTKViewer/VTKViewer_Transform.h index bbac32bf3..25b6d07be 100755 --- a/src/VTKViewer/VTKViewer_Transform.h +++ b/src/VTKViewer/VTKViewer_Transform.h @@ -5,9 +5,13 @@ #include +/*!\brief Describes linear transformations via a 4x4 matrix. + *@see vtkTransform class + */ class VTKVIEWER_EXPORT VTKViewer_Transform : public vtkTransform { public: + /*!Create new instance of VTKViewer_Transform.*/ static VTKViewer_Transform *New(); vtkTypeMacro( VTKViewer_Transform, vtkTransform ); @@ -17,11 +21,15 @@ public: void GetMatrixScale(double theScale[3]); protected: - VTKViewer_Transform() {} - VTKViewer_Transform(const VTKViewer_Transform&) {} - ~VTKViewer_Transform() {} + /*!Constructor.*/ + VTKViewer_Transform() {/*!Do nothing*/} + /*!Copy contructor.*/ + VTKViewer_Transform(const VTKViewer_Transform&) {/*!Do nothing*/} + /*!Destructor.*/ + ~VTKViewer_Transform() {/*!Do nothing*/} - void operator=( const VTKViewer_Transform& ) {} + /*!Operator = */ + void operator=( const VTKViewer_Transform& ) {/*!Do nothing*/} }; #endif diff --git a/src/VTKViewer/VTKViewer_TransformFilter.cxx b/src/VTKViewer/VTKViewer_TransformFilter.cxx index e1d1ade95..f54e97de1 100755 --- a/src/VTKViewer/VTKViewer_TransformFilter.cxx +++ b/src/VTKViewer/VTKViewer_TransformFilter.cxx @@ -38,6 +38,7 @@ vtkStandardNewMacro(VTKViewer_TransformFilter); +/*!Execution method. Calculate output.*/ void VTKViewer_TransformFilter::Execute(){ vtkPoints *inPts; vtkPoints *newPts; diff --git a/src/VTKViewer/VTKViewer_TransformFilter.h b/src/VTKViewer/VTKViewer_TransformFilter.h index 577d3efe1..c82b63298 100755 --- a/src/VTKViewer/VTKViewer_TransformFilter.h +++ b/src/VTKViewer/VTKViewer_TransformFilter.h @@ -5,17 +5,25 @@ #include +/*!Transform points and associated normals and vectors + *@see vtkTransformFilter + */ class VTKVIEWER_EXPORT VTKViewer_TransformFilter : public vtkTransformFilter { public: + /*!Create new instance of VTKViewer_TransformFilter.*/ static VTKViewer_TransformFilter *New(); vtkTypeMacro(VTKViewer_TransformFilter,vtkTransformFilter); protected: - VTKViewer_TransformFilter() {} - ~VTKViewer_TransformFilter() {} - VTKViewer_TransformFilter(const VTKViewer_TransformFilter&) {} - void operator=(const VTKViewer_TransformFilter&) {} + /*!Constructor.*/ + VTKViewer_TransformFilter() {/*!Do nothing*/} + /*!Destructor.*/ + ~VTKViewer_TransformFilter() {/*!Do nothing*/} + /*!Copy constructor.*/ + VTKViewer_TransformFilter(const VTKViewer_TransformFilter&) {/*!Do nothing*/} + /*!Operator = */ + void operator=(const VTKViewer_TransformFilter&) {/*!Do nothing*/} void Execute(); }; diff --git a/src/VTKViewer/VTKViewer_Trihedron.cxx b/src/VTKViewer/VTKViewer_Trihedron.cxx index 9f27fe403..0ee7a5986 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.cxx +++ b/src/VTKViewer/VTKViewer_Trihedron.cxx @@ -19,10 +19,12 @@ vtkStandardNewMacro(VTKViewer_UnScaledActor); -//**************************************************************** -VTKViewer_UnScaledActor::VTKViewer_UnScaledActor() {} +/*!Constructor*/ +VTKViewer_UnScaledActor::VTKViewer_UnScaledActor() {/*!Do nothing*/} -//**************************************************************** +/*!This causes the actor to be rendered. + * Set new scale for actor. + */ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer) { if(theRenderer){ @@ -46,7 +48,9 @@ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer) vtkFollower::Render(theRenderer); } -//**************************************************************** +/*! Sets \a mySize= \a theSize variable. + * \param theSize - integer size + */ void VTKViewer_UnScaledActor::SetSize(int theSize){ mySize = theSize; } @@ -56,7 +60,7 @@ vtkStandardNewMacro(VTKViewer_LineActor); vtkCxxSetObjectMacro(VTKViewer_LineActor,LabelActor,VTKViewer_UnScaledActor); vtkCxxSetObjectMacro(VTKViewer_LineActor,ArrowActor,VTKViewer_UnScaledActor); -//**************************************************************** +/*!Adds Label and Arrow actors to \a theRenderer.*/ void VTKViewer_LineActor::Render(vtkRenderer *theRenderer) { if(LabelActor && LabelActor->GetVisibility()){ @@ -70,7 +74,6 @@ void VTKViewer_LineActor::Render(vtkRenderer *theRenderer) vtkFollower::Render(theRenderer); } -//**************************************************************** VTKViewer_Axis::VTKViewer_Axis() { /*! \li Initialize the Line pipe-line representation*/ @@ -119,7 +122,6 @@ VTKViewer_Axis::VTKViewer_Axis() myVisibility = VTKViewer_Trihedron::eOn; } -//**************************************************************** VTKViewer_Axis::~VTKViewer_Axis() { /*! \li Destroy of the Label pipe-line representation */ @@ -147,7 +149,6 @@ VTKViewer_Axis::~VTKViewer_Axis() myLineSource->Delete(); } -//**************************************************************** void VTKViewer_Axis::AddToRender(vtkRenderer* theRenderer){ /*! \li Order of the calls are important*/ theRenderer->AddActor(myLineActor); @@ -155,7 +156,6 @@ void VTKViewer_Axis::AddToRender(vtkRenderer* theRenderer){ theRenderer->AddActor(myArrowActor); } -//**************************************************************** void VTKViewer_Axis::SetVisibility(VTKViewer_Trihedron::TVisibility theVis) { switch(theVis){ @@ -181,14 +181,12 @@ void VTKViewer_Axis::SetCamera(vtkCamera* theCamera){ myLabelActor->SetCamera(theCamera); } -//**************************************************************** void VTKViewer_Axis::SetProperty(vtkProperty* theProperty){ myLabelActor->SetProperty(theProperty); myArrowActor->SetProperty(theProperty); myLineActor->SetProperty(theProperty); } -//**************************************************************** void VTKViewer_Axis::SetSize(float theSize) { float aPosition[3] = {myDir[0]*theSize, myDir[1]*theSize, myDir[2]*theSize}; @@ -202,7 +200,6 @@ void VTKViewer_Axis::SetSize(float theSize) myLabelActor->AddPosition(aPosition); } -//**************************************************************** /*! \class VTKViewer_XAxis * \brief X Axis actor */ @@ -218,6 +215,7 @@ public: vtkStandardNewMacro(VTKViewer_XAxis); +/*!Initialize X Axis*/ VTKViewer_XAxis::VTKViewer_XAxis(){ myDir[0] = 1.0; myDir[1] = 0.0; myDir[2] = 0.0; myRot[0] = 0.0; myRot[1] = 0.0; myRot[2] = 0.0; @@ -228,7 +226,6 @@ VTKViewer_XAxis::VTKViewer_XAxis(){ aProperty->Delete(); } -//============================================================================== /*! \class VTKViewer_YAxis * \brief Y Axis actor */ @@ -243,7 +240,7 @@ public: vtkStandardNewMacro(VTKViewer_YAxis); -//**************************************************************** +/*!Initialize Y Axis*/ VTKViewer_YAxis::VTKViewer_YAxis() { myDir[0] = 0.0; myDir[1] = 1.0; myDir[2] = 0.0; @@ -255,7 +252,6 @@ VTKViewer_YAxis::VTKViewer_YAxis() aProperty->Delete(); } -//**************************************************************** /*! \class VTKViewer_ZAxis * \brief Z Axis actor */ @@ -271,7 +267,7 @@ public: vtkStandardNewMacro(VTKViewer_ZAxis); -//**************************************************************** +/*!Initialize Z Axis*/ VTKViewer_ZAxis::VTKViewer_ZAxis() { myDir[0] = 0.0; myDir[1] = 0.0; myDir[2] = 1.0; @@ -285,7 +281,6 @@ VTKViewer_ZAxis::VTKViewer_ZAxis() vtkStandardNewMacro(VTKViewer_Trihedron); -//**************************************************************** VTKViewer_Trihedron::VTKViewer_Trihedron() { myPresent = vtkActorCollection::New(); @@ -296,7 +291,6 @@ VTKViewer_Trihedron::VTKViewer_Trihedron() SetSize(aSize); } -//**************************************************************** VTKViewer_Trihedron::~VTKViewer_Trihedron() { myPresent->RemoveAllItems(); @@ -305,7 +299,6 @@ VTKViewer_Trihedron::~VTKViewer_Trihedron() myAxis[i]->Delete(); } -//**************************************************************** void VTKViewer_Trihedron::SetSize(float theSize) { mySize = theSize; @@ -313,20 +306,17 @@ void VTKViewer_Trihedron::SetSize(float theSize) myAxis[i]->SetSize(theSize); } -//**************************************************************** void VTKViewer_Trihedron::SetVisibility(TVisibility theVis) { for(int i = 0; i < 3; i++) myAxis[i]->SetVisibility(theVis); } -//**************************************************************** VTKViewer_Trihedron::TVisibility VTKViewer_Trihedron::GetVisibility() { return myAxis[0]->GetVisibility(); } -//**************************************************************** void VTKViewer_Trihedron::AddToRender(vtkRenderer* theRenderer) { vtkCamera* aCamera = theRenderer->GetActiveCamera(); @@ -336,7 +326,6 @@ void VTKViewer_Trihedron::AddToRender(vtkRenderer* theRenderer) } } -//**************************************************************** void VTKViewer_Trihedron::RemoveFromRender(vtkRenderer* theRenderer) { myPresent->InitTraversal(); @@ -344,7 +333,6 @@ void VTKViewer_Trihedron::RemoveFromRender(vtkRenderer* theRenderer) theRenderer->RemoveActor(anActor); } -//**************************************************************** int VTKViewer_Trihedron::GetVisibleActorCount(vtkRenderer* theRenderer) { //TVisibility aVis = GetVisibility(); diff --git a/src/VTKViewer/VTKViewer_Trihedron.h b/src/VTKViewer/VTKViewer_Trihedron.h index fcfa9ee86..63bf4bd78 100755 --- a/src/VTKViewer/VTKViewer_Trihedron.h +++ b/src/VTKViewer/VTKViewer_Trihedron.h @@ -18,334 +18,245 @@ class VTKViewer_Axis; class VTKViewer_VectorText; /*! \class vtkFollower - * \brief For more information see VTK documentation + * See vtk documentation */ -/*! \class VTKViewer_UnScaledActor - * \brief Same as VTK class vtkFollower +/*!a subclass of actor that always faces the camera + *@see 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(); - */ + /*!Create new instance of VTKViewer_UnScaledActor.*/ 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.. - */ + /*!Destructor. Do nothing.*/ ~VTKViewer_UnScaledActor(){} int mySize; }; -//**************************************************************** -/*! \class VTKViewer_LineActor +/*!a subclass of actor that always faces the camera + *@see vtkFollower */ 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. - */ + /*!vtk type macros.*/ vtkTypeMacro(VTKViewer_LineActor,vtkFollower); - /*! \fn static VTKViewer_LineActor *New(); - */ + /*!Create new instance of VTKViewer_LineActor.*/ static VTKViewer_LineActor *New(); - /*! \fn void SetLabelActor(VTKViewer_UnScaledActor* theLabelActor); - * \brief Sets Lable actor. + /*! Sets Lable actor. * \param theLabelActor - VTKViewer_UnScaledActor */ void SetLabelActor(VTKViewer_UnScaledActor* theLabelActor); - /*! \fn void SetArrowActor(VTKViewer_UnScaledActor* theLabelActor); - * \brief Sets Arrow actor. + /*! 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 - */ + /*! 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) - */ + /*!Destructor which call SetLabelActor(NULL) and SetArrowActor(NULL)*/ ~VTKViewer_LineActor(){ SetLabelActor(NULL); SetArrowActor(NULL); } - /*! \var LabelActor - * \brief Label actor pointer - */ + /*!Label actor pointer*/ VTKViewer_UnScaledActor* LabelActor; - /*! \var ArrowActor - * \brief Arrow actor pointer - */ + /*!Arrow actor pointer*/ VTKViewer_UnScaledActor* ArrowActor; }; //**************************************************************** -/*! \class VTKViewer_Trihedron - */ +/*!This class provide support trihedron object in vtk viewer.*/ class VTKVIEWER_EXPORT VTKViewer_Trihedron : public vtkObject { protected: - /*! \fn VTKViewer_Trihedron(); - * \brief Initialize fields by default values. - */ + /*!Initialize fields by default values.*/ VTKViewer_Trihedron(); - /*! \fn VTKViewer_Trihedron(const VTKViewer_Trihedron&); - * \brief Const copy constructor. - */ + /*!Const copy constructor.*/ VTKViewer_Trihedron(const VTKViewer_Trihedron&); - /*! \fn ~VTKViewer_Trihedron(); - * \brief Destructor. Remove all fileds. - */ + /*!Destructor. Remove all fileds.*/ virtual ~VTKViewer_Trihedron(); public: - /*! \fn vtkTypeMacro(VTKViewer_Trihedron,vtkObject); - * \brief VTK type macros. - */ + /*!vtk type macros.*/ vtkTypeMacro(VTKViewer_Trihedron,vtkObject); - /*! \fn static VTKViewer_Trihedron *New(); - */ + /*!Create new instance of VTKViewer_Trihedron.*/ static VTKViewer_Trihedron *New(); - /*! \fn virtual void SetSize(float theSize); - * \brief Sets size of trihedron. + /*!Sets size of trihedron. * \param theSize - float value */ virtual void SetSize(float theSize); - /*! \fn virtual float GetSize() { return mySize;} - * \brief Get size of trihedron. + /*! 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 - */ + /*! Sets visibility for all Axis to \a theVis*/ virtual void SetVisibility(TVisibility theVis); - /*! \fn virtual void VisibilityOff() - * \brief OFF visibility for all Axis. - */ + /*! OFF visibility for all Axis.*/ virtual void VisibilityOff() { SetVisibility(eOff);} - /*! \fn virtual void VisibilityOn() - * \brief ON visibility for all Axis. - */ + /*! ON visibility for all Axis.*/ virtual void VisibilityOn() { SetVisibility(eOn);} - /*! \fn virtual TVisibility GetVisibility(); - * \brief Gets visibility of myAxis[0] actor. - */ + /*! Gets visibility of myAxis[0] actor.*/ virtual TVisibility GetVisibility(); - /*! \fn virtual void AddToRender(vtkRenderer* theRenderer); - * \brief Add to render all Axis + /*! 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. + /*! 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. + /*! Return count of visible actors. * \param theRenderer - vtkRenderer pointer */ virtual int GetVisibleActorCount(vtkRenderer* theRenderer); protected: - /*! \var myPresent - * \brief Actor collection - */ + /*! 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 + /*! \li myAxis[0] - X Axis actor + * \li myAxis[1] - Y Axis actor + * \li myAxis[2] - Z Axis actor */ VTKViewer_Axis* myAxis[3]; - /*! \var mySize - * \brief Common size for trihedron, for each axis. - */ + /*! Common size for trihedron, for each axis.*/ float mySize; }; //**************************************************************** -/*! \class VTKViewer_Axis - * \brief The base class for concreate Axis. +/*!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. - */ + /*!vtk type macros.*/ vtkTypeMacro(VTKViewer_Axis,vtkObject); - /*! \fn virtual void AddToRender(vtkRenderer* theRenderer); - * \brief Add to \a theRenderer actors: myLineActor,myLabelActor,myArrowActor + /*! 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 + /*! 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 + /*! 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 + /*! Set camera for myLabelActor */ virtual void SetCamera(vtkCamera* theCamera); - /*! \fn virtual void SetProperty(vtkProperty* theProperty); - * \brief Sets \a theProperty for actors: myLineActor,myLabelActor,myArrowActor + /*! 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 + /*! Set size of VTKViewer_Axis */ virtual void SetSize(float theSize); - /*! \fn virtual VTKViewer_UnScaledActor* GetLabel() - * \brief Get label actor. + /*! Get label actor. * \retval Return myLabelActor. */ virtual VTKViewer_UnScaledActor* GetLabel() { return myLabelActor; } - /*! \fn virtual VTKViewer_UnScaledActor* GetArrow() - * \brief Get arrow actor. + /*! Get arrow actor. * \retval Return myArrowActor */ virtual VTKViewer_UnScaledActor* GetArrow() { return myArrowActor; } protected: - /*! \var myVisibility - * \brief Visibility flag. + /*! Visibility flag. */ VTKViewer_Trihedron::TVisibility myVisibility; /*! \var myDir[3] - * \brief Direction vector + * Direction vector */ /*! \var myRot[3] - * \brief Orientation vector + * Orientation vector */ float myDir[3], myRot[3]; - /*! \var myLineActor - * \brief VTKViewer_LineActor actor pointer + /*! VTKViewer_LineActor actor pointer */ VTKViewer_LineActor *myLineActor; - /*! \var myArrowActor - * \brief VTKViewer_UnScaledActor actor pointer + /*! VTKViewer_UnScaledActor actor pointer */ VTKViewer_UnScaledActor *myArrowActor; - /*! \var myLabelActor - * \brief VTKViewer_UnScaledActor actor pointer + /*! 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 + /*! \li myMapper[0] - for the Line pipe-line representation + * \li myMapper[1] - for the Arrow pipe-line representation + * \li myMapper[2] - for the Label pipe-line representation */ vtkPolyDataMapper *myMapper[3]; - /*! \var myLineSource - * \brief vtkLineSource pointer (Line) + /*! vtkLineSource pointer (Line) */ vtkLineSource *myLineSource; - /*! \var myConeSource - * \brief vtkConeSource pointer (Arrow) + /*! vtkConeSource pointer (Arrow) */ vtkConeSource *myConeSource; - /*! \var myVectorText - * \brief VTKViewer_VectorText pointer (Label) + /*! VTKViewer_VectorText pointer (Label) */ VTKViewer_VectorText* myVectorText; }; diff --git a/src/VTKViewer/VTKViewer_Utilities.cxx b/src/VTKViewer/VTKViewer_Utilities.cxx index 52c7bbcad..9ed586d6f 100755 --- a/src/VTKViewer/VTKViewer_Utilities.cxx +++ b/src/VTKViewer/VTKViewer_Utilities.cxx @@ -8,8 +8,7 @@ #include "VTKViewer_Utilities.h" -//**************************************************************** -//see vtkRenderer::ResetCamera(float bounds[6]) method +/*!@see vtkRenderer::ResetCamera(float bounds[6]) method*/ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint) { if(!theRenderer) return; @@ -65,8 +64,7 @@ void ResetCamera(vtkRenderer* theRenderer, int theUsingZeroFocalPoint) ResetCameraClippingRange(theRenderer); } -//**************************************************************** -// Compute the bounds of the visible props +/*! Compute the bounds of the visible props*/ int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6]) { float *bounds; @@ -123,8 +121,7 @@ int ComputeVisiblePropBounds(vtkRenderer* theRenderer, float theBounds[6]) return aCount; } -//**************************************************************** -//see vtkRenderer::ResetCameraClippingRange(float bounds[6]) method +/*!@see vtkRenderer::ResetCameraClippingRange(float bounds[6]) method*/ void ResetCameraClippingRange(vtkRenderer* theRenderer) { if(!theRenderer || !theRenderer->VisibleActorCount()) return; @@ -164,6 +161,7 @@ void ResetCameraClippingRange(vtkRenderer* theRenderer) anActiveCamera->SetClippingRange( range ); } +/*!Compute trihedron size.*/ bool ComputeTrihedronSize( vtkRenderer* theRenderer,double& theNewSize, const double theSize, const float theSizeInPercents ) { diff --git a/src/VTKViewer/VTKViewer_VectorText.cxx b/src/VTKViewer/VTKViewer_VectorText.cxx index d0ee379d6..1fd9d6a19 100755 --- a/src/VTKViewer/VTKViewer_VectorText.cxx +++ b/src/VTKViewer/VTKViewer_VectorText.cxx @@ -1545,7 +1545,7 @@ char *VTK_VECTOR_TEXT_126 = (char *) "25 0.971429 " ; -// Construct object with no string set and backing enabled. +/*! Construct object with no string set and backing enabled.*/ VTKViewer_VectorText::VTKViewer_VectorText() { this->Text = NULL; @@ -1647,6 +1647,7 @@ VTKViewer_VectorText::VTKViewer_VectorText() } +/*!Calculate output.*/ void VTKViewer_VectorText::Execute() { vtkPolyData *output = this->GetOutput(); @@ -1739,6 +1740,7 @@ void VTKViewer_VectorText::PrintSelf(ostream& os, vtkIndent indent) os << indent << "Text: " << (this->Text ? this->Text : "(none)") << "\n"; } +/*!Destructor.*/ VTKViewer_VectorText::~VTKViewer_VectorText() { if (this->Text) diff --git a/src/VTKViewer/VTKViewer_VectorText.h b/src/VTKViewer/VTKViewer_VectorText.h index 660257a35..15c6a57f3 100755 --- a/src/VTKViewer/VTKViewer_VectorText.h +++ b/src/VTKViewer/VTKViewer_VectorText.h @@ -39,7 +39,9 @@ #define __VTKViewer_VectorText_h #include "vtkPolyDataSource.h" - +/*!Generates vtkPolyData from an input text string. + *@see vtkVectorText + */ class VTKViewer_VectorText : public vtkPolyDataSource { public: diff --git a/src/VTKViewer/VTKViewer_ViewManager.cxx b/src/VTKViewer/VTKViewer_ViewManager.cxx index 67c2eb293..4ce4414ab 100755 --- a/src/VTKViewer/VTKViewer_ViewManager.cxx +++ b/src/VTKViewer/VTKViewer_ViewManager.cxx @@ -3,7 +3,9 @@ int VTKViewer_ViewManager::_VTKViewMgr_Id = 0; -//*************************************************************** +/*!Constructor.Initialize SIUT_ViewManager by \a study and \a theDesktop. + * Create new instance of VTKViewer_Viewer and set view model by it. + */ VTKViewer_ViewManager::VTKViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* theDesktop ) : SUIT_ViewManager( study, theDesktop ) { @@ -11,12 +13,13 @@ VTKViewer_ViewManager::VTKViewer_ViewManager( SUIT_Study* study, SUIT_Desktop* t setViewModel( new VTKViewer_Viewer() ); } -//*************************************************************** +/*!Destructor.*/ VTKViewer_ViewManager::~VTKViewer_ViewManager() { + /*!Do nothing.*/ } -//*************************************************************** +/*!Sets view window name*/ void VTKViewer_ViewManager::setViewName(SUIT_ViewWindow* theView) { int aPos = myViews.find(theView); diff --git a/src/VTKViewer/VTKViewer_ViewManager.h b/src/VTKViewer/VTKViewer_ViewManager.h index 82df22c15..1d23edaca 100755 --- a/src/VTKViewer/VTKViewer_ViewManager.h +++ b/src/VTKViewer/VTKViewer_ViewManager.h @@ -7,6 +7,7 @@ class SUIT_Desktop; +/*!View manager.*/ class VTKVIEWER_EXPORT VTKViewer_ViewManager : public SUIT_ViewManager { Q_OBJECT diff --git a/src/VTKViewer/VTKViewer_ViewModel.cxx b/src/VTKViewer/VTKViewer_ViewModel.cxx index 084a200c6..b762a6a5e 100755 --- a/src/VTKViewer/VTKViewer_ViewModel.cxx +++ b/src/VTKViewer/VTKViewer_ViewModel.cxx @@ -13,30 +13,32 @@ #include #include -//**************************************************************** +/*!Constructor.Sets background color to black.*/ VTKViewer_Viewer::VTKViewer_Viewer() : SUIT_ViewModel(), myBgColor( Qt::black ) { } -//**************************************************************** +/*!Destructor.*/ VTKViewer_Viewer::~VTKViewer_Viewer() { } +/*!Gets background color.*/ QColor VTKViewer_Viewer::backgroundColor() const { return myBgColor; } +/*!Sets background color.*/ void VTKViewer_Viewer::setBackgroundColor( const QColor& c ) { if ( c.isValid() ) myBgColor = c; } -//**************************************************************** +/*!Create new instance of VTKViewer_ViewWindow, sets background color and return pointer to it.*/ SUIT_ViewWindow* VTKViewer_Viewer::createView( SUIT_Desktop* theDesktop ) { VTKViewer_ViewWindow* vw = new VTKViewer_ViewWindow( theDesktop, this ); @@ -44,7 +46,7 @@ SUIT_ViewWindow* VTKViewer_Viewer::createView( SUIT_Desktop* theDesktop ) return vw; } -//********************************************************************* +/*!Sets view manager and connect slots.*/ void VTKViewer_Viewer::setViewManager(SUIT_ViewManager* theViewManager) { SUIT_ViewModel::setViewManager(theViewManager); @@ -58,7 +60,7 @@ void VTKViewer_Viewer::setViewManager(SUIT_ViewManager* theViewManager) this, SLOT(onMouseRelease(SUIT_ViewWindow*, QMouseEvent*))); } -//********************************************************************* +/*!Insert context into popup menu.*/ void VTKViewer_Viewer::contextMenuPopup(QPopupMenu* thePopup) { thePopup->insertItem( tr( "MEN_DUMP_VIEW" ), this, SLOT( onDumpView() ) ); @@ -71,7 +73,7 @@ void VTKViewer_Viewer::contextMenuPopup(QPopupMenu* thePopup) thePopup->insertItem( tr( "MEN_SHOW_TOOLBAR" ), this, SLOT( onShowToolbar() ) ); } -//********************************************************************* +/*!On mouse press event.*/ void VTKViewer_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event) { VTKViewer_RenderWindowInteractor* rwi = 0; @@ -95,7 +97,7 @@ void VTKViewer_Viewer::onMousePress(SUIT_ViewWindow* vw, QMouseEvent* event) } } -//********************************************************************* +/*!On mouse move event.*/ void VTKViewer_Viewer::onMouseMove(SUIT_ViewWindow* vw, QMouseEvent* event) { VTKViewer_RenderWindowInteractor* rwi = 0; @@ -105,7 +107,7 @@ void VTKViewer_Viewer::onMouseMove(SUIT_ViewWindow* vw, QMouseEvent* event) rwi->MouseMove( event ); } -//********************************************************************* +/*!On mouse release event.*/ void VTKViewer_Viewer::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event) { VTKViewer_RenderWindowInteractor* rwi = 0; @@ -129,20 +131,21 @@ void VTKViewer_Viewer::onMouseRelease(SUIT_ViewWindow* vw, QMouseEvent* event) } } -//********************************************************************* +/*!Sets flag to enable selection \a isEnable.*/ void VTKViewer_Viewer::enableSelection(bool isEnabled) { mySelectionEnabled = isEnabled; //!! To be done for view windows } -//********************************************************************* +/*!Sets flag to multi selection enable \a isEnable.*/ void VTKViewer_Viewer::enableMultiselection(bool isEnable) { myMultiSelectionEnabled = isEnable; //!! To be done for view windows } +/*!On dump view event.*/ void VTKViewer_Viewer::onDumpView() { VTKViewer_ViewWindow* aView = (VTKViewer_ViewWindow*)(myViewManager->getActiveView()); @@ -150,7 +153,7 @@ void VTKViewer_Viewer::onDumpView() aView->onDumpView(); } -//********************************************************************* +/*!On change back ground color event.*/ void VTKViewer_Viewer::onChangeBgColor() { VTKViewer_ViewWindow* aView = (VTKViewer_ViewWindow*)(myViewManager->getActiveView()); @@ -162,7 +165,7 @@ void VTKViewer_Viewer::onChangeBgColor() aView->setBackgroundColor(aColor); } -//********************************************************************* +/*!On show tool bar event.*/ void VTKViewer_Viewer::onShowToolbar() { VTKViewer_ViewWindow* aView = (VTKViewer_ViewWindow*)(myViewManager->getActiveView()); if ( aView ) diff --git a/src/VTKViewer/VTKViewer_ViewModel.h b/src/VTKViewer/VTKViewer_ViewModel.h index db2a93d0b..efd3078a0 100755 --- a/src/VTKViewer/VTKViewer_ViewModel.h +++ b/src/VTKViewer/VTKViewer_ViewModel.h @@ -14,6 +14,7 @@ class VTKVIEWER_EXPORT VTKViewer_Viewer: public SUIT_ViewModel Q_OBJECT public: + /*!Initialize type of viewer.*/ static QString Type() { return "VTKViewer"; } VTKViewer_Viewer(); @@ -23,13 +24,16 @@ public: virtual void setViewManager(SUIT_ViewManager* theViewManager); virtual void contextMenuPopup( QPopupMenu* ); + /*!Gets type of viewer.*/ virtual QString getType() const { return Type(); } public: void enableSelection(bool isEnabled); + /*!Checks: is selection enabled*/ bool isSelectionEnabled() const { return mySelectionEnabled; } void enableMultiselection(bool isEnable); + /*!Checks: is multi selection enabled*/ bool isMultiSelectionEnabled() const { return myMultiSelectionEnabled; } int getSelectionCount() const; diff --git a/src/VTKViewer/VTKViewer_ViewWindow.cxx b/src/VTKViewer/VTKViewer_ViewWindow.cxx index 11d52b4fe..6c3ef1b6e 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.cxx +++ b/src/VTKViewer/VTKViewer_ViewWindow.cxx @@ -19,9 +19,7 @@ #include #include -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// +/*! Construction*/ VTKViewer_ViewWindow::VTKViewer_ViewWindow( SUIT_Desktop* theDesktop, VTKViewer_Viewer* theModel, VTKViewer_InteractorStyle* iStyle, @@ -103,6 +101,7 @@ VTKViewer_ViewWindow::VTKViewer_ViewWindow( SUIT_Desktop* theDesktop, onResetView(); } +/*!Destructor.*/ VTKViewer_ViewWindow::~VTKViewer_ViewWindow() { myTransform->Delete(); @@ -130,7 +129,6 @@ void VTKViewer_ViewWindow::activateZoom() myRWInteractor->GetInteractorStyle()->startZoom(); } -//**************************************************************** /*! Activates 'panning' transformation */ @@ -139,7 +137,6 @@ void VTKViewer_ViewWindow::activatePanning() myRWInteractor->GetInteractorStyle()->startPan(); } -//**************************************************************** /*! Activates 'rotation' transformation */ @@ -148,14 +145,12 @@ void VTKViewer_ViewWindow::activateRotation() myRWInteractor->GetInteractorStyle()->startRotate(); } -//**************************************************************** void VTKViewer_ViewWindow::activateGlobalPanning() { //if(myTrihedron->GetVisibleActorCount(myRenderer)) myRWInteractor->GetInteractorStyle()->startGlobalPan(); } -//**************************************************************** /*! Activates 'fit area' transformation */ @@ -164,7 +159,6 @@ void VTKViewer_ViewWindow::activateWindowFit() myRWInteractor->GetInteractorStyle()->startFitArea(); } -//**************************************************************** void VTKViewer_ViewWindow::createActions() { if (!myActionsMap.isEmpty()) return; @@ -273,7 +267,6 @@ void VTKViewer_ViewWindow::createActions() myActionsMap[ TrihedronShowId ] = aAction; } -//**************************************************************** void VTKViewer_ViewWindow::createToolBar() { myActionsMap[DumpId]->addTo(myToolBar); @@ -301,7 +294,6 @@ void VTKViewer_ViewWindow::createToolBar() myActionsMap[ResetId]->addTo(myToolBar); } -//**************************************************************** void VTKViewer_ViewWindow::onFrontView() { vtkCamera* camera = myRenderer->GetActiveCamera(); @@ -311,7 +303,6 @@ void VTKViewer_ViewWindow::onFrontView() onFitAll(); } -//**************************************************************** void VTKViewer_ViewWindow::onBackView() { vtkCamera* camera = myRenderer->GetActiveCamera(); @@ -321,7 +312,6 @@ void VTKViewer_ViewWindow::onBackView() onFitAll(); } -//**************************************************************** void VTKViewer_ViewWindow::onTopView() { vtkCamera* camera = myRenderer->GetActiveCamera(); @@ -331,7 +321,6 @@ void VTKViewer_ViewWindow::onTopView() onFitAll(); } -//**************************************************************** void VTKViewer_ViewWindow::onBottomView() { vtkCamera* camera = myRenderer->GetActiveCamera(); @@ -341,7 +330,6 @@ void VTKViewer_ViewWindow::onBottomView() onFitAll(); } -//**************************************************************** void VTKViewer_ViewWindow::onLeftView() { vtkCamera* camera = myRenderer->GetActiveCamera(); @@ -351,7 +339,6 @@ void VTKViewer_ViewWindow::onLeftView() onFitAll(); } -//**************************************************************** void VTKViewer_ViewWindow::onRightView() { vtkCamera* camera = myRenderer->GetActiveCamera(); @@ -361,7 +348,6 @@ void VTKViewer_ViewWindow::onRightView() onFitAll(); } -//**************************************************************** void VTKViewer_ViewWindow::onResetView() { int aTriedronIsVisible = isTrihedronDisplayed(); @@ -378,14 +364,12 @@ void VTKViewer_ViewWindow::onResetView() Repaint(); } -//**************************************************************** void VTKViewer_ViewWindow::onFitAll() { myRWInteractor->GetInteractorStyle()->ViewFitAll(); Repaint(); } -//**************************************************************** /*! Set background of the viewport */ @@ -395,7 +379,6 @@ void VTKViewer_ViewWindow::setBackgroundColor( const QColor& color ) myRenderer->SetBackground( color.red()/255., color.green()/255., color.blue()/255. ); } -//**************************************************************** /*! Returns background of the viewport */ @@ -517,7 +500,6 @@ void VTKViewer_ViewWindow::MoveActor( VTKViewer_Actor* theActor) InsertActor(theActor,true); } -//**************************************************************** void VTKViewer_ViewWindow::onTrihedronShow() { if (isTrihedronDisplayed()) @@ -527,7 +509,6 @@ void VTKViewer_ViewWindow::onTrihedronShow() myRenderWindow->update(); } -//**************************************************************** QImage VTKViewer_ViewWindow::dumpView() { QPixmap px = QPixmap::grabWindow( myRenderWindow->winId() ); diff --git a/src/VTKViewer/VTKViewer_ViewWindow.h b/src/VTKViewer/VTKViewer_ViewWindow.h index df62ed447..6b95c671e 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.h +++ b/src/VTKViewer/VTKViewer_ViewWindow.h @@ -31,13 +31,17 @@ public: VTKViewer_RenderWindowInteractor* = 0 ); virtual ~VTKViewer_ViewWindow(); + /*!Gets tool bar.*/ QToolBar* getToolBar() { return myToolBar; } void setBackgroundColor( const QColor& ); QColor backgroundColor() const; + /*!Gets renderer.*/ vtkRenderer* getRenderer() { return myRenderer; } + /*!Gets render window.*/ VTKViewer_RenderWindow* getRenderWindow() { return myRenderWindow; } + /*!Gets render window interactor.*/ VTKViewer_RenderWindowInteractor* getRWInteractor() { return myRWInteractor; } bool isTrihedronDisplayed();