69 #pragma omp parallel for
70 for(
int y=0; y<
Get_NY(); y++)
for(
int x=0; x<
Get_NX(); x++)
88 #pragma omp parallel for
89 for(
int y=0; y<
Get_NY(); y++)
96 #pragma omp parallel for
97 for(
int y=0; y<
Get_NY(); y++)
for(
int x=0; x<
Get_NX(); x++)
133 bool bResult =
false;
136 if( m_System == pGrid->m_System )
138 #pragma omp parallel for
139 for(
int y=0; y<
Get_NY(); y++)
for(
int x=0; x<
Get_NX(); x++)
151 bResult =
true; bProgress =
false;
163 else switch( Interpolation )
180 : _Assign_MeanValue (pGrid,
true , bProgress);
213 #pragma omp parallel for
214 for(
int x=0; x<
Get_NX(); x++)
218 if( pGrid->
Get_Value(px, py, z, Interpolation) )
233 bool CSG_Grid::_Assign_ExtremeValue(
CSG_Grid *pGrid,
bool bMaximum,
bool bProgress)
250 int iy = (int)floor(py);
252 if( iy >= 0 && iy <
Get_NY() )
254 #pragma omp parallel for
255 for(
int x=0; x<pGrid->
Get_NX(); x++)
259 int ix = (int)floor(ax + x * d);
261 if( ix >= 0 && ix <
Get_NX() )
266 || (bMaximum ==
true && z >
asDouble(ix, iy))
267 || (bMaximum ==
false && z <
asDouble(ix, iy)) )
282 bool CSG_Grid::_Assign_MeanValue(
CSG_Grid *pGrid,
bool bAreaProportional,
bool bProgress)
297 int ay = (int)(bAreaProportional ? floor(py ) : ceil (py ));
298 int by = (int)(bAreaProportional ? ceil (py + d) : floor(py + d));
301 #pragma omp parallel for
302 for(
int x=0; x<
Get_NX(); x++)
304 double px = ox + x * d;
306 int ax = (int)(bAreaProportional ? floor(px ) : ceil (px ));
307 int bx = (int)(bAreaProportional ? ceil (px + d) : floor(px + d));
311 for(
int iy=ay; iy<=by; iy++)
313 if( iy >= 0 && iy < pGrid->
Get_NY() )
315 for(
int ix=ax; ix<=bx; ix++)
319 if( bAreaProportional )
321 CSG_Rect r(ix - 0.5, iy - 0.5, ix + 0.5, iy + 0.5);
323 if( r.Intersect(rMean) )
359 bool CSG_Grid::_Assign_Majority(
CSG_Grid *pGrid,
bool bProgress)
378 if( ay < pGrid->
Get_NY() && by > 0 )
380 if( ay < 0 ) { ay = 0; }
if( by > pGrid->
Get_NY() ) { by = pGrid->
Get_NY(); }
384 for(
int x=0; x<
Get_NX(); x++)
388 if( ax < pGrid->
Get_NX() && bx > 0 )
392 if( ax < 0 ) { ax = 0; }
if( bx > pGrid->
Get_NX() ) { bx = pGrid->
Get_NX(); }
394 for(
int iy=ay; iy<by; iy++)
for(
int ix=ax; ix<bx; ix++)
597 #pragma omp parallel for
598 for(
int y=0; y<
Get_NY(); y++)
602 for(
int x=0; x<
Get_NX(); x++)
608 if( Grid.
Get_Value(xWorld, yWorld, Value, Interpolation) )
664 #pragma omp parallel for
665 for(
int y=0; y<
Get_NY(); y++)
667 for(
int x=0; x<
Get_NX(); x++)
702 #pragma omp parallel for
703 for(
int y=0; y<
Get_NY(); y++)
705 for(
int x=0; x<
Get_NX(); x++)
721 #pragma omp parallel for
722 for(
int x=0; x<
Get_NX(); x++)
724 for(
int yA=0, yB=
Get_NY()-1; yA<yB; yA++, yB--)
739 #pragma omp parallel for
740 for(
int y=0; y<
Get_NY(); y++)
742 for(
int xA=0, xB=
Get_NX()-1; xA<xB; xA++, xB--)
767 #pragma omp parallel for
768 for(
int y=0; y<
Get_NY(); y++)
770 for(
int x=0; x<
Get_NX(); x++)
788 if(
is_Valid() && Minimum < Maximum )
790 #pragma omp parallel for
791 for(
int y=0; y<
Get_NY(); y++)
793 for(
int x=0; x<
Get_NX(); x++)
816 #pragma omp parallel for
817 for(
int y=0; y<
Get_NY(); y++)
819 for(
int x=0; x<
Get_NX(); x++)
839 #pragma omp parallel for
840 for(
int y=0; y<
Get_NY(); y++)
842 for(
int x=0; x<
Get_NX(); x++)
883 double z =
asDouble(x, y), dzMax = 0.;
885 for(
int i=0; i<8; i++)
887 int ix = m_System.
Get_xTo(i, x);
888 int iy = m_System.
Get_yTo(i, y);
894 if( (!bDown || dz > 0.) && (Direction < 0 || dzMax < dz) )
925 for(
int i=0, iDir=0, ix, iy; i<4; i++, iDir+=2)
928 ix = m_System.
Get_xTo (iDir, x),
929 iy = m_System.
Get_yTo (iDir, y)) )
948 Slope = atan(sqrt(G*G + H*H));
974 for(
int i=0, iDir=0; i<4; i++, iDir+=2)
997 Slope = atan(sqrt(G*G + H*H));
1019 return(
Get_Gradient(p.
x, p.
y, Incline, Azimuth, Interpolation) );