TOC PREV NEXT INDEX

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

parent_id

The id of the target subobject's parent.

elem_name

The name of the target subobject.

size

In the GDget_xxxx routines, an output argument set to the number of values in the array.
In GDset_float_array, an input argument indicating the number of values in the array.

seq

(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.

array

In the GDget_xxxx routines, a pointer to the address where the routine places the array.
In GDset_float_array, the address of the source array.

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);


TOC PREV NEXT INDEX