From: corredor <> Date: Tue, 22 Jun 2010 11:32:16 +0000 (+0000) Subject: Documentation of the vtkLibrary X-Git-Tag: v1_0_0~58 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=17c7281fa9d788fe4df66173b1ab23cecc8918f5;p=bbtkGEditor.git Documentation of the vtkLibrary --- diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.h index 39f8274..5a97e90 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::GBlackBoxController : */ -/** -* \class bbtk::GBlackBoxController -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __GBlackBoxController_h__ #define __GBlackBoxController_h__ @@ -77,6 +78,8 @@ namespace bbtk //Private Methods protected: + + // Methods from InteractorStyleMaracas virtual bool OnMouseMove(); virtual bool OnLeftButtonDown(); virtual bool OnLeftButtonUp(); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBoxController.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBoxController.h index 8082668..ec87562 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBoxController.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBoxController.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::GBoxController : */ -/** -* \class bbtk::GBoxController -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __GBoxController_h__ #define __GBoxController_h__ @@ -77,6 +78,8 @@ namespace bbtk //Private Methods protected: + + // Methods from InteractorStyleMaracas virtual bool OnMouseMove(); virtual bool OnLeftButtonDown(); virtual bool OnLeftButtonUp(); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GConnectorController.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GConnectorController.h index 00aeb03..679c3ce 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GConnectorController.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GConnectorController.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::GConnectorController : abstract black-box interface. */ -/** -* \class bbtk::GConnectorController -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __GConnectorController_h__ #define __GConnectorController_h__ @@ -67,7 +68,9 @@ namespace bbtk GConnectorController(); ~GConnectorController(); - //Public methods + //Public methods + + // Methods from InteractorStyleMaracas virtual bool OnMouseMove(); virtual bool OnLeftButtonDown(); virtual bool OnLeftButtonUp(); @@ -77,15 +80,20 @@ namespace bbtk virtual bool OnMiddleButtonDown(); virtual bool OnMiddleButtonUp(); + // Implementation of the creaMaracasVisu controller manualConnectorContourController* getManualContourController(); void setManualContourController(manualConnectorContourController* controller); virtual void removeFromScene(); + + // Reports the end in the contour creation void endContourCreation(); private: //Attributes + + // Implementation of the creaMaracasVisu contour (manualContourControler) controller manualConnectorContourController* _controller; //Private Methods diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.h index 915ffc8..519248c 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::GObjectController : */ -/** -* \class bbtk::GObjectController -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __GObjectController_h__ #define __GObjectController_h__ @@ -69,11 +70,16 @@ namespace bbtk //Public methods void setModelAndView(GObjectModel* model, vtkGObjectView* view); + + // Same type of the saved in the model of the graphical objects int getGObjectType(); + GObjectModel* getModel(); vtkGObjectView* getView(); + std::string getStatusText(); + // Same ObjectID from the model int getId(); void setId(int id); @@ -90,11 +96,15 @@ namespace bbtk protected: //Protected Attributes + GObjectModel* _model; vtkGObjectView* _view; + bool _isLeftClickDown; //Protected Methods + + // Methods from InteractorStyleMaracas virtual bool OnMouseMove(); virtual bool OnLeftButtonDown(); virtual bool OnLeftButtonUp(); @@ -103,8 +113,6 @@ namespace bbtk virtual void moveObject(int X,int Y); - - }; diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GPortController.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GPortController.h index e3911b1..86cee21 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GPortController.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GPortController.h @@ -35,10 +35,12 @@ Version: $Revision$ * \brief Class bbtk::GPortController : */ -/** -* \class bbtk::GPortController -* \brief -*/ + +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __GPortController_h__ #define __GPortController_h__ diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourController.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourController.h index f7919a4..fd30927 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourController.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourController.h @@ -35,10 +35,12 @@ Version: $Revision$ * \brief Class bbtk::manualConnectorContourController : abstract black-box interface. */ -/** -* \class bbtk::manualConnectorContourController -* \brief -*/ + +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __manualConnectorContourController_h__ #define __manualConnectorContourController_h__ diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.cxx b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.cxx index 6fb8685..e5b4a42 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.cxx +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.cxx @@ -41,18 +41,22 @@ namespace bbtk //========================================================================= + manualConnectorContourView::manualConnectorContourView() { } //========================================================================= + manualConnectorContourView::~manualConnectorContourView() { } + //========================================================================= void manualConnectorContourView::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type) { + // Make the conversion using the system of creaMaracasVisu _wxvtkbaseview->TransCoordScreenToWorld(X,Y,Z,type); } @@ -60,6 +64,7 @@ namespace bbtk void manualConnectorContourView::updateStartAndEnd(double* start , double* end) { + // Update contour first and last point _manContModel->MovePoint(0,start[0],start[1],start[2]); _manContModel->MovePoint(_manContModel->GetSizeLstPoints()-1,end[0],end[1],end[2]); @@ -75,6 +80,7 @@ namespace bbtk if( _viewControlPoints ) { int i,size=_lstViewPoints.size(); + //The first and last points are avoided for (i=1;iGetVtkActor(); @@ -87,7 +93,7 @@ namespace bbtk void manualConnectorContourView::RefreshText() // virtual { - + // The text that goes with the contour is not shown } diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.h index 7ef4521..c1bf178 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/manualConnectorContourView.h @@ -35,10 +35,12 @@ Version: $Revision$ * \brief Class bbtk::manualConnectorContourView : abstract black-box interface. */ -/** -* \class bbtk::manualConnectorContourView -* \brief -*/ + +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __manualConnectorContourView_h__ #define __manualConnectorContourView_h__ @@ -65,10 +67,14 @@ namespace bbtk manualConnectorContourView(); ~manualConnectorContourView(); - //Public methods + //Public methods + virtual void TransfromCoordViewWorld(double &X, double &Y, double &Z, int type=2); + void updateStartAndEnd(double* start , double* end); + virtual void AddControlPoints(); + virtual void RefreshText(); private: diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.h index 90494d9..b17f19d 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::vtkGBlackBoxView : abstract black-box interface. */ -/** -* \class bbtk::vtkGBlackBoxView -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __vtkGBlackBoxView_h__ #define __vtkGBlackBoxView_h__ @@ -98,6 +99,7 @@ namespace bbtk virtual void addVtkActors(); virtual void removeVtkActors(); virtual void createVtkObjects(); + virtual void update(int idController,int command); virtual void updateColors(); }; diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.h index 268ec9a..ea1de60 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBoxView.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::vtkGBoxView : abstract black-box interface. */ -/** -* \class bbtk::vtkGBoxView -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __vtkGBoxView_h__ #define __vtkGBoxView_h__ @@ -96,6 +97,7 @@ namespace bbtk virtual void addVtkActors(); virtual void removeVtkActors(); virtual void createVtkObjects(); + virtual void update(int idController,int command); virtual void updateColors(); void updatePorts(); diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.h index aa08812..0b9ce1a 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGComplexBoxPortView.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::vtkGComplexBoxPortView : abstract black-box interface. */ -/** -* \class bbtk::vtkGComplexBoxPortView -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __vtkGComplexBoxPortView_h__ #define __vtkGComplexBoxPortView_h__ @@ -93,6 +94,7 @@ namespace bbtk virtual void addVtkActors(); virtual void removeVtkActors(); virtual void createVtkObjects(); + virtual void update(int idController,int command); virtual void updateColors(); }; diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGConnectorView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGConnectorView.h index 7f4cc18..f80334f 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGConnectorView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGConnectorView.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::vtkGConnectorView : abstract black-box interface. */ -/** -* \class bbtk::vtkGConnectorView -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __vtkGConnectorView_h__ #define __vtkGConnectorView_h__ diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.h index 5c42d0e..f502df6 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::vtkGObjectView : abstract black-box interface. */ -/** -* \class bbtk::vtkGObjectView -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __vtkGObjectView_h__ #define __vtkGObjectView_h__ @@ -76,26 +77,32 @@ namespace bbtk ~vtkGObjectView(); //Public methods + void setModel(GObjectModel *model); void setBaseView(wxVtkBaseView* baseView); void initVtkObjects(); - virtual bool isPointInside(int X,int Y); - virtual void moveObject(int X, int Y); - - virtual void update(int idController,int command); void setStartDragging(bool param); void setState(int state); int getState(); + + // Method to force a vtk refresh to the list of controllers of the wxVtkBaseView void setRefreshWaiting(); + + virtual bool isPointInside(int X,int Y); + virtual void moveObject(int X, int Y); virtual void removeFromScene(); + virtual void update(int idController,int command); + private: //Private Attributes bool _isStartDragging; + + //Makes a difference between the first point clicked and the new position, in order to move the selected objects double dragDifX; double dragDifY; @@ -105,13 +112,20 @@ namespace bbtk protected: //Protected Attributes + wxVtkBaseView *_baseView; + GObjectModel *_model; + vtkActor *_borderObjectActor; vtkActor *_fillObjectActor; + vtkPolyDataMapper* _fillPolyMapper; vtkPolyDataMapper* _borderPolyMapper; + vtkPoints *_pts; + + // State of the object (See GlobalConstants.h) int _state; //Protected Methods diff --git a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.h b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.h index 2c854c6..cb1734a 100644 --- a/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.h +++ b/lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.h @@ -35,10 +35,11 @@ Version: $Revision$ * \brief Class bbtk::vtkGPortView : abstract black-box interface. */ -/** -* \class bbtk::vtkGPortView -* \brief -*/ +/**** +* Design and Developpement of BBTK GEditor +* Ricardo A Corredor J +* RaC - 2010 +****/ #ifndef __vtkGPortView_h__ #define __vtkGPortView_h__