| 21 |
|
#define DO_NCMDS 10 /* number of object display commands */ |
| 22 |
|
|
| 23 |
|
/* commands entered on stdin only */ |
| 24 |
< |
#define DO_INIT {"load","unload","xform","move","unmove","dup",\ |
| 24 |
> |
#define DO_INIT {"load","clear","xform","move","unmove","dup",\ |
| 25 |
|
"show","light","hide","object"} |
| 26 |
|
|
| 27 |
|
/******************************************************************* |
| 50 |
|
|
| 51 |
|
|
| 52 |
|
double |
| 53 |
< |
dobj_trace(rorg, rdir) : check for ray intersection with objects |
| 53 |
> |
dobj_trace(nm, rorg, rdir) : check for ray intersection with objects |
| 54 |
> |
char nm[]; : object name (modified) |
| 55 |
|
FVECT rorg, rdir; : ray origin and direction |
| 56 |
|
|
| 57 |
< |
Check to see if the given ray intersects any of the visible objects, |
| 57 |
> |
Check to see if the given ray intersects the given object, |
| 58 |
|
returning the distance the ray traveled if it did, or FHUGE if it didn't. |
| 59 |
+ |
If nm contains "*", then all visible objects are checked and the name |
| 60 |
+ |
of the intersected object is returned, or "" if none. If nm is NULL, |
| 61 |
+ |
then all visible objects are checked, but the name is not returned. |
| 62 |
|
|
| 63 |
|
|
| 64 |
< |
void |
| 64 |
> |
int |
| 65 |
|
dobj_render() : render visible objects to OpenGL |
| 66 |
|
|
| 67 |
|
Renders all display objects using OpenGL, assuming desired view has |
| 68 |
|
been set. This routine also assumes that the tone-mapping library |
| 69 |
|
is being used to set exposure, and it queries this information to |
| 70 |
< |
adjust light sources as necessary for illuminated objects. |
| 70 |
> |
adjust light sources as necessary for illuminated objects. Returns |
| 71 |
> |
the number of objects rendered. |
| 72 |
|
|
| 73 |
|
|
| 74 |
|
void |