FLDget_node_data_veclen


Synopsis

get/set the number of subcomponents within one Node_Data component


int FLDget_node_data_veclen (
OMobj_id field,
int comp,
int *veclen);

int FLDset_node_data_veclen (
OMobj_id field,
int comp,
int veclen);

Description

These routines set and get the veclen (number of subcomponents) within a single Node_Data Data_Array component. For example, an RGB image's veclen would be 3.

This veclen can be used to calculate the second index into the values[nvals][veclen] data array.

Note: Do not use this for Grids. Use FLDget_nspace instead.

Note: veclens are often set as part of the omnibus FLDset_node_data_comp routine rather than with FLDset_node_data_veclen.

Parameters

OMobj_id field

The OMobj_id of a field that contains a Node_Data subobject.

int comp

An integer that specifies which component [0-n] of the Node_Data to use.

int *veclen
int veclen

In FLDget_node_data_veclen, *veclen is a pointer to an integer in which the veclen (number of subcomponents) will be returned.

In FLDset_node_data_veclen, veclen is an integer that sets the number of subcomponents.

veclens are numbered from 1-n. Whether you actually need to set veclen if veclen=1 depends on how your functions are coded. AVS/Express modules and functions that manipulate Node_Data either assume veclen=1 or require that veclen be set.

Example

This example, a fragment from modules/stream.c, shows streamlines retrieving the veclen from its input field object, then checking to see that it is at least two long: