ftp.nice.ch/pub/next/graphics/3d/geomview.1.4.1.s.tar.gz#/Geomview/src/lib/gprim/list/listsphere.c

This is listsphere.c in view mode; [Download] [Up]

#include "geom.h"
#include "create.h"
#include "listP.h"
#include "sphere.h"

Geom *ListBoundSphere(list, T, space)
     List *list;
     Transform T;
     int space;
{
  Geom *carsphere = NULL, *newsphere = NULL, *sphere = NULL;
  register List *l;
  for (l = list; l != NULL; l = l->cdr) {
    carsphere = GeomBoundSphere(l->car, T, space);
    if (carsphere == NULL) continue;
    if (sphere != NULL) {
      SphereUnion3((Sphere *)sphere, (Sphere *)carsphere, (Sphere *)sphere);
      GeomDelete(carsphere);
    }
    else sphere = carsphere;
  }

  return sphere;
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.