ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/sm_geom.h
(Generate patch)

Comparing ray/src/hd/sm_geom.h (file contents):
Revision 3.2 by gwlarson, Thu Aug 20 16:47:22 1998 UTC vs.
Revision 3.4 by gwlarson, Wed Sep 16 18:16:28 1998 UTC

# Line 8 | Line 8
8  
9   /* Assumes included after standard.h  */
10  
11 + #include <values.h>
12 +
13   #define ZERO(x) ((x) < FTINY && (x) > -FTINY)
14   #define EQUAL(a,b) ZERO((a) - (b))
15  
# Line 16 | Line 18
18   #define FALSE 0
19   #endif
20  
21 + typedef long BCOORD;
22 + typedef long BDIR;
23 + typedef long TINT;
24 + #define BITS_BCOORD     (BITS(long)>>1)
25 + #define SHIFT_MAXBCOORD (BITS_BCOORD-2)  
26 + #define MAXBCOORD      (1L << SHIFT_MAXBCOORD)
27 + #define MAXBCOORD2      (MAXBCOORD>>1)
28 + #define MAXBDIR        MAXBCOORD
29 + #define MAXT           MAXBCOORD
30 + #define HUGET      MAXLONG
31 +
32   #define M_2_3_PI PI*2/3
33  
34 + #define INVALID -1
35 +
36   #define GT_INVALID  0
37   #define GT_VERTEX   1
38   #define GT_EDGE     2
# Line 34 | Line 49
49   #define DIST(a,b)         (sqrt(((a)[0]-(b)[0])*((a)[0]-(b)[0]) + \
50                                  ((a)[1]-(b)[1])*((a)[1]-(b)[1]) + \
51                                  ((a)[2]-(b)[2])*((a)[2]-(b)[2])))
52 + #define DIST_SQ(a,b)      (((a)[0]-(b)[0])*((a)[0]-(b)[0]) + \
53 +                                ((a)[1]-(b)[1])*((a)[1]-(b)[1]) + \
54 +                                ((a)[2]-(b)[2])*((a)[2]-(b)[2]))
55  
56   #define CROSS_VEC2(v1,v2) (((v1)[0]*(v2)[1]) - ((v1)[1]*(v2)[0]))
57   #define DOT_VEC2(v1,v2) ((v1)[0]*(v2)[0] + (v1)[1]*(v2)[1])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines