--- ray/src/common/octree.h 2003/05/15 05:13:35 2.8 +++ ray/src/common/octree.h 2005/09/23 19:04:52 2.11 @@ -1,10 +1,13 @@ -/* RCSid $Id: octree.h,v 2.8 2003/05/15 05:13:35 greg Exp $ */ +/* RCSid $Id: octree.h,v 2.11 2005/09/23 19:04:52 greg Exp $ */ /* * octree.h - header file for routines using octrees. */ +#ifndef _RAD_OCTREE_H_ +#define _RAD_OCTREE_H_ +#ifdef __cplusplus +extern "C" { +#endif -#include "copyright.h" - /* * An octree is expressed as an integer which is either * an index to eight other nodes, the empty tree, or an index @@ -50,9 +53,9 @@ extern OCTREE *octblock[MAXOBLK]; /* octree blocks */ */ typedef struct { - OCTREE cutree; /* the octree for this cube */ FVECT cuorg; /* the cube origin */ double cusize; /* the cube size */ + OCTREE cutree; /* the octree for this cube */ } CUBE; extern CUBE thescene; /* the main scene */ @@ -79,21 +82,7 @@ extern CUBE thescene; /* the main scene */ #define O_HIT 1 /* intersection */ #define O_IN 2 /* cube contained entirely */ -#ifdef NOPROTO -extern OCTREE octalloc(); -extern void octfree(); -extern void octdone(); -extern OCTREE combine(); -extern void culocate(); -extern void cucopy(); -extern int incube(); -extern int readoct(); -extern void readscene(); -extern void writescene(); - -#else - extern OCTREE octalloc(void); extern void octfree(OCTREE ot); extern void octdone(void); @@ -107,4 +96,9 @@ extern int readoct(char *fname, int load, CUBE *scene, extern void readscene(FILE *fp, int objsiz); extern void writescene(int firstobj, int nobjs, FILE *fp); + +#ifdef __cplusplus +} #endif +#endif /* _RAD_OCTREE_H_ */ +