next up previous contents index
Next: Related file (external) types Up: Planar curve Previous: Planar curve   Contents   Index

The structure Curve

If curve is of Curve memory type, then curve->first is of Point_curvememory type and it is the first point of the curve; curve->first->next is the second point, etc. The end of the curve occurs when the next field of a point is NULL.

typedef struct curve {
  Point_curve first; /* Pointer to the first point of the curve */

  /* For use in Curves only */
  struct curve *previous; /* Pointer to the previous curve (may be NULL) */
  struct curve *next; /* Pointer to the next curve (may be NULL) */
} *Curve;

You may notice that the Curvetype includes also the fields previous and next, as the Point_curvetype. This is because curves can be linked together to define a set of curves (See 6.2.3 page [*]). If the curve is not part of a set, those pointers must be NULL.

mw 2004-05-05