--- ray/src/rt/o_mesh.c 2003/06/26 00:58:10 2.7 +++ ray/src/rt/o_mesh.c 2004/03/30 16:13:01 2.10 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: o_mesh.c,v 2.7 2003/06/26 00:58:10 schorsch Exp $"; +static const char RCSid[] = "$Id: o_mesh.c,v 2.10 2004/03/30 16:13:01 schorsch Exp $"; #endif /* * Routines for computing ray intersections with meshes. @@ -21,11 +21,12 @@ static const char RCSid[] = "$Id: o_mesh.c,v 2.7 2003/ #include "copyright.h" -#include "ray.h" +#include +#include "ray.h" #include "mesh.h" - #include "tmesh.h" +#include "rtotypes.h" #define EDGE_CACHE_SIZ 251 /* length of mesh edge cache */ @@ -52,7 +53,7 @@ OBJREC *o; /* get mesh instance */ edge_cache.mi = getmeshinst(edge_cache.o = o, IO_ALL); /* clear edge cache */ - bzero((void *)edge_cache.cache, sizeof(edge_cache.cache)); + memset((void *)edge_cache.cache, '\0', sizeof(edge_cache.cache)); } @@ -144,10 +145,11 @@ RAY *r; } -int -o_mesh(o, r) /* compute ray intersection with a mesh */ -OBJREC *o; -register RAY *r; +extern int +o_mesh( /* compute ray intersection with a mesh */ + OBJREC *o, + register RAY *r +) { RAY rcont; int flags; @@ -158,7 +160,7 @@ register RAY *r; /* get the mesh instance */ prep_edge_cache(o); /* copy and transform ray */ - copystruct(&rcont, r); + rcont = *r; multp3(rcont.rorg, r->rorg, curmi->x.b.xfm); multv3(rcont.rdir, r->rdir, curmi->x.b.xfm); for (i = 0; i < 3; i++)