home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include "transform.h"
- #include "geom.h"
- #include "geomclass.h"
- #include "sphereP.h"
-
- Sphere *SphereFSave(sphere, f, fname)
- Sphere *sphere;
- FILE *f;
- char *fname;
- {
- if (sphere == NULL) return NULL;
- switch(sphere->space) {
- case TM_HYPERBOLIC:
- fprintf(f, "%c", 'H');
- break;
- case TM_SPHERICAL:
- fprintf(f, "%c", 'S');
- break;
- }
- fprintf(f, "SPHERE\n");
- fprintf(f, "%g %g %g %g", sphere->radius, sphere->center.x,
- sphere->center.y, sphere->center.z);
- return (ferror(f) ? NULL : sphere);
- }
-