ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/oct.C
(Generate patch)

Comparing libgender/oct.C (file contents):
Revision 1.5 by root, Sun Oct 3 20:14:33 2004 UTC vs.
Revision 1.6 by root, Sun Oct 3 22:46:03 2004 UTC

58 return abs (a2.x - b2.x) <= ea + eb.x 58 return abs (a2.x - b2.x) <= ea + eb.x
59 && abs (a2.y - b2.y) <= ea + eb.y 59 && abs (a2.y - b2.y) <= ea + eb.y
60 && abs (a2.z - b2.z) <= ea + eb.z; 60 && abs (a2.z - b2.z) <= ea + eb.z;
61} 61}
62 62
63void octant::add (const sector &sec, entity_base *e) 63void octant::add (entity_base *e)
64{ 64{
65 printf ("OCTANT %d,%d,%d+%d\n", orig.x, orig.y, orig.z, extent); 65 printf ("OCTANT %d,%d,%d+%d\n", orig.x, orig.y, orig.z, extent);
66 66
67 if (overlap (orig, extent, sec, e->bbox)) 67 if (overlap (orig, extent, e->orig, e->bbox))
68 { 68 {
69 printf ("overlap, add\n"); 69 printf ("overlap, add\n");
70 push_back (e); 70 push_back (e);
71 e->o.push_back (this); 71 e->o.push_back (this);
72 72
73#if 0 73#if 0
74 uoffs extent2 = extent / 2; 74 uoffs extent2 = extent / 2;
75 for (int si = 8; i--; ) 75 for (int si = 8; i--; )
76 { 76 {
77 sector sub = orig; 77 e->orig sub = orig;
78 sub.offset (si, extent2); 78 sub.offset (si, extent2);
79 if (overlap (sub, extent2, sec, e->bbox)) 79 if (overlap (sub, extent2, e->orig, e->bbox))
80 { 80 {
81 } 81 }
82#endif 82#endif
83 } 83 }
84 else 84 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines