| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.3 Fill
- Method on
mglData(C++, Python):voidFill (floatx1,floatx2,chardir='x') - C function:
voidmgl_data_fill (HMDTdat,floatx1,floatx2,chardir) Equidistantly fills the data values to range [x1, x2] in direction dir={‘x’,‘y’,‘z’}.
- Method on
mglData(C++, Python):voidFill (const char *eq,mglPointMin,mglPointMax,const mglData *vdat=0,const mglData *wdat=0) - C function:
voidmgl_data_fill (HMGLgr,HMDTdat,const char *eq,const HMDT *vdat,const HMDT *wdat) Fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in range Min x Max (in difference from
Modifyfunctions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can beNULL(i.e. can be omitted).
- Method on
mglData(C++, Python):voidModify (const char *eq,intdim=0) - Method on
mglData(C++, Python):voidModify (const char *eq,const mglData &v) - Method on
mglData(C++, Python):voidModify (const char *eq,const mglData &v,const mglData &w) - C function:
voidmgl_data_modify (HMDTdat,const char *eq,intdim) - C function:
voidmgl_data_modify_vw (HMDTdat,const char *eq,const HMDTv,const HMDTw) Fills the value of array according to the formula in string eq. Formula is an arbitrary expression depending on variables ‘x’, ‘y’, ‘z’, ‘u’, ‘v’, ‘w’. Coordinates ‘x’, ‘y’, ‘z’ are supposed to be normalized in range [0,1] (in difference from
Fillfunctions). Variable ‘u’ is the original value of the array. Variables ‘v’ and ‘w’ are values of vdat, wdat which can beNULL(i.e. can be omitted). If dim>0 is specified then modification will be fulfilled only for slices >=dim.
- Method on
mglData(C++, Python):voidPut (floatval,inti=-1,intj=-1,intk=-1) - mglData:
voidmgl_data_put_val (HMDTa,floatval,inti,intj,intk) Function sets value(s) of array a[i, j, k] = val. Negative indexes i, j, k=-1 set the value val to whole range in corresponding direction(s). For example,
Put(val,-1,0,-1);sets a[i,0,j]=val for i=0...(nx-1), j=0...(nz-1).
- Method on
mglData(C++, Python):voidPut (const mglData &v,inti=-1,intj=-1,intk=-1) - mglData:
voidmgl_data_put_dat (HMDTa,const HMDTv,inti,intj,intk) Function copies value(s) from array v to the range of original array. Negative indexes i, j, k=-1 set the range in corresponding direction(s). At this minor dimensions of array v should be large than corresponding dimensions of this array. For example,
Put(v,-1,0,-1);sets a[i,0,j]=v.ny>nz ? v[i,j] : v[i], where i=0...(nx-1), j=0...(nz-1) and condition v.nx>=nx is true.
- C function:
voidmgl_data_set_value (HMDTdat,floatv,inti,intj,intk) Sets the value in specified cell of the data with border checking.
- C function:
floatmgl_data_get_value (HMDTdat,inti,intj,intk) Gets the value in specified cell of the data with border checking.
- Method on
mglData(C+, Python):voidGetNx () - C function:
floatmgl_data_get_nx (HMDTdat) Gets the x-size of the data.
- Method on
mglData(C+, Python):voidGetNy () - C function:
floatmgl_data_get_ny (HMDTdat) Gets the y-size of the data.
- Method on
mglData(C+, Python):voidGetNz () - C function:
floatmgl_data_get_nz (HMDTdat) Gets the z-size of the data.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
