1 |
– |
/* Copyright (c) 1995 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 |
|
* pmapgen.c: general routines for 2-D perspective mappings. |
6 |
|
* These routines are independent of the poly structure, |
9 |
|
* Paul Heckbert 5 Nov 85, 12 Dec 85 |
10 |
|
*/ |
11 |
|
|
15 |
– |
static char rcsid[] = "$Header$"; |
12 |
|
#include <stdio.h> |
13 |
|
#include "pmap.h" |
14 |
|
#include "mx3.h" |
32 |
|
* computing it symbolically. |
33 |
|
*/ |
34 |
|
|
35 |
< |
pmap_quad_rect(u0, v0, u1, v1, qdrl, QR) |
36 |
< |
double u0, v0, u1, v1; /* bounds of rectangle */ |
37 |
< |
double qdrl[4][2]; /* vertices of quadrilateral */ |
38 |
< |
double QR[3][3]; /* qdrl->rect transform (returned) */ |
35 |
> |
extern int |
36 |
> |
pmap_quad_rect( |
37 |
> |
double u0, /* bounds of rectangle */ |
38 |
> |
double v0, |
39 |
> |
double u1, |
40 |
> |
double v1, |
41 |
> |
double qdrl[4][2], /* vertices of quadrilateral */ |
42 |
> |
double QR[3][3] /* qdrl->rect transform (returned) */ |
43 |
> |
) |
44 |
|
{ |
45 |
|
int ret; |
46 |
|
double du, dv; |
85 |
|
* (0,1) --> qdrl[3] |
86 |
|
*/ |
87 |
|
|
88 |
< |
pmap_square_quad(qdrl, SQ) |
89 |
< |
register double qdrl[4][2]; /* vertices of quadrilateral */ |
90 |
< |
register double SQ[3][3]; /* square->qdrl transform */ |
88 |
> |
extern int |
89 |
> |
pmap_square_quad( |
90 |
> |
register double qdrl[4][2], /* vertices of quadrilateral */ |
91 |
> |
register double SQ[3][3] /* square->qdrl transform */ |
92 |
> |
) |
93 |
|
{ |
94 |
|
double px, py; |
95 |
|
|