* \brief Class bbtk::GBlackBoxController :
*/
-/**
-* \class bbtk::GBlackBoxController
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __GBlackBoxController_h__
#define __GBlackBoxController_h__
//Private Methods
protected:
+
+ // Methods from InteractorStyleMaracas
virtual bool OnMouseMove();
virtual bool OnLeftButtonDown();
virtual bool OnLeftButtonUp();
* \brief Class bbtk::GBoxController :
*/
-/**
-* \class bbtk::GBoxController
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __GBoxController_h__
#define __GBoxController_h__
//Private Methods
protected:
+
+ // Methods from InteractorStyleMaracas
virtual bool OnMouseMove();
virtual bool OnLeftButtonDown();
virtual bool OnLeftButtonUp();
* \brief Class bbtk::GConnectorController : abstract black-box interface.
*/
-/**
-* \class bbtk::GConnectorController
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __GConnectorController_h__
#define __GConnectorController_h__
GConnectorController();
~GConnectorController();
- //Public methods
+ //Public methods
+
+ // Methods from InteractorStyleMaracas
virtual bool OnMouseMove();
virtual bool OnLeftButtonDown();
virtual bool OnLeftButtonUp();
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
* \brief Class bbtk::GObjectController :
*/
-/**
-* \class bbtk::GObjectController
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __GObjectController_h__
#define __GObjectController_h__
//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);
protected:
//Protected Attributes
+
GObjectModel* _model;
vtkGObjectView* _view;
+
bool _isLeftClickDown;
//Protected Methods
+
+ // Methods from InteractorStyleMaracas
virtual bool OnMouseMove();
virtual bool OnLeftButtonDown();
virtual bool OnLeftButtonUp();
virtual void moveObject(int X,int Y);
-
-
};
* \brief Class bbtk::GPortController :
*/
-/**
-* \class bbtk::GPortController
-* \brief
-*/
+
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __GPortController_h__
#define __GPortController_h__
* \brief Class bbtk::manualConnectorContourController : abstract black-box interface.
*/
-/**
-* \class bbtk::manualConnectorContourController
-* \brief
-*/
+
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __manualConnectorContourController_h__
#define __manualConnectorContourController_h__
//=========================================================================
+
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);
}
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]);
if( _viewControlPoints )
{
int i,size=_lstViewPoints.size();
+ //The first and last points are avoided
for (i=1;i<size-1; i++)
{
vtkActor * pointActor = _lstViewPoints[i]->GetVtkActor();
void manualConnectorContourView::RefreshText() // virtual
{
-
+ // The text that goes with the contour is not shown
}
* \brief Class bbtk::manualConnectorContourView : abstract black-box interface.
*/
-/**
-* \class bbtk::manualConnectorContourView
-* \brief
-*/
+
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __manualConnectorContourView_h__
#define __manualConnectorContourView_h__
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:
* \brief Class bbtk::vtkGBlackBoxView : abstract black-box interface.
*/
-/**
-* \class bbtk::vtkGBlackBoxView
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __vtkGBlackBoxView_h__
#define __vtkGBlackBoxView_h__
virtual void addVtkActors();
virtual void removeVtkActors();
virtual void createVtkObjects();
+
virtual void update(int idController,int command);
virtual void updateColors();
};
* \brief Class bbtk::vtkGBoxView : abstract black-box interface.
*/
-/**
-* \class bbtk::vtkGBoxView
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __vtkGBoxView_h__
#define __vtkGBoxView_h__
virtual void addVtkActors();
virtual void removeVtkActors();
virtual void createVtkObjects();
+
virtual void update(int idController,int command);
virtual void updateColors();
void updatePorts();
* \brief Class bbtk::vtkGComplexBoxPortView : abstract black-box interface.
*/
-/**
-* \class bbtk::vtkGComplexBoxPortView
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __vtkGComplexBoxPortView_h__
#define __vtkGComplexBoxPortView_h__
virtual void addVtkActors();
virtual void removeVtkActors();
virtual void createVtkObjects();
+
virtual void update(int idController,int command);
virtual void updateColors();
};
* \brief Class bbtk::vtkGConnectorView : abstract black-box interface.
*/
-/**
-* \class bbtk::vtkGConnectorView
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __vtkGConnectorView_h__
#define __vtkGConnectorView_h__
* \brief Class bbtk::vtkGObjectView : abstract black-box interface.
*/
-/**
-* \class bbtk::vtkGObjectView
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __vtkGObjectView_h__
#define __vtkGObjectView_h__
~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;
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
* \brief Class bbtk::vtkGPortView : abstract black-box interface.
*/
-/**
-* \class bbtk::vtkGPortView
-* \brief
-*/
+/****
+* Design and Developpement of BBTK GEditor
+* Ricardo A Corredor J <ra.corredor67@uniandes.edu.co>
+* RaC - 2010
+****/
#ifndef __vtkGPortView_h__
#define __vtkGPortView_h__