From 41d4a1986548e66a652221e4a68c52900474eeff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 08:24:14 +0200 Subject: ClangFormat: format '#if 0' code in source/ --- source/blender/freestyle/intern/stroke/Curve.cpp | 47 ++++++++++++------------ 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'source/blender/freestyle/intern/stroke/Curve.cpp') diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp index f7309252aaf..a0709b0e2be 100644 --- a/source/blender/freestyle/intern/stroke/Curve.cpp +++ b/source/blender/freestyle/intern/stroke/Curve.cpp @@ -253,12 +253,18 @@ FEdge *CurvePoint::getFEdge(Interface0D &inter) if (G.debug & G_DEBUG_FREESTYLE) { printf("__A 0x%p p (%f, %f)\n", __A, __A->getPoint2D().x(), __A->getPoint2D().y()); printf("__B 0x%p p (%f, %f)\n", __B, __B->getPoint2D().x(), __B->getPoint2D().y()); - printf("iVertexB->A() 0x%p p (%f, %f)\n", iVertexB->A(), iVertexB->A()->getPoint2D().x(), - iVertexB->A()->getPoint2D().y()); - printf("iVertexB->B() 0x%p p (%f, %f)\n", iVertexB->B(), iVertexB->B()->getPoint2D().x(), - iVertexB->B()->getPoint2D().y()); + printf("iVertexB->A() 0x%p p (%f, %f)\n", + iVertexB->A(), + iVertexB->A()->getPoint2D().x(), + iVertexB->A()->getPoint2D().y()); + printf("iVertexB->B() 0x%p p (%f, %f)\n", + iVertexB->B(), + iVertexB->B()->getPoint2D().x(), + iVertexB->B()->getPoint2D().y()); printf("_t2d %f p (%f, %f)\n", _t2d, getPoint2D().x(), getPoint2D().y()); - printf("iVertexB->t2d() %f p (%f, %f)\n", iVertexB->t2d(), iVertexB->getPoint2D().x(), + printf("iVertexB->t2d() %f p (%f, %f)\n", + iVertexB->t2d(), + iVertexB->getPoint2D().x(), iVertexB->getPoint2D().y()); } #endif @@ -315,7 +321,6 @@ float CurvePoint::shape_importance() const return __A->shape_importance(); } - const unsigned CurvePoint::qi() const { if (__A == 0) @@ -404,18 +409,18 @@ real CurvePoint::z_discontinuity() const #if 0 float CurvePoint::local_average_depth() const { - return local_average_depth_function(this); + return local_average_depth_function(this); } float CurvePoint::local_depth_variance() const { - return local_depth_variance_function(this); + return local_depth_variance_function(this); } real CurvePoint::local_average_density(float sigma) const { //return local_average_density(this); - return density_function(this); + return density_function(this); } Vec3r shaded_color() const; @@ -484,7 +489,7 @@ real CurvePoint::curvatureFredo() const return ((1 - _t2d) * __A->curvatureFredo() + _t2d * __B->curvatureFredo()); } -Vec2d CurvePoint::directionFredo () const +Vec2d CurvePoint::directionFredo() const { if (__A == 0) return __B->directionFredo(); @@ -676,10 +681,9 @@ Vec3r Curve::orientation2d(point_iterator it) const return (*it)->orientation2d(); } -template -Vec3r Curve::orientation2d(int iCombination) const +template Vec3r Curve::orientation2d(int iCombination) const { - return edge_orientation2d_function(this, iCombination); + return edge_orientation2d_function(this, iCombination); } Vec3r Curve::orientation3d(point_iterator it) const @@ -689,7 +693,7 @@ Vec3r Curve::orientation3d(point_iterator it) const Vec3r Curve::orientation3d(int iCombination) const { - return edge_orientation3d_function(this, iCombination); + return edge_orientation3d_function(this, iCombination); } real curvature2d(point_iterator it) const @@ -702,7 +706,7 @@ real curvature2d(int iCombination = 0) const; Material Curve::material() const { const_vertex_iterator v = vertices_begin(), vend = vertices_end(); - const Material& mat = (*v)->material(); + const Material &mat = (*v)->material(); for (; v != vend; ++v) { if ((*v)->material() != mat) Exception::raiseException(); @@ -747,7 +751,7 @@ bool Curve::occluders_empty() const return empty; } -const Polygon3r& occludee() const +const Polygon3r &occludee() const { return *(_FEdgeA->aFace()); } @@ -789,7 +793,6 @@ int Curve::shape_id() const return id.first; } - const SShape *Curve::shape() const { const_vertex_iterator v = vertices_begin(), vend = vertices_end(); @@ -801,14 +804,12 @@ const SShape *Curve::shape() const return sshape; } - occluder_container::const_iterator Curve::occluders_begin() const { const_vertex_iterator v = vertices_begin(); return (*v)->occluders_begin(); } - occluder_container::const_iterator Curve::occluders_end() const { const_vertex_iterator v = vertices_end(); @@ -835,7 +836,7 @@ float Curve::local_average_depth(int iCombination) const return local_average_depth_edge_function(this, iCombination); } -float Curve::local_depth_variance(int iCombination ) const +float Curve::local_depth_variance(int iCombination) const { return local_depth_variance_edge_function(this, iCombination); # if 0 @@ -846,7 +847,7 @@ float Curve::local_depth_variance(int iCombination ) const # endif } -real Curve::local_average_density(float sigma, int iCombination ) const +real Curve::local_average_density(float sigma, int iCombination) const { return density_edge_function(this, iCombination); # if 0 @@ -860,7 +861,7 @@ real Curve::local_average_density(float sigma, int iCombination ) const /* UNUSED */ // #define EPS_CURVA_DIR 0.01 -void Curve::computeCurvatureAndOrientation () +void Curve::computeCurvatureAndOrientation() { const_vertex_iterator v = vertices_begin(), vend = vertices_end(), v2, prevV, v0; Vec2d p0, p1, p2; @@ -874,7 +875,7 @@ void Curve::computeCurvatureAndOrientation () p1 = Vec2d(p[0], p[1]); Vec2d prevDir(p1 - p0); - for (; v! = vend; ++v) { + for (; v ! = vend; ++v) { v2 = v; ++v2; if (v2 == vend) -- cgit v1.2.3