00001 #ifndef PlaneDirectionManager_H_ 00002 #define PlaneDirectionManager_H_ 00003 00004 #include <math.h> 00005 00006 #include <iostream> 00007 00008 #include "PlaneDirectionManagerData.h" 00009 00010 #include <vector> 00011 00012 #include <vtkRenderer.h> 00013 00014 class PlaneDirectionManager { 00015 00016 public: 00017 PlaneDirectionManager(int radio, double colour[3], int opacity); 00018 ~PlaneDirectionManager(); 00019 00020 void SetRenderer(vtkRenderer* render); 00021 void SetVectors( std::vector<double> lstPointsx, std::vector<double> lstPointsy, std::vector<double> lstPointsz); 00022 00023 void UpdateDirections() throw (std::exception); 00024 00025 std::vector<PlaneDirectionManagerData*> GetPlanesData(){ 00026 return _vectdata; 00027 } 00028 00029 void addRemoveActor(int index, bool addremove); 00030 00031 void changeColor(int index,double r,double g,double b); 00032 00033 PlaneDirectionManagerData* GetPlaneDirectionManagerData(int id); 00034 00035 void WriteInformation(std::string filename, double* spc=NULL); 00036 00037 void SetArrowSize(int arrowsize); 00038 private: 00039 00040 std::vector<double> _lstPointsx; 00041 std::vector<double> _lstPointsy; 00042 std::vector<double> _lstPointsz; 00043 00044 std::vector<PlaneDirectionManagerData*> _vectdata; 00045 00046 void RemoveAllActorsFromIndex(int n=0)throw (std::exception); 00047 void UpdateVectors()throw (std::exception); 00048 00049 void UpdateActors(); 00050 void AddActors(); 00051 00052 vtkRenderer* _render; 00053 00054 int _radio; 00055 double* _colour; 00056 int _opacity; 00057 00058 }; 00059 00060 #endif /*PlaneDirectionManager_H_*/