Blender  V3.3
FastGrid.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include "Grid.h"
11 
12 namespace Freestyle {
13 
19 class FastGrid : public Grid {
20  public:
21  FastGrid() : Grid()
22  {
23  _cells = NULL;
24  _cells_size = 0;
25  }
26 
27  virtual ~FastGrid()
28  {
29  clear();
30  }
31 
36  virtual void clear();
37 
46  virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb);
47 
49  Cell *getCell(const Vec3u &p);
50 
52  virtual void fillCell(const Vec3u &p, Cell &cell);
53 
54  protected:
56  unsigned _cells_size;
57 
58 #ifdef WITH_CXX_GUARDEDALLOC
59  MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:FastGrid")
60 #endif
61 };
62 
63 } /* namespace Freestyle */
Base class to define a cell grid surrounding the bounding box of the scene.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
Cell * getCell(const Vec3u &p)
Definition: FastGrid.cpp:43
unsigned _cells_size
Definition: FastGrid.h:56
virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb)
Definition: FastGrid.cpp:35
virtual void fillCell(const Vec3u &p, Cell &cell)
Definition: FastGrid.cpp:59
virtual void clear()
Definition: FastGrid.cpp:17
virtual ~FastGrid()
Definition: FastGrid.h:27
inherits from class Rep
Definition: AppCanvas.cpp:18