ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/cone.h
Revision: 1.2
Committed: Wed Oct 23 12:19:24 1991 UTC (32 years, 6 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.1: +4 -4 lines
Log Message:
added FLOAT definition for vectors and matrices

File Contents

# User Rev Content
1 greg 1.1 /* Copyright (c) 1986 Regents of the University of California */
2    
3     /* SCCSid "$SunId$ LBL" */
4    
5     /*
6     * cone.h - header file for cones (cones, cylinders, rings, cups, tubes).
7     *
8     * Storage of arguments in the cone structure is a little strange.
9     * To save space, we use an index into the real arguments of the
10     * object structure through ca. The indices are for the axis
11     * endpoints and radii: p0, p1, r0 and r1.
12     *
13     * 2/12/86
14     */
15    
16     typedef struct cone {
17 greg 1.2 FLOAT *ca; /* cone arguments (o->oargs.farg) */
18 greg 1.1 char p0, p1; /* indices for endpoints */
19     char r0, r1; /* indices for radii */
20     FVECT ad; /* axis direction vector */
21 greg 1.2 FLOAT al; /* axis length */
22     FLOAT sl; /* side length */
23     FLOAT (*tm)[4]; /* pointer to transformation matrix */
24 greg 1.1 } CONE;
25    
26     #define CO_R0(co) ((co)->ca[(co)->r0])
27     #define CO_R1(co) ((co)->ca[(co)->r1])
28     #define CO_P0(co) ((co)->ca+(co)->p0)
29     #define CO_P1(co) ((co)->ca+(co)->p1)
30    
31     extern CONE *getcone();