diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-30 10:50:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 00:58:27 +0300 |
commit | 1e8697cd8094183a3f356bf8564284a31ffb89fc (patch) | |
tree | 554b1ac7856f3f168c58476ce53d1953beaa760e /source/blender/freestyle/intern/geometry | |
parent | 5ca8ac51d04c6feb9d29d75fb2525168d30fbe74 (diff) |
Cleanup: comments (long lines) in freestyle
Diffstat (limited to 'source/blender/freestyle/intern/geometry')
10 files changed, 101 insertions, 82 deletions
diff --git a/source/blender/freestyle/intern/geometry/FastGrid.h b/source/blender/freestyle/intern/geometry/FastGrid.h index e2345d4831c..a3b20661fa6 100644 --- a/source/blender/freestyle/intern/geometry/FastGrid.h +++ b/source/blender/freestyle/intern/geometry/FastGrid.h @@ -28,7 +28,8 @@ namespace Freestyle { /*! Class to define a regular grid used for ray casting computations * 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) + * However, this might result in significant increase in memory usage + * (compared to the regular grid). */ class FastGrid : public Grid { public: @@ -43,8 +44,9 @@ class FastGrid : public Grid { clear(); } - /*! clears the grid - * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. + /*! + * clears the grid + * Deletes all the cells, clears the hashtable, resets size, size of cell, number of cells. */ virtual void clear(); diff --git a/source/blender/freestyle/intern/geometry/FitCurve.cpp b/source/blender/freestyle/intern/geometry/FitCurve.cpp index b0408826763..368c3d2f46c 100644 --- a/source/blender/freestyle/intern/geometry/FitCurve.cpp +++ b/source/blender/freestyle/intern/geometry/FitCurve.cpp @@ -181,8 +181,8 @@ static BezierCurve GenerateBezier( alpha_l = det_X_C1 / det_C0_C1; alpha_r = det_C0_X / det_C0_C1; - /* If alpha negative, use the Wu/Barsky heuristic (see text) (if alpha is 0, you get coincident control points - * that lead to divide by zero in any subsequent NewtonRaphsonRootFind() call). + /* If alpha negative, use the Wu/Barsky heuristic (see text) (if alpha is 0, you get coincident + * control points that lead to divide by zero in any subsequent NewtonRaphsonRootFind() call). */ if (alpha_l < 1.0e-6 || alpha_r < 1.0e-6) { double dist = V2DistanceBetween2Points(&d[last], &d[first]) / 3.0; @@ -194,8 +194,9 @@ static BezierCurve GenerateBezier( return bezCurve; } - /* First and last control points of the Bezier curve are positioned exactly at the first and last data points - * Control points 1 and 2 are positioned an alpha distance out on the tangent vectors, left and right, respectively + /* First and last control points of the Bezier curve are positioned exactly at the first and last + * data points Control points 1 and 2 are positioned an alpha distance out on the tangent + * vectors, left and right, respectively */ bezCurve[0] = d[first]; bezCurve[3] = d[last]; diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.h b/source/blender/freestyle/intern/geometry/GeomCleaner.h index 5fedf94b479..253d3553010 100644 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.h +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.h @@ -45,20 +45,24 @@ class GeomCleaner { /*! Sorts an array of Indexed vertices * iVertices - * Array of vertices to sort. It is organized as a float series of vertex coordinates: XYZXYZXYZ... + * Array of vertices to sort. + * It is organized as a float series of vertex coordinates: XYZXYZXYZ... * iVSize * The size of iVertices array. * iIndices - * The array containing the vertex indices (used to refer to the vertex coordinates in an indexed face). Each - * element is an unsignedeger multiple of 3. + * The array containing the vertex indices + * (used to refer to the vertex coordinates in an indexed face). + * Each element is an unsignedeger multiple of 3. * iISize * The size of iIndices array * oVertices - * Output of sorted vertices. A vertex v1 precedes another one v2 in this array if v1.x<v2.x, - * or v1.x=v2.x && v1.y < v2.y or v1.x=v2.y && v1.y=v2.y && v1.z < v2.z. + * Output of sorted vertices. + * A vertex v1 precedes another one v2 in this array + * if v1.x<v2.x, or v1.x=v2.x && v1.y < v2.y or v1.x=v2.y && v1.y=v2.y && v1.z < v2.z. * The array is organized as a 3-float serie giving the vertices coordinates: XYZXYZXYZ... * oIndices - * Output corresponding to the iIndices array but reorganized in order to match the sorted vertex array. + * Output corresponding to the iIndices array but reorganized in + * order to match the sorted vertex array. */ static void SortIndexedVertexArray(const float *iVertices, unsigned iVSize, @@ -67,13 +71,16 @@ class GeomCleaner { float **oVertices, unsigned **oIndices); - /*! Compress a SORTED indexed vertex array by eliminating multiple appearing occurences of a single vertex. + /*! Compress a SORTED indexed vertex array by eliminating multiple + * appearing occurences of a single vertex. * iVertices - * The SORTED vertex array to compress. It is organized as a float series of vertex coordinates: XYZXYZXYZ... + * The SORTED vertex array to compress. + * It is organized as a float series of vertex coordinates: XYZXYZXYZ... * iVSize * The size of iVertices array. * iIndices - * The array containing the vertex indices (used to refer to the vertex coordinates in an indexed face). + * The array containing the vertex indices + * (used to refer to the vertex coordinates in an indexed face). * Each element is an unsignedeger multiple of 3. * iISize * The size of iIndices array @@ -100,7 +107,8 @@ class GeomCleaner { * iVSize * The size of iVertices array. * iIndices - * The array containing the vertex indices (used to refer to the vertex coordinates in an indexed face). + * The array containing the vertex indices + * (used to refer to the vertex coordinates in an indexed face). * Each element is an unsignedeger multiple of 3. * iISize * The size of iIndices array @@ -120,15 +128,16 @@ class GeomCleaner { unsigned *oVSize, unsigned **oIndices); - /*! Cleans an indexed vertex array. (Identical to SortAndCompress except that we use here a hash table - * to create the new array.) + /*! Cleans an indexed vertex array. + * (Identical to SortAndCompress except that we use here a hash table to create the new array.) * iVertices * The vertex array to sort then compress. It is organized as a float series of * vertex coordinates: XYZXYZXYZ... * iVSize * The size of iVertices array. * iIndices - * The array containing the vertex indices (used to refer to the vertex coordinates in an indexed face). + * The array containing the vertex indices + * (used to refer to the vertex coordinates in an indexed face). * Each element is an unsignedeger multiple of 3. * iISize * The size of iIndices array @@ -154,9 +163,10 @@ class GeomCleaner { }; /*! Binary operators */ -//inline bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2); +// inline bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2); -/*! Class Indexed Vertex. Used to represent an indexed vertex by storing the vertex coordinates as well as its index */ +/*! Class Indexed Vertex. Used to represent an indexed vertex by storing the vertex coordinates as + * well as its index */ class IndexedVertex { private: Vec3f _Vector; @@ -223,7 +233,7 @@ class IndexedVertex { return _Vector[i]; } - //friend inline bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2); + // friend inline bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2); inline bool operator<(const IndexedVertex &v) const { return (_Vector < v._Vector); diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp index 2ac83526268..bec6ed27cc4 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp +++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp @@ -88,8 +88,8 @@ intersection_test intersect2dSeg2dSeg( r1 = a2 * p1[0] + b2 * p1[1] + c2; r2 = a2 * p2[0] + b2 * p2[1] + c2; - // Check signs of r1 and r2. If both point 1 and point 2 lie on same side of second line segment, - // the line segments do not intersect. + // Check signs of r1 and r2. If both point 1 and point 2 lie on same side of second line + // segment, the line segments do not intersect. if (r1 != 0 && r2 != 0 && r1 * r2 > 0.0) return (DONT_INTERSECT); @@ -172,8 +172,8 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, r1 = a2 * p1[0] + b2 * p1[1] + c2; r2 = a2 * p2[0] + b2 * p2[1] + c2; - // Check signs of r1 and r2. If both point 1 and point 2 lie on same side of second line segment, - // the line segments do not intersect. + // Check signs of r1 and r2. If both point 1 and point 2 lie on same side of second line + // segment, the line segments do not intersect. if (r1 != 0 && r2 != 0 && r1 * r2 > 0.0) return (DONT_INTERSECT); @@ -202,8 +202,8 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, // 2001-03-05: released the code in its first version // 2001-06-18: changed the order of the tests, faster // -// Acknowledgement: Many thanks to Pierre Terdiman for suggestions and discussions on how to optimize code. -// Thanks to David Hunt for finding a ">="-bug! +// Acknowledgement: Many thanks to Pierre Terdiman for suggestions and discussions on how to +// optimize code. Thanks to David Hunt for finding a ">="-bug! #define X 0 #define Y 1 @@ -337,10 +337,10 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1, // This internal procedure is defined below. bool overlapPlaneBox(Vec3r &normal, real d, Vec3r &maxbox); -// Use separating axis theorem to test overlap between triangle and box need to test for overlap in these directions: -// 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle we do not even need to test these) -// 2) normal of the triangle -// 3) crossproduct(edge from tri, {x,y,z}-directin) this gives 3x3=9 more tests +// Use separating axis theorem to test overlap between triangle and box need to test for overlap in +// these directions: 1) the {x,y,z}-directions (actually, since we use the AABB of the triangle we +// do not even need to test these) 2) normal of the triangle 3) crossproduct(edge from tri, +// {x,y,z}-directin) this gives 3x3=9 more tests bool overlapTriangleBox(Vec3r &boxcenter, Vec3r &boxhalfsize, Vec3r triverts[3]) { Vec3r v0, v1, v2, normal, e0, e1, e2; @@ -382,8 +382,8 @@ bool overlapTriangleBox(Vec3r &boxcenter, Vec3r &boxhalfsize, Vec3r triverts[3]) // Bullet 1: // first test overlap in the {x,y,z}-directions - // find min, max of the triangle each direction, and test for overlap in that direction -- this is equivalent - // to testing a minimal AABB around the triangle against the AABB + // find min, max of the triangle each direction, and test for overlap in that direction -- this + // is equivalent to testing a minimal AABB around the triangle against the AABB // test in X-direction FINDMINMAX(v0[X], v1[X], v2[X], min, max); @@ -664,7 +664,7 @@ void fromWorldToImage(const Vec3r &p, Vec3r &q, const real transform[4][4], cons // winX: q[0] = viewport[0] + viewport[2] * (q[0] + 1.0) / 2.0; - //winY: + // winY: q[1] = viewport[1] + viewport[3] * (q[1] + 1.0) / 2.0; } @@ -709,10 +709,10 @@ void fromCameraToWorld(const Vec3r &p, Vec3r &q, const real model_view_matrix[4] ///////////////////////////////////////////////////////////////////////////// // Copyright 2001, softSurfer (www.softsurfer.com) -// This code may be freely used and modified for any purpose providing that this copyright notice is included with it. -// SoftSurfer makes no warranty for this code, and cannot be held liable for any real or imagined damage resulting -// from its use. -// Users of this code must verify correctness for their application. +// This code may be freely used and modified for any purpose providing that this copyright notice +// is included with it. SoftSurfer makes no warranty for this code, and cannot be held liable for +// any real or imagined damage resulting from its use. Users of this code must verify correctness +// for their application. #define PERP(u, v) ((u)[0] * (v)[1] - (u)[1] * (v)[0]) // 2D perp product diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.h b/source/blender/freestyle/intern/geometry/GeomUtils.h index 42ef9612074..c469f10cc49 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.h +++ b/source/blender/freestyle/intern/geometry/GeomUtils.h @@ -105,7 +105,8 @@ bool include2dSeg2dArea(const Vec2r &min, const Vec2r &max, const Vec2r &A, cons /*! Box-triangle overlap test, adapted from Tomas Akenine-Möller code */ bool overlapTriangleBox(Vec3r &boxcenter, Vec3r &boxhalfsize, Vec3r triverts[3]); -/*! Fast, Minimum Storage Ray-Triangle Intersection, adapted from Tomas Möller and Ben Trumbore code. */ +/*! Fast, Minimum Storage Ray-Triangle Intersection, adapted from Tomas Möller and Ben Trumbore + * code. */ bool intersectRayTriangle(const Vec3r &orig, const Vec3r &dir, const Vec3r &v0, @@ -126,7 +127,8 @@ intersection_test intersectRayPlane(const Vec3r &orig, const real epsilon = M_EPSILON); // the epsilon to use /*! Intersection Ray-Bounding box (axis aligned). - * Adapted from Williams et al, "An Efficient Robust Ray-Box Intersection Algorithm", JGT 10:1 (2005), pp. 49-54. + * Adapted from Williams et al, "An Efficient Robust Ray-Box Intersection Algorithm", JGT 10:1 + * (2005), pp. 49-54. */ bool intersectRayBBox(const Vec3r &orig, const Vec3r &dir, // ray origin and direction diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp index 51afb5c1a45..aeb82d56009 100644 --- a/source/blender/freestyle/intern/geometry/Grid.cpp +++ b/source/blender/freestyle/intern/geometry/Grid.cpp @@ -49,10 +49,10 @@ void firstIntersectionGridVisitor::examineOccluder(Polygon3r *occ) { // check whether the edge and the polygon plane are coincident: //------------------------------------------------------------- - //first let us compute the plane equation. + // first let us compute the plane equation. Vec3r v1(((occ)->getVertices())[0]); Vec3d normal((occ)->getNormal()); - //soc unused - double d = -(v1 * normal); + // soc unused - double d = -(v1 * normal); double tmp_u, tmp_v, tmp_t; if ((occ)->rayIntersect(ray_org_, ray_dir_, tmp_t, tmp_u, tmp_v)) { @@ -167,8 +167,9 @@ void Grid::insertOccluder(Polygon3r *occluder) getCellCoordinates(min, imin); // We are now going to fill in the cells overlapping with the polygon bbox. - // If the polygon is a triangle (most of cases), we also check for each of these cells if it is overlapping with - // the triangle in order to only fill in the ones really overlapping the triangle. + // If the polygon is a triangle (most of cases), we also check for each of these cells if it is + // overlapping with the triangle in order to only fill in the ones really overlapping the + // triangle. unsigned i, x, y, z; vector<Vec3r>::const_iterator it; @@ -239,8 +240,8 @@ bool Grid::nextRayCell(Vec3u ¤t_cell, Vec3u &next_cell) t_min = FLT_MAX; // init tmin with handle of the case where one or 2 _u[i] = 0. unsigned coord = 0; // predominant coord(0=x, 1=y, 2=z) - // using a parametric equation of a line : B = A + t u, we find the tx, ty and tz respectively coresponding - // to the intersections with the plans: + // using a parametric equation of a line : B = A + t u, we find the tx, ty and tz respectively + // coresponding to the intersections with the plans: // x = _cell_size[0], y = _cell_size[1], z = _cell_size[2] for (i = 0; i < 3; i++) { if (_ray_dir[i] == 0) @@ -318,8 +319,8 @@ Polygon3r *Grid::castRayToFindFirstIntersection( firstIntersectionGridVisitor visitor(orig, dir, _cell_size); castRayInternal(visitor); // ARB: This doesn't work, because occluders are unordered within any cell - // visitor.occluder() will be an occluder, but we have no guarantee it will be the *first* occluder. - // I assume that is the reason this code is not actually used for FindOccludee. + // visitor.occluder() will be an occluder, but we have no guarantee it will be the *first* + // occluder. I assume that is the reason this code is not actually used for FindOccludee. occluder = visitor.occluder(); t = visitor.t_; u = visitor.u_; @@ -337,7 +338,7 @@ void Grid::initRay(const Vec3r &orig, const Vec3r &end, unsigned timestamp) for (unsigned i = 0; i < 3; i++) { _current_cell[i] = (unsigned)floor((orig[i] - _orig[i]) / _cell_size[i]); - //soc unused - unsigned u = _current_cell[i]; + // soc unused - unsigned u = _current_cell[i]; _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; } //_ray_occluders.clear(); @@ -358,7 +359,7 @@ bool Grid::initInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timesta if (box.inside(orig)) { for (unsigned int i = 0; i < 3; i++) { _current_cell[i] = (unsigned int)floor((orig[i] - _orig[i]) / _cell_size[i]); - //soc unused - unsigned u = _current_cell[i]; + // soc unused - unsigned u = _current_cell[i]; _pt[i] = orig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; } } @@ -372,7 +373,7 @@ bool Grid::initInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timesta _current_cell[i] = (unsigned)floor((newOrig[i] - _orig[i]) / _cell_size[i]); if (_current_cell[i] == _cells_nb[i]) _current_cell[i] = _cells_nb[i] - 1; - //soc unused - unsigned u = _current_cell[i]; + // soc unused - unsigned u = _current_cell[i]; _pt[i] = newOrig[i] - _orig[i] - _current_cell[i] * _cell_size[i]; } } diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index a2b64a446b6..67aae73a578 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -92,7 +92,7 @@ class Cell { class GridVisitor { public: - virtual ~GridVisitor(){}; //soc + virtual ~GridVisitor(){}; // soc virtual void discoverCell(Cell * /*cell*/) { @@ -143,7 +143,7 @@ class allOccludersGridVisitor : public GridVisitor { * The occluder and the intersection information are stored and accessible. */ class firstIntersectionGridVisitor : public GridVisitor { - //soc - changed order to remove warnings + // soc - changed order to remove warnings public: double u_, v_, t_; @@ -217,7 +217,8 @@ class Grid { */ virtual void configure(const Vec3r &orig, const Vec3r &size, unsigned nb); - /*! returns a vector of integer containing the coordinates of the cell containing the point passed as argument + /*! returns a vector of integer containing the coordinates of the cell containing the point + * passed as argument * p * The point for which we're looking the cell */ @@ -241,8 +242,8 @@ class Grid { /*! returns the cell whose coordinates are pased as argument */ virtual Cell *getCell(const Vec3u &coord) = 0; - /*! returns the cell containing the point passed as argument. If the cell is empty (contains no occluder), - * NULL is returned + /*! returns the cell containing the point passed as argument. + * If the cell is empty (contains no occluder), NULL is returned: * p * The point for which we're looking the cell */ @@ -253,7 +254,8 @@ class Grid { return getCell(coord); } - /*! Retrieves the x,y,z coordinates of the origin of the cell whose coordinates (i,j,k) is passed as argument + /*! Retrieves the x,y,z coordinates of the origin of the cell whose coordinates (i,j,k) + * is passed as argument: * cell_coord * i,j,k integer coordinates for the cell * orig @@ -265,7 +267,7 @@ class Grid { orig[i] = _orig[i] + cell_coord[i] * _cell_size[i]; } - /*! Retrieves the box corresponding to the cell whose coordinates are passed as argument. + /*! Retrieves the box corresponding to the cell whose coordinates are passed as argument: * cell_coord * i,j,k integer coordinates for the cell * min_out @@ -280,9 +282,8 @@ class Grid { } /*! inserts a convex polygon occluder - * This method is quite coarse insofar as it adds all cells intersecting the polygon bounding box - * convex_poly - * The list of 3D points constituting a convex polygon + * This method is quite coarse insofar as it adds all cells intersecting the polygon bounding + * box convex_poly The list of 3D points constituting a convex polygon */ void insertOccluder(Polygon3r *convex_poly); @@ -301,8 +302,8 @@ class Grid { // Prepares to cast ray without generating OccludersSet void initAcceleratedRay(const Vec3r &orig, const Vec3r &end, unsigned timestamp); - /*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a given direction. - * Returns the list of occluders contained in the cells intersected by this ray + /*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a + * given direction. Returns the list of occluders contained in the cells intersected by this ray * Starts with a call to InitRay. */ void castInfiniteRay(const Vec3r &orig, @@ -313,9 +314,9 @@ class Grid { // Prepares to cast ray without generating OccludersSet. bool initAcceleratedInfiniteRay(const Vec3r &orig, const Vec3r &dir, unsigned timestamp); - /*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a given direction. - * Returns the first intersection (occluder,t,u,v) or null. - * Starts with a call to InitRay. + /*! Casts an infinite ray (still finishing at the end of the grid) from a starting point and in a + * given direction. Returns the first intersection (occluder,t,u,v) or null. Starts with a call + * to InitRay. */ Polygon3r *castRayToFindFirstIntersection( const Vec3r &orig, const Vec3r &dir, double &t, double &u, double &v, unsigned timestamp); @@ -344,7 +345,7 @@ class Grid { return _cell_size; } - //ARB profiling only: + // ARB profiling only: inline OccludersSet *getOccluders() { return &_occluders; @@ -392,12 +393,13 @@ class Grid { Vec3r _ray_dir; // direction vector for the ray Vec3u _current_cell; // The current cell being processed (designated by its 3 coordinates) - Vec3r - _pt; // Points corresponding to the incoming and outgoing intersections of one cell with the ray + Vec3r _pt; // Points corresponding to the incoming and outgoing intersections of one cell with + // the ray real _t_end; // To know when we are at the end of the ray real _t; - //OccludersSet _ray_occluders; // Set storing the occluders contained in the cells traversed by a ray + // OccludersSet _ray_occluders; // Set storing the occluders contained in the cells traversed by + // a ray OccludersSet _occluders; // List of all occluders inserted in the grid #ifdef WITH_CXX_GUARDEDALLOC diff --git a/source/blender/freestyle/intern/geometry/GridHelpers.cpp b/source/blender/freestyle/intern/geometry/GridHelpers.cpp index 1f87bb7b76a..a83dc385758 100644 --- a/source/blender/freestyle/intern/geometry/GridHelpers.cpp +++ b/source/blender/freestyle/intern/geometry/GridHelpers.cpp @@ -26,14 +26,15 @@ namespace Freestyle { void GridHelpers::getDefaultViewProscenium(real viewProscenium[4]) { // Get proscenium boundary for culling - // bufferZone determines the amount by which the area processed should exceed the actual image area. - // This is intended to avoid visible artifacts generated along the proscenium edge. - // Perhaps this is no longer needed now that entire view edges are culled at once, since that theoretically - // should eliminate visible artifacts. - // To the extent it is still useful, bufferZone should be put into the UI as configurable percentage value + // bufferZone determines the amount by which the area processed should exceed the actual image + // area. This is intended to avoid visible artifacts generated along the proscenium edge. Perhaps + // this is no longer needed now that entire view edges are culled at once, since that + // theoretically should eliminate visible artifacts. To the extent it is still useful, bufferZone + // should be put into the UI as configurable percentage value const real bufferZone = 0.05; // borderZone describes a blank border outside the proscenium, but still inside the image area. - // Only intended for exposing possible artifacts along or outside the proscenium edge during debugging. + // Only intended for exposing possible artifacts along or outside the proscenium edge during + // debugging. const real borderZone = 0.0; viewProscenium[0] = g_freestyle.viewport[2] * (borderZone - bufferZone); viewProscenium[1] = g_freestyle.viewport[2] * (1.0f - borderZone + bufferZone); diff --git a/source/blender/freestyle/intern/geometry/GridHelpers.h b/source/blender/freestyle/intern/geometry/GridHelpers.h index 8a7503350a3..3f3c669cb57 100644 --- a/source/blender/freestyle/intern/geometry/GridHelpers.h +++ b/source/blender/freestyle/intern/geometry/GridHelpers.h @@ -126,8 +126,8 @@ class Transform { inline bool insideProscenium(const real proscenium[4], const Polygon3r &polygon) { - // N.B. The bounding box check is redundant for inserting occluders into cells, because the cell selection code - // in insertOccluders has already guaranteed that the bounding boxes will overlap. + // N.B. The bounding box check is redundant for inserting occluders into cells, because the cell + // selection code in insertOccluders has already guaranteed that the bounding boxes will overlap. // First check the viewport edges, since they are the easiest case // Check if the bounding box is entirely outside the proscenium Vec3r bbMin, bbMax; diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h index 81b0fd90d82..36094bf5086 100644 --- a/source/blender/freestyle/intern/geometry/SweepLine.h +++ b/source/blender/freestyle/intern/geometry/SweepLine.h @@ -188,8 +188,8 @@ template<class T, class Point> class Segment { # pragma warning(pop) #endif -/*! defines a binary function that can be overload by the user to specify at each condition the intersection - * between 2 edges must be computed +/*! defines a binary function that can be overload by the user to specify at each condition the + * intersection between 2 edges must be computed */ template<class T1, class T2> struct binary_rule { binary_rule() |