home *** CD-ROM | disk | FTP | other *** search
- /* Title: Teapot.h
- * Author: David Phillip Oster
- * Synopsis: the declarations for TeaPot 3-D
- * January 25, 1987 creation
- */
- #define PATCHCOUNT 32 /* the number of surface patches */
-
- #define ONE ((Fixed) 0x10000L) /* Fixed point representation of one */
- #define THREE ((Fixed) 0x30000L)
- #define HALF ((Fixed) 0x08000L) /* Fixed point representation of 1/2 */
-
- /* the number of control points "ducks" */
- #define DUCKCOUNT 306
-
-
- /* patches is an array, length 32, of patch */
- /* patch is an array[0..3, 0..3] of int */
- typedef int Patch[4][4];
- typedef Point3D *Pt3dPtr; /* a pointer to a 3d point */
- typedef struct {
- float x, y, z;
- } FloatingPoint3D;
-
- extern Patch patches[];
- extern FloatingPoint3D ducks[];
- extern Point3D Pt3ds[1+DUCKCOUNT];
-
- extern int pitchVal, yawVal, rollVal, skewVal, viewVal, smoothVal;
-
- void DisplayPatches(int); /* draw the teapot */
- void OneEvent(void); /* do a user event if any */
-
- /* defined in teaGraf.c
- */
- void FloatsToFixeds(register float *fl, Fixed *fi, int n);
-
-