| 765 |
|
|
| 766 |
|
|
| 767 |
|
static void |
| 768 |
< |
oputp( /* print point */ |
| 768 |
> |
oputp( /* print intersection point */ |
| 769 |
|
RAY *r |
| 770 |
|
) |
| 771 |
|
{ |
| 772 |
< |
if (r->rot < FHUGE*.99) |
| 773 |
< |
(*putreal)(r->rop, 3); |
| 774 |
< |
else |
| 775 |
< |
(*putreal)(vdummy, 3); |
| 772 |
> |
(*putreal)(r->rop, 3); /* set to ray origin if distant or no hit */ |
| 773 |
|
} |
| 774 |
|
|
| 775 |
|
|
| 778 |
|
RAY *r |
| 779 |
|
) |
| 780 |
|
{ |
| 781 |
< |
if (r->rot < FHUGE*.99) { |
| 785 |
< |
if (r->rflips & 1) { /* undo any flippin' flips */ |
| 786 |
< |
FVECT unrm; |
| 787 |
< |
unrm[0] = -r->ron[0]; |
| 788 |
< |
unrm[1] = -r->ron[1]; |
| 789 |
< |
unrm[2] = -r->ron[2]; |
| 790 |
< |
(*putreal)(unrm, 3); |
| 791 |
< |
} else |
| 792 |
< |
(*putreal)(r->ron, 3); |
| 793 |
< |
} else |
| 781 |
> |
if (r->ro == NULL) { /* zero vector if clipped or no hit */ |
| 782 |
|
(*putreal)(vdummy, 3); |
| 783 |
+ |
return; |
| 784 |
+ |
} |
| 785 |
+ |
if (r->rflips & 1) { /* undo any flippin' flips */ |
| 786 |
+ |
FVECT unrm; |
| 787 |
+ |
unrm[0] = -r->ron[0]; |
| 788 |
+ |
unrm[1] = -r->ron[1]; |
| 789 |
+ |
unrm[2] = -r->ron[2]; |
| 790 |
+ |
(*putreal)(unrm, 3); |
| 791 |
+ |
} else |
| 792 |
+ |
(*putreal)(r->ron, 3); |
| 793 |
|
} |
| 794 |
|
|
| 795 |
|
|
| 800 |
|
{ |
| 801 |
|
FVECT pnorm; |
| 802 |
|
|
| 803 |
< |
if (r->rot >= FHUGE*.99) { |
| 803 |
> |
if (r->ro == NULL) { /* clipped or no hit */ |
| 804 |
|
(*putreal)(vdummy, 3); |
| 805 |
|
return; |
| 806 |
|
} |