| 1 |
– |
/* Copyright (c) 1993 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* clip.c - routine to clip 3D line segments to a box. |
| 9 |
– |
* |
| 10 |
– |
* 8/28/85 |
| 6 |
|
*/ |
| 7 |
|
|
| 8 |
+ |
#include "copyright.h" |
| 9 |
+ |
|
| 10 |
|
#include "fvect.h" |
| 11 |
|
|
| 12 |
|
#include "plocate.h" |
| 14 |
|
#define MAXITER 6 /* maximum possible number of iterations */ |
| 15 |
|
|
| 16 |
|
|
| 17 |
+ |
int |
| 18 |
|
clip(ep1, ep2, min, max) /* clip a line segment to a box */ |
| 19 |
< |
FLOAT *ep1, *ep2; |
| 19 |
> |
RREAL *ep1, *ep2; |
| 20 |
|
FVECT min, max; |
| 21 |
|
{ |
| 22 |
|
int itlim = MAXITER; |
| 23 |
|
int loc1, loc2; |
| 24 |
|
int accept; |
| 25 |
< |
FLOAT *dp; |
| 25 |
> |
RREAL *dp; |
| 26 |
|
double d; |
| 27 |
|
register int i, j; |
| 28 |
|
|