}
-
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-
-
-
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ShowNPoints)
BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox);
mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() , bbGetInputInitLstIndexs() );
}
// } // firsttime OJO machete Eduardo pour ANDREAS a verificar
-
mwxwidget->AutoAddPoints();
mwxwidget->TrackingPoint();
-
bbSetOutputlstPointsX( mwxwidget->GetLstPointsX() );
bbSetOutputlstPointsY( mwxwidget->GetLstPointsY() );
bbSetOutputlstPointsZ( mwxwidget->GetLstPointsZ() );
bbSetOutputlstIndexs( mwxwidget->GetLstIndexs() );
bbSetOutputlstSelectedIndexs( mwxwidget->GetLstSelectedIndexs() );
bbSetOutputWidgetShowNPoints( (WidgetShowNPoints*)mwxwidget );
-
} // mwxwidget
-
}
//-----------------------------------------------------------------
//-----------------------------------------------------------------
void ShowNPoints::bbUserSetDefaultValues()
{
- firsttime=true;
+ firsttime = true;
backOpacity = -1;
- mwxwidget = NULL;
+ mwxwidget = NULL;
bbSetInputRadio(10);
bbSetInputOpacity(1);
std::vector<double> colour;
bbSetOutputWidgetShowNPoints(NULL);
}
-//------------------ -----------------------------------------------
- void ShowNPoints::bbUserInitializeProcessing()
- {
- }
+//-----------------------------------------------------------------
+void ShowNPoints::bbUserInitializeProcessing()
+{
+}
//-----------------------------------------------------------------
- void ShowNPoints::bbUserFinalizeProcessing()
- {
- }
+void ShowNPoints::bbUserFinalizeProcessing()
+{
+}
//-----------------------------------------------------------------
-}
-// EO namespace bbcreaMaracasVisu
+} // EO namespace bbcreaMaracasVisu
void ModelShowNPoints::SetReferencePoint(std::vector<double> ppoint)
{
mReferencePoint = ppoint;
- if(lstPointsX.size() > 0){
+ if(lstPointsX.size() > 0)
+ {
int idPoint = IdInsidePoint();
- if(idPoint == -1 && idCurrentPoint >= 0 && idCurrentPoint < lstPointsX.size()){
+ if(idPoint == -1 && idCurrentPoint >= 0 && idCurrentPoint < lstPointsX.size())
+ {
idCurrentPoint = idCurrentPoint;
- }
- else{
+ } else{
idCurrentPoint = idPoint;
- }
- }
+ } // if idPoint
+ } // if lstPointsX.size
}
//------------------------------------------------------------------------
int id=-1;
int i, size=(int)( lstPointsX.size() );
double spc[3];
- double radio2=(mradio+1)*(mradio+1);
+ double tmpRadio = mradio/3;
+ double radio2=(tmpRadio+1)*(tmpRadio+1);
if(mimage ==NULL)
{
printf("WidgetShowNPoints::IdInsidePoint image not set\n");
#include <vtkPointData.h>
#include <vtkDataArray.h>
#include <vtkMath.h>
-#include <vtkStaticPointLocator.h>
#include <vtkPoints.h>
#include "vtkSphereSource.h"
void WidgetShowNPoints::DetectCollectionActive()
{
int id;
- int i,size=lstModelShowNPoints.size();
- for (i=0;i<size;i++)
+ if ( cbVisuActualCollection->GetValue()==false )
{
- id = lstModelShowNPoints[i]->IdInsidePoint();
- if (id>=0)
+ int i,size=lstModelShowNPoints.size();
+ for (i=0;i<size;i++)
{
- mActualCollection=i;
- } // if id>=0
- } // for i
+ id = lstModelShowNPoints[i]->IdInsidePoint();
+ if (id>=0)
+ {
+ mActualCollection=i;
+ } // if id>=0
+ } // for i
+ } else {
+ id = GetModelShowNPoints()->IdInsidePoint(); // forcing the selection of the point
+ } // if cbVisuActualCollection
+
RefreshCollectionText();
RefreshColourCollection();
}
GetViewShowNPoints()->AddVtkPoint();
}// for
} // for i
-
fclose(ff);
+ mActualCollection=0;
} else { // else ff
printf("WidgetShowNPoints::Load Group of Points ...Error... reading file");
} //ff