diff options
Diffstat (limited to 'source/blender/freestyle/intern/geometry/FastGrid.h')
-rw-r--r-- | source/blender/freestyle/intern/geometry/FastGrid.h | 68 |
1 files changed, 33 insertions, 35 deletions
diff --git a/source/blender/freestyle/intern/geometry/FastGrid.h b/source/blender/freestyle/intern/geometry/FastGrid.h index 8c22703a68c..e2345d4831c 100644 --- a/source/blender/freestyle/intern/geometry/FastGrid.h +++ b/source/blender/freestyle/intern/geometry/FastGrid.h @@ -30,51 +30,49 @@ namespace Freestyle { * We don't use a hashtable here. The grid is explicitly stored for faster computations. * However, this might result in significant increase in memory usage (compared to the regular grid) */ -class FastGrid : public Grid -{ -public: - FastGrid() : Grid() - { - _cells = NULL; - _cells_size = 0; - } +class FastGrid : public Grid { + public: + FastGrid() : Grid() + { + _cells = NULL; + _cells_size = 0; + } - virtual ~FastGrid() - { - clear(); - } + virtual ~FastGrid() + { + clear(); + } - /*! clears the grid - * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. - */ - virtual void clear(); + /*! clears the grid + * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. + */ + virtual void clear(); - /*! Sets the different parameters of the grid - * orig - * The grid origin - * size - * The grid's dimensions - * nb - * The number of cells of the grid - */ - virtual void configure(const Vec3r& orig, const Vec3r& size, unsigned nb); + /*! Sets the different parameters of the grid + * orig + * The grid origin + * size + * The grid's dimensions + * nb + * The number of cells of the grid + */ + virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb); - /*! returns the cell whose coordinates are pased as argument */ - Cell *getCell(const Vec3u& p); + /*! returns the cell whose coordinates are pased as argument */ + Cell *getCell(const Vec3u &p); - /*! Fills the case p with the cell iCell */ - virtual void fillCell(const Vec3u& p, Cell& cell); + /*! Fills the case p with the cell iCell */ + virtual void fillCell(const Vec3u &p, Cell &cell); -protected: - Cell **_cells; - unsigned _cells_size; + protected: + Cell **_cells; + unsigned _cells_size; #ifdef WITH_CXX_GUARDEDALLOC - MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FastGrid") + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FastGrid") #endif - }; } /* namespace Freestyle */ -#endif // __FASTGRID_H__ +#endif // __FASTGRID_H__ |