+ {
+ int id=-1;
+ int i, size=(int)(lstActorsSphere.size());
+ double radioMin=10000000;
+
+ if(mimage ==NULL){
+ wxMessageDialog* diag = new wxMessageDialog(this, _T("Image not set"), _T("Image Not Set"), wxICON_ERROR);
+ diag->ShowModal();
+ return -1;
+ }else{
+
+ for ( i=0 ; i<size; i++ )
+ {
+ double rx = mpoint[0] - lstPointsX [i];
+ double ry = mpoint[1] - lstPointsY [i];
+ double rz = mpoint[2] - lstPointsZ [i];
+ double radio = rx*rx + ry*ry + rz*rz;
+ if ( radio <= radioMin)
+ {
+ radioMin=radio;
+ id=i;
+ } // if
+ } // for
+
+ return id;
+ }
+ }
+
+
+ //------------------------------------------------------------------------
+ void WidgetShowNPoints::OnSetPoint(wxCommandEvent& event)
+ {
+ int id=GetNearestPoint();
+ if (id>=0)
+ {
+ printf("WidgetShowNPoints::OnSetPoint \n");
+ lstPointsX[id] = mpoint[0];
+ lstPointsY[id] = mpoint[1];
+ lstPointsZ[id] = mpoint[2];
+ RefreshPoint(id);
+ /*EED Borrame
+ this->lstActorsSphere[id]->SetPosition( spc[0]*mpoint[0]+difradio, spc[1]*mpoint[1], spc[2]* mpoint[2] );
+ this->lstActorsText[id]->SetPosition( spc[0]*mpoint[0]+difradio, spc[1]*mpoint[1], spc[2]* mpoint[2] );
+ */
+ } // if id
+ SetOutputBox();
+ }
+
+
+ //------------------------------------------------------------------------
+
+ int WidgetShowNPoints::IdInsidePoint()