home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / macraysh.sit / Code / Headers / poly.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-06  |  1.4 KB  |  56 lines

  1. /*
  2.  * poly.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: poly.h,v 4.0 91/07/17 14:39:04 kolb Exp Locker: kolb $
  17.  *
  18.  * $Log:    poly.h,v $
  19.  * Revision 4.0  91/07/17  14:39:04  kolb
  20.  * Initial version.
  21.  * 
  22.  */
  23. #ifndef POLY_H
  24. #define POLY_H
  25.  
  26.  
  27. /* NOTICE !!!!!!!!!!!!
  28.  *
  29.  * Rayshade-M has changed the name of the type Polygon to RPolygon
  30.  *
  31.  * This is to avoid confusion with the Polygon structure used by Quickdraw
  32.  */
  33.  
  34.  
  35. #define GeomPolygonCreate(r,p,f) GeomCreate((GeomRef)PolygonCreate(r,p,f), \
  36.                     PolygonMethods())
  37.  
  38. /*
  39.  * Polygon
  40.  */
  41. typedef struct {
  42.     Vector norm;        /* Normal to polygon */
  43.     Float d;        /* Plane constant */
  44.     char index;        /* Which normal coord is "dominant"? */
  45.     Vector *points;        /* Array of vertices */
  46.     int npoints;        /* Number of vertices */
  47. } RPolygon;
  48.  
  49. extern RPolygon    *PolygonCreate();
  50. extern Methods    *PolygonMethods();
  51. extern int    PolygonIntersect(), PolygonEnter(), PolygonNormal();
  52. extern void    PolygonBounds(), PolygonUV(), PolygonStats();
  53. extern char    *PolygonName();
  54.  
  55. #endif /* POLY_H */
  56.