Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/view_map/BoxGrid.h
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | #endif | ||||
| }; | }; | ||||
| private: | private: | ||||
| struct Cell { | struct Cell { | ||||
| // Can't store Cell in a vector without copy and assign | // Can't store Cell in a vector without copy and assign | ||||
| // Cell(const Cell& other); | // Cell(const Cell& other); | ||||
| // Cell& operator=(const Cell& other); | // Cell& operator=(const Cell& other); | ||||
| explicit Cell(); | explicit Cell() = default; | ||||
| ~Cell(); | |||||
| static bool compareOccludersByShallowestPoint(const OccluderData *a, const OccluderData *b); | static bool compareOccludersByShallowestPoint(const OccluderData *a, const OccluderData *b); | ||||
| void setDimensions(real x, real y, real sizeX, real sizeY); | void setDimensions(real x, real y, real sizeX, real sizeY); | ||||
| void checkAndInsert(OccluderSource &source, Polygon3r &poly, OccluderData *&occluder); | void checkAndInsert(OccluderSource &source, Polygon3r &poly, OccluderData *&occluder); | ||||
| void indexPolygons(); | void indexPolygons(); | ||||
| real boundary[4]; | real boundary[4]; | ||||
| Show All 14 Lines | public: | ||||
| * has an occludee candidate and (*current)->shallowest > candidate[2], because at that point | * has an occludee candidate and (*current)->shallowest > candidate[2], because at that point | ||||
| * forward no new occluder could possibly be a better occludee. | * forward no new occluder could possibly be a better occludee. | ||||
| */ | */ | ||||
| class Iterator { | class Iterator { | ||||
| public: | public: | ||||
| // epsilon is not used in this class, but other grids with the same interface may need an | // epsilon is not used in this class, but other grids with the same interface may need an | ||||
| // epsilon | // epsilon | ||||
| explicit Iterator(BoxGrid &grid, Vec3r ¢er, real epsilon = 1.0e-06); | explicit Iterator(BoxGrid &grid, Vec3r ¢er, real epsilon = 1.0e-06); | ||||
| ~Iterator(); | |||||
| void initBeforeTarget(); | void initBeforeTarget(); | ||||
| void initAfterTarget(); | void initAfterTarget(); | ||||
| void nextOccluder(); | void nextOccluder(); | ||||
| void nextOccludee(); | void nextOccludee(); | ||||
| bool validBeforeTarget(); | bool validBeforeTarget(); | ||||
| bool validAfterTarget(); | bool validAfterTarget(); | ||||
| WFace *getWFace() const; | WFace *getWFace() const; | ||||
| Polygon3r *getCameraSpacePolygon(); | Polygon3r *getCameraSpacePolygon(); | ||||
| Show All 12 Lines | |||||
| #ifdef WITH_CXX_GUARDEDALLOC | #ifdef WITH_CXX_GUARDEDALLOC | ||||
| MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid:Iterator") | MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BoxGrid:Iterator") | ||||
| #endif | #endif | ||||
| }; | }; | ||||
| class Transform : public GridHelpers::Transform { | class Transform : public GridHelpers::Transform { | ||||
| public: | public: | ||||
| explicit Transform(); | explicit Transform() = default; | ||||
| explicit Transform(Transform &other); | explicit Transform(Transform &other); | ||||
| Vec3r operator()(const Vec3r &point) const; | Vec3r operator()(const Vec3r &point) const; | ||||
| }; | }; | ||||
| private: | private: | ||||
| // Prevent implicit copies and assignments. | // Prevent implicit copies and assignments. | ||||
| BoxGrid(const BoxGrid &other); | BoxGrid(const BoxGrid &other); | ||||
| BoxGrid &operator=(const BoxGrid &other); | BoxGrid &operator=(const BoxGrid &other); | ||||
| ▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines | |||||