2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* ***** END GPL LICENSE BLOCK *****
21
#ifndef __FASTGRID_H__
22
#define __FASTGRID_H__
24
/** \file blender/freestyle/intern/geometry/FastGrid.h
26
* \brief Class to define a cell grid surrounding the bounding box of the scene
27
* \author Stephane Grabli
37
/*! Class to define a regular grid used for ray casting computations
38
* We don't use a hashtable here. The grid is explicitly stored for faster computations.
39
* However, this might result in significant increase in memory usage (compared to the regular grid)
41
class LIB_GEOMETRY_EXPORT FastGrid : public Grid
56
* Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells.
60
/*! Sets the different parameters of the grid
64
* The grid's dimensions
66
* The number of cells of the grid
68
virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb);
70
/*! returns the cell whose coordinates are pased as argument */
71
Cell *getCell(const Vec3u& p);
73
/*! Fills the case p with the cell iCell */
74
virtual void fillCell(const Vec3u& p, Cell& cell);
81
} /* namespace Freestyle */
83
#endif // __FASTGRID_H__