home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / msdos / raytrace / rayshade / src / sphere.h < prev    next >
C/C++ Source or Header  |  1991-07-18  |  1KB  |  44 lines

  1. /*
  2.  * sphere.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  *
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * $Id: sphere.h,v 4.0 91/07/17 14:39:23 kolb Exp Locker: kolb $
  17.  *
  18.  * $Log:    sphere.h,v $
  19.  * Revision 4.0  91/07/17  14:39:23  kolb
  20.  * Initial version.
  21.  * 
  22.  */
  23. #ifndef SPHERE_H
  24. #define SPHERE_H
  25.  
  26. #define GeomSphereCreate(r,p)    GeomCreate((GeomRef)SphereCreate(r,p), \
  27.                     SphereMethods())
  28.  
  29. /*
  30.  * Sphere
  31.  */
  32. typedef struct {
  33.     Float r, rsq;        /* radius, radius squared */
  34.     Float x, y, z;        /* position */
  35. } Sphere;
  36.  
  37. extern Sphere    *SphereCreate();
  38. extern Methods    *SphereMethods();
  39. extern int    SphereIntersect(), SphereEnter(), SphereNormal();
  40. extern void    SphereBounds(), SphereUV(), SphereStats();
  41. extern char    *SphereName();
  42.  
  43. #endif /* SPHERE_H */
  44.