![]() |
![]() |
![]() |
![]() |
GDget_float_array
Synopsis
get or set a floating-point array
int _ GDget_float_array ( parent_id , _ elem_name , _int * size , _float ** array );
int _ GDget_newfloat_array ( parent_id , _ elem_name , seq, _int * size ,_ float ** array );
int _ GDget_updfloat_array ( parent_id , _ elem_name , seq, _int * size ,_ float ** array );
void _ GDset_float_array ( parent_id , _ elem_name , _int size , _float * array );
OMobj_id _ parent_id ;
char _* elem_name ;
int _* seq ;Description
GDget_float_array gets a floating-point array and places the array's elements into array . The return value is 1 if successful, 0 if a failure.
GDget_newfloat_array gets a floating-point array, placing the array's elements into array . The routine also returns the array's updated sequence number. The return value is 1 if the data has changed, 0 if it has not.
GDget_updfloat_array gets a floating-point array, placing the array's elements into array . The return value is 1 if the data has changed, 0 if it has not.
GDset_float_array sets a floating-point array.
Parameters
(GDget_newfloat_array only) _An input/output argument. It is used to compare against the array's current sequence number to determine if the array has changed. It is then updated with the current sequence number.
(GDget_updfloat_array only) _An input argument. It is used to compare against the array's current sequence number to determine if the array has changed.
Example
/* Get, then set, the value of a camera's from subobject*/
OMobj_id _mycamera_id; /* Assume this has been set. */
int size
float from[3];
int status;
...
status = GDget_float_array(mycamera_id, "from", &size, &from);
if (status == 0) {
printf("Error getting the camera's from subobject\n");
return(1);
};
/* Modify the array, then set the object. */
from[2] *= 1.1;
GDset_float_array(mycamera_id, "from", size, from);
![]() |
![]() |
![]() |
![]() |