#include "manualViewPoints.h" // ---------------------------------------------------------------------------- manualViewPoints::manualViewPoints() { } // ---------------------------------------------------------------------------- manualViewPoints::~manualViewPoints() { int i,size=_copyViewPoints.size(); for (i=0;iGetIdPoint(xx,yy,zz,_range,2); if(id!=-1){ result = true; } return result; } // ---------------------------------------------------------------------------- void manualViewPoints::Refresh() // VIRTUAL { RefreshContour(); manualViewBaseContour::Refresh(); } // ---------------------------------------------------------------------------- void manualViewPoints::RefreshContour() // VIRTUAL { int np = GetNumberOfPoints(); int copynp= _copyViewPoints.size(); while(copynp!=np){ if(copynpCreateVtkPointActor(); _wxvtkbaseview->GetRenderer()->AddActor( actor ); _copyViewPoints.push_back(mvp); }//if else if(copynp>np) { manualViewPoint *t = _copyViewPoints[0]; _wxvtkbaseview->GetRenderer()->RemoveActor( t->GetVtkActor() ); std::vector::iterator itNum = _copyViewPoints.begin(); _copyViewPoints.erase(itNum); delete t; }// else if copynp= _copyViewPoints.size(); }// while int i; for(i=0;iGetManualPoint(i)->GetX(); double yy = _manContModel->GetManualPoint(i)->GetY(); double zz = 900; // RaC REVISAR !! manualViewPoint *mv = _copyViewPoints[i]; //Paints new Rectangular points bigger than the actual control points mv->SetPositionXY(xx, yy, _range*2, zz); vtkActor *_pointVtkActor = mv->GetVtkActor(); _pointVtkActor->GetProperty()->SetDiffuseColor( _coulorNormal_r , _coulorNormal_g , _coulorNormal_b ); if (_posibleSelected || (_posibleSelected && GetEditable() ) ) { _pointVtkActor->GetProperty()->SetDiffuseColor( _coulorEdit_r , _coulorEdit_g , _coulorEdit_b ); } if( _selected ) { _pointVtkActor->GetProperty()->SetDiffuseColor( _coulorSelection_r , _coulorSelection_g , _coulorSelection_b ); } //IF you want to customize the points which are going to be painted //mv->UpdateColorActor(_colorViewPoints_r,_colorViewPoints_g,_colorViewPoints_b); //mv->SetWidthLine(1.3); } } // ---------------------------------------------------------------------------- void manualViewPoints::ConstructVTKObjects() // VIRTUAL { InitTextActor(); } // ---------------------------------------------------------------------------- void manualViewPoints::AddSplineActor() // VIRTUAL { int i,size=_copyViewPoints.size(); for (i=0;iGetRenderer()->AddActor( _copyViewPoints[i]->GetVtkActor() ); } } // ---------------------------------------------------------------------------- void manualViewPoints::RemoveSplineActor() // VIRTUAL { int i,size=_copyViewPoints.size(); for (i=0;iGetRenderer()->RemoveActor(_copyViewPoints[i]->GetVtkActor()); } }