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

This is sphere.h in view mode; [Download] [Up]

#ifndef SPHERE_H
#define SPHERE_H

typedef struct Sphere Sphere;

extern GeomClass *SphereClass;

void SphereMinMax(Sphere *sphere, HPoint3 *min, HPoint3 *max);
void SphereCenter(Sphere *sphere, HPoint3 *center);
float SphereRadius(Sphere *sphere);
void SphereSwitchSpace(Sphere *sphere, int space);

/* Makes sphere encompassing both other spheres - new sphere if dest == NULL,
 * just puts results in dest otherwise */
Sphere *SphereUnion3(Sphere *a, Sphere *b, Sphere *dest);

/* points is actually a six-element array containing the points with
 * the minimum and maximum x, y, and z coordinates. */
void SphereEncompassBounds(Sphere *sphere, HPoint3 *points);

/* Returns zero if didn't change sphere, non-zero if did */
int SphereAddHPt3(Sphere *sphere, HPoint3 *point, Transform T);
int SphereAddHPt3N(Sphere *sphere, HPoint3 *point, int n, Transform T);

/* Modifies sphere to surround all points */
void SphereEncompassHPt3N(Sphere *sphere, HPoint3 *point, int n, Transform T);
/* Finds points with the maximum dimensional span - spanPts is an array
 * of 6 elements (2 points per axis) */
void MaxDimensionalSpan(HPoint3 *spanPts, HPoint3 *point);
void MaxDimensionalSpanN(HPoint3 *spanPts, HPoint3 *points, int n);

#endif

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