next up previous contents index
Next: Related file (external) types Up: Lists of n-tuple reals Previous: Lists of n-tuple reals   Contents   Index

The structure Flist

In a variable of Flist memory type, data such as coordinates are recorded in the array named values. We call dimension (field named dim) the number of components per elements the array is composed, while the field named size gives the number of elements. When a Flist is used as a Fcurve, the dimension is 2 (number of coordinates in the plane) and the size is the number of points.

The field data can be used to record any additional information (when no information is available, it is set to NULL). The size of the space pointed by data is set in data_size.

typedef struct flist {
  int size;          /* size (number of elements) */
  int max_size;      /* currently allocated size (maximum number of elements) */ 
  int dim;           /* dimension (number of components per element) */
  float *values;     /* values = size * dim array
                          nth element = values[n*dim+i], i=0..dim-1 */
  int data_size;     /* size of data[] in bytes */
  void* data;        /* User defined field (saved). A pointer to something */
} *Flist;

mw 2004-05-05