--- ray/src/hd/rhdobj.h 1998/08/21 11:38:22 3.2 +++ ray/src/hd/rhdobj.h 2003/07/14 22:24:00 3.7 @@ -1,11 +1,14 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - -/* SCCSid "$SunId$ SGI" */ - +/* RCSid: $Id: rhdobj.h,v 3.7 2003/07/14 22:24:00 schorsch Exp $ */ /* * Header file for object display routines for rholo drivers. */ +#ifndef _RAD_RHDOBJ_H_ +#define _RAD_RHDOBJ_H_ +#ifdef __cplusplus +extern "C" { +#endif + /* additional user commands */ #define DO_LOAD 0 /* load octree object */ #define DO_UNLOAD 1 /* unload (free) octree object */ @@ -21,7 +24,7 @@ #define DO_NCMDS 10 /* number of object display commands */ /* commands entered on stdin only */ -#define DO_INIT {"load","unload","xform","move","unmove","dup",\ +#define DO_INIT {"load","clear","xform","move","unmove","dup",\ "show","light","hide","object"} /******************************************************************* @@ -44,8 +47,9 @@ int dobj_command(cmd, args) : check/run object display command char *cmd, *args; : command name and argument string -Check to see if this is an object display command, and return the command -number after running it if it is, or -1 if it isn't. Error messages should +Check to see if this is an object display command, and return -1 if +it isn't. If it is a valid command that results in some visible +change, return non-zero, otherwise return 0. Error messages should be printed with error(COMMAND,err). @@ -61,13 +65,14 @@ of the intersected object is returned, or "" if none. then all visible objects are checked, but the name is not returned. -void +int dobj_render() : render visible objects to OpenGL Renders all display objects using OpenGL, assuming desired view has been set. This routine also assumes that the tone-mapping library is being used to set exposure, and it queries this information to -adjust light sources as necessary for illuminated objects. +adjust light sources as necessary for illuminated objects. Returns +the number of objects rendered. void @@ -149,3 +154,9 @@ extern double dobj_trace(); extern char rhdcmd[DO_NCMDS][8]; extern int (*dobj_lightsamp)(); /* pointer to function to get lights */ + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_RHDOBJ_H_ */ +