diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-08 03:17:23 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-08 03:17:23 +0400 |
commit | 4a92d82626980d6d1690113b9d27aae282fd48eb (patch) | |
tree | d690f59c72441272ed462fe59d416a9a255d087e /source/blender/freestyle/intern/geometry/Grid.cpp | |
parent | b4b22699850a859d601bb4851d0af18f568b3061 (diff) |
A big code clean-up patch from Bastien Montagne, many thanks!
Diffstat (limited to 'source/blender/freestyle/intern/geometry/Grid.cpp')
-rw-r--r-- | source/blender/freestyle/intern/geometry/Grid.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp index 11c4f11b281..0b798c5abb8 100644 --- a/source/blender/freestyle/intern/geometry/Grid.cpp +++ b/source/blender/freestyle/intern/geometry/Grid.cpp @@ -158,7 +158,7 @@ void Grid::configure(const Vec3r& orig, const Vec3r& size, unsigned nb) _cell_size[i] = _size[i] / _cells_nb[i]; } -void Grid::insertOccluder(Polygon3r* occluder) +void Grid::insertOccluder(Polygon3r *occluder) { const vector<Vec3r> vertices = occluder->getVertices(); if (vertices.size() == 0) @@ -208,7 +208,7 @@ void Grid::insertOccluder(Polygon3r* occluder) if (GeomUtils::overlapTriangleBox(boxcenter, boxhalfsize, triverts)) { // We must then create the Cell and add it to the cells list if it does not exist yet. // We must then add the occluder to the occluders list of this cell. - Cell* cell = getCell(coord); + Cell *cell = getCell(coord); if (!cell) { cell = new Cell(boxmin); fillCell(coord, *cell); @@ -226,7 +226,7 @@ void Grid::insertOccluder(Polygon3r* occluder) coord[0] = x; coord[1] = y; coord[2] = z; - Cell* cell = getCell(coord); + Cell *cell = getCell(coord); if (!cell) { Vec3r orig; getCellOrigin(coord, orig); @@ -311,7 +311,7 @@ void Grid::castInfiniteRay(const Vec3r& orig, const Vec3r& dir, OccludersSet& oc castRayInternal(visitor); } -Polygon3r* Grid::castRayToFindFirstIntersection(const Vec3r& orig, const Vec3r& dir, double& t, +Polygon3r *Grid::castRayToFindFirstIntersection(const Vec3r& orig, const Vec3r& dir, double& t, double& u, double& v, unsigned timestamp) { Polygon3r *occluder = 0; @@ -348,7 +348,8 @@ void Grid::initRay (const Vec3r &orig, const Vec3r& end, unsigned timestamp) //_ray_occluders.clear(); } -bool Grid::initInfiniteRay (const Vec3r &orig, const Vec3r& dir, unsigned timestamp) { +bool Grid::initInfiniteRay (const Vec3r &orig, const Vec3r& dir, unsigned timestamp) +{ _ray_dir = dir; _t_end = FLT_MAX; _t = 0; |