/*! \file ContourToNodesx.c */ #include "./ContourToNodesx.h" int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue){ int i; /*Contour:*/ Contour* contouri=NULL; int numnodes; double* xc=NULL; double* yc=NULL; /*output: */ IssmPDouble* flags=NULL; flags=xNew(nods); /*Loop through all contours: */ for (i=0;inods; xc=contouri->x; yc=contouri->y; IsInPoly(flags,xc,yc,numnodes,x,y,0,nods,edgevalue); } /*Assign output pointers: */ *pflags=flags; return 1; } int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){ /*Contour:*/ Contour* contouri=NULL; double* xc=NULL; double* yc=NULL; /*output: */ IssmPDouble* flags=NULL; flags=xNew(nods); /*Loop through all contours: */ if(contours){ for(int i=0;iSize();i++){ Contour* contour=(Contour*)contours->GetObjectByOffset(i); IsInPoly(flags,contour->x,contour->y,contour->nods,x,y,0,nods,edgevalue); } } /*Assign output pointers: */ *pflags=flags; return 1; }