ModelShowNPoints::ModelShowNPoints()
{
firsttime=true;
+ currentPoint = -1;
}
//----------------------------------------------------------------------
void ModelShowNPoints::SetReferencePoint(std::vector<double> ppoint)
{
mReferencePoint = ppoint;
+ if(lstPointsX.size() > 0){
+ int idPoint = IdInsidePoint();
+ if(idPoint == -1 && currentPoint >= 0 && currentPoint < lstPointsX.size()){
+ currentPoint = currentPoint;
+ }
+ else{
+ currentPoint = idPoint;
+ }
+ }
}
//------------------------------------------------------------------------
} // for i
}
-
+//----------------------------------------------------------------------
+int ModelShowNPoints::GetCurrentPoint()
+{
+ return currentPoint;
+}