#include <PlaneDirectionViewer.h>
Public Member Functions | |
PlaneDirectionViewer (wxWindow *parent, int radio, double colour[3], int opacity) | |
~PlaneDirectionViewer () | |
void | SetRenderer (vtkRenderer *render) |
void | SetVectors (std::vector< double > lstPointsx, std::vector< double > lstPointsy, std::vector< double > lstPointsz) |
void | UpdateDirections () throw (std::exception) |
void | addRemoveActor (int index, bool addremove) |
void | changeColor (int index, double r, double g, double b) |
void | WriteInformation (std::string filename, double *spc=NULL) |
void | SetArrowSize (int arrowsize) |
Static Public Member Functions | |
static PlaneDirectionViewer * | getInstance (wxWindow *parent, int radio, double colour[3], int opacity) |
static PlaneDirectionViewer * | getInstance () |
Private Attributes | |
PlaneDirectionManager * | manager |
std::vector < PlaneDirectionViewerPanel * > | viewdata |
Static Private Attributes | |
static PlaneDirectionViewer * | instance = NULL |
Definition at line 16 of file PlaneDirectionViewer.h.
PlaneDirectionViewer::PlaneDirectionViewer | ( | wxWindow * | parent, | |
int | radio, | |||
double | colour[3], | |||
int | opacity | |||
) |
Definition at line 11 of file PlaneDirectionViewer.cxx.
References manager.
Referenced by getInstance().
00012 :wxPanel(parent) 00013 { 00014 manager = new PlaneDirectionManager(radio, colour, opacity); 00015 wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); 00016 this->SetSizer(sizer); 00017 this->SetAutoLayout(true); 00018 }
PlaneDirectionViewer::~PlaneDirectionViewer | ( | ) |
Definition at line 31 of file PlaneDirectionViewer.cxx.
References manager.
00031 { 00032 delete manager; 00033 }
void PlaneDirectionViewer::addRemoveActor | ( | int | index, | |
bool | addremove | |||
) |
Definition at line 59 of file PlaneDirectionViewer.cxx.
References PlaneDirectionManager::addRemoveActor(), and manager.
Referenced by PlaneDirectionViewerPanel::onCheckBoxChange().
00059 { 00060 manager->addRemoveActor(index, addremove); 00061 }
void PlaneDirectionViewer::changeColor | ( | int | index, | |
double | r, | |||
double | g, | |||
double | b | |||
) |
Definition at line 63 of file PlaneDirectionViewer.cxx.
References PlaneDirectionManager::changeColor(), and manager.
Referenced by PlaneDirectionViewerPanel::onColorChange().
00063 { 00064 manager->changeColor(index, r,g,b); 00065 }
PlaneDirectionViewer * PlaneDirectionViewer::getInstance | ( | ) | [static] |
Definition at line 27 of file PlaneDirectionViewer.cxx.
References instance.
Referenced by PlaneDirectionViewerPanel::onCheckBoxChange(), and PlaneDirectionViewerPanel::onColorChange().
00027 { 00028 return instance; 00029 }
PlaneDirectionViewer * PlaneDirectionViewer::getInstance | ( | wxWindow * | parent, | |
int | radio, | |||
double | colour[3], | |||
int | opacity | |||
) | [static] |
Definition at line 20 of file PlaneDirectionViewer.cxx.
References instance, and PlaneDirectionViewer().
00020 { 00021 if(instance==NULL){ 00022 instance = new PlaneDirectionViewer(parent,radio,colour,opacity); 00023 } 00024 return instance; 00025 }
void PlaneDirectionViewer::SetArrowSize | ( | int | arrowsize | ) |
Definition at line 71 of file PlaneDirectionViewer.cxx.
References manager, and PlaneDirectionManager::SetArrowSize().
00071 { 00072 manager->SetArrowSize(arrowsize); 00073 }
void PlaneDirectionViewer::SetRenderer | ( | vtkRenderer * | render | ) |
Definition at line 35 of file PlaneDirectionViewer.cxx.
References manager, and PlaneDirectionManager::SetRenderer().
00035 { 00036 manager->SetRenderer(render); 00037 }
void PlaneDirectionViewer::SetVectors | ( | std::vector< double > | lstPointsx, | |
std::vector< double > | lstPointsy, | |||
std::vector< double > | lstPointsz | |||
) |
Definition at line 39 of file PlaneDirectionViewer.cxx.
References manager, and PlaneDirectionManager::SetVectors().
00039 { 00040 manager->SetVectors(lstPointsx,lstPointsy,lstPointsz); 00041 }
void PlaneDirectionViewer::UpdateDirections | ( | ) | throw (std::exception) |
Definition at line 43 of file PlaneDirectionViewer.cxx.
References PlaneDirectionManager::GetPlanesData(), manager, PlaneDirectionManager::UpdateDirections(), and viewdata.
00043 { 00044 manager->UpdateDirections(); 00045 std::vector<PlaneDirectionManagerData*> vectdata = manager->GetPlanesData(); 00046 for(int i = 0; i < viewdata.size();i++){ 00047 this->GetSizer()->Remove(i); 00048 viewdata[i]->Destroy(); 00049 } 00050 viewdata.clear(); 00051 for(int i = 0; i < vectdata.size(); i++){ 00052 PlaneDirectionViewerPanel* planedirview = new PlaneDirectionViewerPanel(this, vectdata[i],i); 00053 viewdata.push_back(planedirview); 00054 this->GetSizer()->Add(planedirview,1); 00055 } 00056 this->Layout(); 00057 }
void PlaneDirectionViewer::WriteInformation | ( | std::string | filename, | |
double * | spc = NULL | |||
) |
Definition at line 67 of file PlaneDirectionViewer.cxx.
References manager, and PlaneDirectionManager::WriteInformation().
00067 { 00068 manager->WriteInformation(filename,spc); 00069 }
PlaneDirectionViewer * PlaneDirectionViewer::instance = NULL [static, private] |
Definition at line 39 of file PlaneDirectionViewer.h.
Referenced by getInstance().
Definition at line 40 of file PlaneDirectionViewer.h.
Referenced by addRemoveActor(), changeColor(), PlaneDirectionViewer(), SetArrowSize(), SetRenderer(), SetVectors(), UpdateDirections(), WriteInformation(), and ~PlaneDirectionViewer().
std::vector<PlaneDirectionViewerPanel*> PlaneDirectionViewer::viewdata [private] |
Definition at line 41 of file PlaneDirectionViewer.h.
Referenced by UpdateDirections().