OpendTect-6_4  6.4
Macros
parametricsurfaceimpl.h File Reference

Go to the source code of this file.

Macros

#define mInsertStart(idxvar, type, nrfunc)
 
#define mReplaceVariable(variable)
 
#define mCloneRowVariable(type, variable, interpolfunc, udf)
 
#define mCloneColVariable(type, variable, interpolfunc, udf)
 

Macro Definition Documentation

#define mCloneColVariable (   type,
  variable,
  interpolfunc,
  udf 
)
Value:
Array2D<type>* new##variable = variable \
? new Array2DImpl<type>(curnrrows,curnrcols+nrtoinsert) : 0; \
for ( int idx=0; new##variable && idx<curnrrows; idx++ ) \
{ \
for ( int idy=0; idy<curnrcols+nrtoinsert; idy++ ) \
{ \
if ( idy>=colidx && idy<colidx+nrtoinsert ) \
{ \
if ( idy>=curnrcols || idy<nrtoinsert ) \
new##variable->set(idx,idy, udf ); \
else \
{ \
const float relcol = origin_.col() + \
((float) idy-colidx)/(nrtoinsert+1)*step_.col(); \
const Coord param( origin_.row()+idx*step_.row(), relcol ); \
new##variable->set(idx,idy,(type) interpolfunc); \
} \
} \
else \
{ \
const int sourcecol = idy>colidx ? idy-nrtoinsert : idy; \
new##variable->set(idx,idy,variable->get(idx,sourcecol)); \
} \
} \
} \
mReplaceVariable( variable )
IdxType & row()
Definition: posidxpair.h:45
virtual T get(int p0, int p1) const =0
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
Implementation of Array2D.
Definition: arrayndimpl.h:102
RowCol step_
Definition: horizontracker.h:141
A cartesian coordinate in 2D space.
Definition: coord.h:25
virtual void set(int, int, T)=0
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
IdxType & col()
Definition: posidxpair.h:50
#define mReplaceVariable(variable)
Definition: parametricsurfaceimpl.h:34
#define mCloneRowVariable (   type,
  variable,
  interpolfunc,
  udf 
)
Value:
Array2D<type>* new##variable = variable \
? new Array2DImpl<type>(curnrrows+nrtoinsert,curnrcols) : 0; \
for ( int idx=0; new##variable && idx<curnrrows+nrtoinsert; idx++ ) \
{ \
for ( int idy=0; idy<curnrcols; idy++ ) \
{ \
if ( idx>=rowidx && idx<rowidx+nrtoinsert ) \
{ \
if ( idx>=curnrrows || idx<nrtoinsert ) \
new##variable->set(idx,idy, udf ); \
else \
{ \
const float relrow = origin_.row() + \
((float) idx-rowidx)/(nrtoinsert+1)*step_.row(); \
const Coord param( relrow, origin_.col()+idy*step_.col() ); \
new##variable->set(idx,idy,(type) interpolfunc); \
} \
} \
else \
{ \
const int sourcerow = idx>rowidx ? idx-nrtoinsert : idx; \
new##variable->set(idx,idy,variable->get(sourcerow,idy)); \
} \
} \
} \
mReplaceVariable( variable )
IdxType & row()
Definition: posidxpair.h:45
virtual T get(int p0, int p1) const =0
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
Implementation of Array2D.
Definition: arrayndimpl.h:102
RowCol step_
Definition: horizontracker.h:141
A cartesian coordinate in 2D space.
Definition: coord.h:25
virtual void set(int, int, T)=0
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
IdxType & col()
Definition: posidxpair.h:50
#define mReplaceVariable(variable)
Definition: parametricsurfaceimpl.h:34
#define mInsertStart (   idxvar,
  type,
  nrfunc 
)
Value:
int idxvar = type##Index(type); \
if ( idxvar<-nrtoinsert || idxvar>nrfunc-1+nrtoinsert ) \
{ \
errmsg() = toUiString( \
"Cannot insert row or column that is not connected to existing rows."); \
return false; \
} \
const bool addedinfront = idxvar<0; \
if ( addedinfront ) \
{ \
idxvar = 0; \
origin_.type() -= step_.type()*nrtoinsert; \
}\
\
const int curnrrows = nrRows(); \
const int curnrcols = nrCols()
Export_Basic uiString toUiString(ViewStyle)
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1662
RowCol step_
Definition: horizontracker.h:141
#define mReplaceVariable (   variable)
Value:
if ( new##variable ) \
{ \
delete variable; \
variable = new##variable; \
}

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019