/* Copyright 1993-2002 The MathWorks, Inc. */ /* Source file for reducep MEX file */ /* $Revision: 1.4 $ */ #ifndef GFXGEOM_PROXGRID_INCLUDED // -*- C++ -*- #define GFXGEOM_PROXGRID_INCLUDED #include "Vec3.h" #include "Buffer.h" #include "Array3.h" class ProxGrid_Cell : public buffer { public: ProxGrid_Cell() : buffer(8) { } }; class ProxGrid { array3 cells; int xdiv, ydiv, zdiv; real cellsize; real cellsize2; Vec3 min, max; void cell_for_point(const Vec3&, int *i, int *j, int *k); void maybe_collect_points(Vec3 *v, buffer& close, ProxGrid_Cell& cell); public: ProxGrid(const Vec3& min, const Vec3& max, real dist); ~ProxGrid() { cells.free(); } void addPoint(Vec3 *); void removePoint(Vec3 *); void proximalPoints(Vec3 *, buffer&); }; // GFXGEOM_PROXGRID_INCLUDED #endif