Synopsis
get/copy the min_vec and max_vec within one Cell_Data cell_set Data_Array component
int FLDget_cell_data_minmax_vec (
OMobj_id cell_set,
int comp,
char **min,
char **max,
int *type,
int mode);
int FLDcopy_cell_minmax_vec (
OMobj_id in_cell_set,
OMobj_id out_cell_set,
int in_comp,
int out_comp);
Description
These routines get or copy the min_vec and max_vec data arrays within one Cell_Data cell_set Data_Array component.
By default, the min_vec and max_vec data values are defined as functions:
prim min_vec[veclen] = cache (min_array (values, null_flag, null_value));
prim max_vec[veclen] = cache (max_array (values, null_flag, null_value));
Normally, there is no need to ever actively set or copy these values.
FLDget_cell_data_minmax_vec returns the values of these functions. If the data in the values array changes, the value of the function automatically changes.
FLDcopy_cell_minmax_vec is the routine most frequently used in this set. It copies the input field's component min_vec and max_vec to the output field. For a discussion on why this might be desirable:
Note: At present there is no FLDreset_cell_minmax_vec to "undo" the effect of a FLDcopy_cell_minmax_vec, returning control of the min and max values to the function.
Parameters
OMobj_id cell_set
The OMobj_id of one Cell_Data cell_set array element, such as that returned by FLDget_cell_set.
int comp
An integer that specifies which component's [0-n] min_vec and max_vec arrays to manipulate.
void **min
void **max
FLDget_cell_data_minmax_vec only. Pointers to pointers to unknown typed data. Upon return, *min and *max will be filled in with pointers to the min and max for each vector subcomponent.
Note that the pointers are declared "void **". This is so that any data type that matches the primitive type of the values array can be passed. You are responsible for managing this memory.
int *type
FLDget_cell_data_minmax_vec only. A pointer to an integer in which the data type of the array will be returned. Allowed values (from avs/dtype.h) are:
Constant
|
Value
|
DTYPE_CHAR |
0 |
DTYPE_BYTE |
1 |
DTYPE_SHORT |
2 |
DTYPE_INT |
3 |
DTYPE_FLOAT |
4 |
DTYPE_DOUBLE |
5 |
DTYPE_UNSET |
DNTYPES+1 |
int mode
FLDget_cell_data_minmax_vec only. An integer used to set the mode of the min_vec and max_vec arrays when FLDget_cell_data_minmax_vec is being used to create an output field. The choices are (from avs/db.h):
Mode
|
Value
|
Meaning
|
OM_GET_ARRAY_RD |
0 |
The program intends to read the array, but not write to it. |
OM_GET_ARRAY_WR |
1 |
The program intends to write to the array, completely replacing it, but not read it. |
OM_GET_ARRAY_RW |
2 |
The program intends to both read and write to the array. |
OM_GET_ARRAY_RD_COPY |
3 |
The program requires a copy of the array for its own, private use (reading or writing). |
OMobj_id in_cell_set
OMobj_id out_cell_set
In FLDcopy_cell_minmax_vec. Both are the OMobj_id of a Cell_Data cell_set array element that contains Node_Data.
int in_comp
int out_comp
FLDcopy_cell_minmax_vec only. These are integers that define which cell_data Data_Array component min_vec/max_vec to copy from (in_comp) and to (out_comp).
Example
None available.