home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libray / libobj / torus.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-09  |  1.4 KB  |  53 lines

  1. /*
  2.  * torus.h
  3.  *
  4.  * Copyright (C) 1990, 1991, Mark Polipec, 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.  * torus.h,v 4.1 1994/08/09 08:00:18 explorer Exp
  17.  *
  18.  * torus.h,v
  19.  * Revision 4.1  1994/08/09  08:00:18  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:11  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:39:31  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29. #ifndef TORUS_H
  30. #define TORUS_H
  31.  
  32. #define GeomTorusCreate(a,b,p,n) GeomCreate((GeomRef)TorusCreate(a,b,p,n), \
  33.                     TorusMethods())
  34.  
  35. /*
  36.  * Torus
  37.  */
  38. typedef struct {
  39.     Float a;        /* tube radius */
  40.     Float b;        /* swept radius */
  41.     Float aa, bb;        /* squares of the above */
  42.     Trans trans;        /* general<-->canonical transform */
  43.     Float bounds[2][3];     /* bounds */
  44. } Torus;
  45.  
  46. extern Torus    *TorusCreate();
  47. extern int    TorusIntersect(), TorusEnter(), TorusNormal();
  48. extern void    TorusBounds(), TorusUV(), TorusStats();
  49. extern char    *TorusName();
  50. extern Methods    *TorusMethods();
  51.  
  52. #endif /* TORUS_H */
  53.