Synopsis
get/set the id within a Node_Data component
int FLDget_node_data_id (
OMobj_id field,
int comp,
int *id);
int FLDset_node_data_id (
OMobj_id field,
int comp,
int id);
Description
These routines set and get the id within the Data_Array of one component of a Node_Data.
Parameters
OMobj_id field
The OMobj_id of a field that contains a Node_Data subobject.
int comp
An integer that sets which component's Data_Array to access (Data_Array node_data[nnode_data] in Node_Data).
intid
int *id
In FLDset_node_data_id, an integer that sets the id field.
In FLDget_node_data, a pointer to an integer in which the id will be returned.
Example
This example, which are fragments from modules/rd_geom.c, shows the module setting the id field of a series of Node_Data components to particular constant values, indicating that these component Data_Arrays contain normals and colors data. The renderer will use FLDget_node_data_id routines to retrieve these flags and render the object accordingly.
Related routines
For constant symbols commonly used as ids: