home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 3 / RISC_DISC_3.iso / resources / etexts / gems / gemsv / ch4_5 / ellipsoid.h < prev    next >
C/C++ Source or Header  |  1994-11-22  |  768b  |  26 lines

  1. /* ellipsoid.h */
  2.  
  3. #ifndef ellipsoid_H
  4. #define ellipsoid_H
  5.  
  6. typedef struct point { float x, y, z; } point;
  7. typedef struct vertex {
  8.     point p, n;         /* point and unit normal */
  9. } vertex;
  10. typedef struct face {
  11.     int v0, v1, v2;     /* indices of vertex array for a triangular face */
  12. } face;
  13. typedef struct object {
  14.     int nv, nf;         /* numbers of elements in v and f */
  15.     vertex *v; face *f; /* arrays of vertices and faces */
  16. } object;
  17.  
  18. void ellipsoid_init (int n);
  19. void ellipsoid_seq (object *ellipsoid, int n, float a, float b, float c);
  20. void ellipsoid_par (object *ellipsoid, int n, float a, float b, float c);
  21. void ellipsoid_print (object *ellipsoid);
  22. void ellipsoid_done (void);
  23. void ellipsoid_free (object *ellipsoid);
  24.  
  25. #endif /* ellipsoid_H */
  26.