//Includes same project
#include "GlobalConstants.h"
#include "GObjectModel.h"
+#include "Observer.h"
//Includes creaMaracasVisu
-#include <wxVtk3DBaseView.h>
+#include <wxVtkBaseView.h>
+#include <vtkInteractorStyleBaseView.h>
//Includes vtk
#include <vtkRenderer.h>
-
#include "vtkConeSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h"
namespace bbtk
{
- class vtkGObjectView
+ class vtkGObjectView : public Observer
{
public:
//Public methods
void setModel(GObjectModel *model);
- void setRenderer(vtkRenderer* renderer);
+ 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);
- virtual void refresh();
+ void setState(int state);
+ int getState();
+ void setRefreshWaiting();
private:
//Private Attributes
+ bool _isStartDragging;
+ double dragDifX;
+ double dragDifY;
+
//Private Methods
protected:
//Protected Attributes
- vtkRenderer *_renderer;
+ wxVtkBaseView *_baseView;
GObjectModel *_model;
- vtkActor *_objectActor;
-
+ vtkActor *_borderObjectActor;
+ vtkActor *_fillObjectActor;
+ vtkPolyDataMapper* _fillPolyMapper;
+ vtkPolyDataMapper* _borderPolyMapper;
+ vtkPoints *_pts;
+ int _state;
+
//Protected Methods
virtual void createVtkObjects();
virtual void addVtkActors();
+ virtual void updateColors();
};