Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 09:24:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 09:24:14 +0300
commit41d4a1986548e66a652221e4a68c52900474eeff (patch)
tree26acf937ea0b762977f89adcc4e74a3ec9ecee62 /source/blender/freestyle
parent108045faa01849115c54190ebed788faf36dcb56 (diff)
ClangFormat: format '#if 0' code in source/
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/intern/application/AppCanvas.cpp28
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp34
-rw-r--r--source/blender/freestyle/intern/application/Controller.h22
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp10
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h5
-rw-r--r--source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp5
-rw-r--r--source/blender/freestyle/intern/geometry/GeomCleaner.h2
-rw-r--r--source/blender/freestyle/intern/geometry/Grid.cpp3
-rw-r--r--source/blender/freestyle/intern/geometry/Polygon.h4
-rw-r--r--source/blender/freestyle/intern/geometry/SweepLine.h8
-rw-r--r--source/blender/freestyle/intern/geometry/VecMat.h24
-rw-r--r--source/blender/freestyle/intern/image/ImagePyramid.cpp4
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.cpp2
-rw-r--r--source/blender/freestyle/intern/scene_graph/NodeCamera.h2
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp47
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.h2
-rw-r--r--source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h5
-rw-r--r--source/blender/freestyle/intern/stroke/Operators.cpp18
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp10
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp16
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp27
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.h2
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.cpp14
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.h18
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp3
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.cpp2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.h4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h5
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp22
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.cpp6
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.cpp2
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.h16
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.cpp9
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.h2
36 files changed, 218 insertions, 171 deletions
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp
index 8248266bbf5..ab1da79a77f 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.cpp
+++ b/source/blender/freestyle/intern/application/AppCanvas.cpp
@@ -135,8 +135,18 @@ void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage &oImage) co
float yfac = ((float)recty) / ((float)(ymax - ymin));
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
- printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y,
- xsch, ysch, xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f));
+ printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n",
+ w,
+ h,
+ x,
+ y,
+ xsch,
+ ysch,
+ xmax - xmin,
+ ymax - ymin,
+ rectx,
+ recty,
+ (int)(xfac * 100.0f));
}
#endif
int ii, jj;
@@ -173,8 +183,18 @@ void AppCanvas::readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) c
float yfac = ((float)recty) / ((float)(ymax - ymin));
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
- printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n", w, h, x, y,
- xsch, ysch, xmax - xmin, ymax - ymin, rectx, recty, (int)(xfac * 100.0f));
+ printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n",
+ w,
+ h,
+ x,
+ y,
+ xsch,
+ ysch,
+ xmax - xmin,
+ ymax - ymin,
+ rectx,
+ recty,
+ (int)(xfac * 100.0f));
}
#endif
int ii, jj;
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index e6066123a33..d516b865eab 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -76,8 +76,8 @@ Controller::Controller()
{
const string sep(Config::DIR_SEP.c_str());
#if 0
- const string filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR + sep +
- Config::OPTIONS_CURRENT_DIRS_FILE;
+ const string filename = Config::Path::getInstance()->getHomeDir() + sep + Config::OPTIONS_DIR +
+ sep + Config::OPTIONS_CURRENT_DIRS_FILE;
_current_dirs = new ConfigIO(filename, Config::APPLICATION_NAME + "CurrentDirs", true);
#endif
@@ -337,7 +337,7 @@ int Controller::LoadMesh(Render *re, ViewLayer *view_layer, Depsgraph *depsgraph
}
soc QFileInfo qfi(iFileName);
- soc string basename((const char*)qfi.fileName().toAscii().data());
+ soc string basename((const char *)qfi.fileName().toAscii().data());
char cleaned[FILE_MAX];
BLI_strncpy(cleaned, iFileName, FILE_MAX);
BLI_cleanup_file(NULL, cleaned);
@@ -633,31 +633,31 @@ void Controller::ComputeSteerableViewMap()
// Build 4 nodes containing the edges in the 4 directions
NodeGroup *ng[Canvas::NB_STEERABLE_VIEWMAP];
unsigned i;
- real c = 32.0f/255.0f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32.
+ real c =
+ 32.0f /
+ 255.0f; // see SteerableViewMap::readSteerableViewMapPixel() for information about this 32.
for (i = 0; i < Canvas::NB_STEERABLE_VIEWMAP; ++i) {
ng[i] = new NodeGroup;
}
NodeShape *completeNS = new NodeShape;
- completeNS->material().setDiffuse(c,c,c,1);
- ng[Canvas::NB_STEERABLE_VIEWMAP-1]->AddChild(completeNS);
+ completeNS->material().setDiffuse(c, c, c, 1);
+ ng[Canvas::NB_STEERABLE_VIEWMAP - 1]->AddChild(completeNS);
SteerableViewMap *svm = _Canvas->getSteerableViewMap();
svm->Reset();
- ViewMap::fedges_container& fedges = _ViewMap->FEdges();
+ ViewMap::fedges_container &fedges = _ViewMap->FEdges();
LineRep *fRep;
NodeShape *ns;
- for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end();
- f != fend;
- ++f)
- {
+ for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end(); f != fend;
+ ++f) {
if ((*f)->viewedge()->qi() != 0)
continue;
fRep = new LineRep((*f)->vertexA()->point2d(), (*f)->vertexB()->point2d());
- completeNS->AddRep(fRep); // add to the complete map anyway
+ completeNS->AddRep(fRep); // add to the complete map anyway
double *oweights = svm->AddFEdge(*f);
for (i = 0; i < (Canvas::NB_STEERABLE_VIEWMAP - 1); ++i) {
ns = new NodeShape;
- double wc = oweights[i]*c;
+ double wc = oweights[i] * c;
if (oweights[i] == 0)
continue;
ns->material().setDiffuse(wc, wc, wc, 1);
@@ -713,7 +713,6 @@ void Controller::ComputeSteerableViewMap()
# endif
}
-
svm->buildImagesPyramids(img, false, 0, 1.0f);
#endif
}
@@ -1085,10 +1084,11 @@ void Controller::displayDensityCurves(int x, int y)
// display the curves
#if 0
for (i = 0; i < nbCurves; ++i)
- _pDensityCurvesWindow->setOrientationCurve(i, Vec2d(0, 0), Vec2d(nbPoints, 1), curves[i], "scale", "density");
+ _pDensityCurvesWindow->setOrientationCurve(
+ i, Vec2d(0, 0), Vec2d(nbPoints, 1), curves[i], "scale", "density");
for (i = 1; i <= 8; ++i)
- _pDensityCurvesWindow->setLevelCurve(i, Vec2d(0, 0), Vec2d(nbCurves, 1), curvesDirection[i],
- "orientation", "density");
+ _pDensityCurvesWindow->setLevelCurve(
+ i, Vec2d(0, 0), Vec2d(nbCurves, 1), curvesDirection[i], "orientation", "density");
_pDensityCurvesWindow->show();
#endif
}
diff --git a/source/blender/freestyle/intern/application/Controller.h b/source/blender/freestyle/intern/application/Controller.h
index be8553c73e1..b287a515ba1 100644
--- a/source/blender/freestyle/intern/application/Controller.h
+++ b/source/blender/freestyle/intern/application/Controller.h
@@ -94,10 +94,22 @@ class Controller {
vector<ViewEdge *>::iterator vedges_end);
#if 0
- NodeGroup *debugNode() {return _DebugNode;}
- AppView *view() {return _pView;}
- NodeGroup *debugScene() {return _DebugNode;}
- Grid& grid() {return _Grid;}
+ NodeGroup *debugNode()
+ {
+ return _DebugNode;
+ }
+ AppView *view()
+ {
+ return _pView;
+ }
+ NodeGroup *debugScene()
+ {
+ return _DebugNode;
+ }
+ Grid &grid()
+ {
+ return _Grid;
+ }
#endif
void toggleVisibilityAlgo();
@@ -192,7 +204,7 @@ class Controller {
#if 0
// Silhouette structure:
- std::vector<SShape*> _SShapes;
+ std::vector<SShape *> _SShapes;
NodeGroup *_SRoot;
// Silhouette
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
index 6b14c9ec70f..06a356dd232 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
@@ -77,9 +77,9 @@ NodeGroup *BlenderFileLoader::Load()
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
- cout << "Frustum: l " << _viewplane_left << " r " << _viewplane_right
- << " b " << _viewplane_bottom << " t " << _viewplane_top
- << " n " << _z_near << " f " << _z_far << endl;
+ cout << "Frustum: l " << _viewplane_left << " r " << _viewplane_right << " b "
+ << _viewplane_bottom << " t " << _viewplane_top << " n " << _z_near << " f " << _z_far
+ << endl;
}
#endif
@@ -143,7 +143,9 @@ int BlenderFileLoader::countClippedFaces(float v1[3], float v2[3], float v3[3],
}
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
- printf("%d %s\n", i, (clip[i] == NOT_CLIPPED) ? "not" : (clip[i] == CLIPPED_BY_NEAR) ? "near" : "far");
+ printf("%d %s\n",
+ i,
+ (clip[i] == NOT_CLIPPED) ? "not" : (clip[i] == CLIPPED_BY_NEAR) ? "near" : "far");
}
#endif
sum += clip[i];
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
index 5fe98fba0d0..dc6677bdcf4 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
@@ -98,7 +98,10 @@ class BlenderFileLoader {
#if 0
/*! Gets the smallest edge size read */
- inline real minEdgeSize() {return _minEdgeSize;}
+ inline real minEdgeSize()
+ {
+ return _minEdgeSize;
+ }
#endif
/*! Modifiers */
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
index 47e2fef33e3..082ed34c353 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
@@ -190,7 +190,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer()
char *name = ob->id.name;
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
- cout << "removing " << name[0] << name[1] << ":" << (name+2) << endl;
+ cout << "removing " << name[0] << name[1] << ":" << (name + 2) << endl;
}
#endif
switch (ob->type) {
@@ -598,7 +598,8 @@ int BlenderStrokeRenderer::get_stroke_count() const
void BlenderStrokeRenderer::GenerateStrokeMesh(StrokeGroup *group, bool hasTex)
{
#if 0
- Object *object_mesh = BKE_object_add(freestyle_bmain, freestyle_scene, (ViewLayer *)freestyle_scene->view_layers.first, OB_MESH);
+ Object *object_mesh = BKE_object_add(
+ freestyle_bmain, freestyle_scene, (ViewLayer *)freestyle_scene->view_layers.first, OB_MESH);
DEG_relations_tag_update(freestyle_bmain);
#else
Object *object_mesh = NewMesh();
diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.h b/source/blender/freestyle/intern/geometry/GeomCleaner.h
index b34828f87a9..5fedf94b479 100644
--- a/source/blender/freestyle/intern/geometry/GeomCleaner.h
+++ b/source/blender/freestyle/intern/geometry/GeomCleaner.h
@@ -240,7 +240,7 @@ class IndexedVertex {
};
#if 0
-bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2)
+bool operator<(const IndexedVertex &iv1, const IndexedVertex &iv2)
{
return iv1.operator<(iv2);
}
diff --git a/source/blender/freestyle/intern/geometry/Grid.cpp b/source/blender/freestyle/intern/geometry/Grid.cpp
index 6a95e540c79..51afb5c1a45 100644
--- a/source/blender/freestyle/intern/geometry/Grid.cpp
+++ b/source/blender/freestyle/intern/geometry/Grid.cpp
@@ -63,7 +63,8 @@ void firstIntersectionGridVisitor::examineOccluder(Polygon3r *occ)
current_cell_->getOrigin() + cell_size_)) {
#if 0
Vec3d bboxdiag(_scene3d->bbox().getMax() - _scene3d->bbox().getMin());
- if ((t > 1.0e-06 * (min(min(bboxdiag.x(), bboxdiag.y()), bboxdiag.z()))) && (t < raylength)) {
+ if ((t > 1.0e-06 * (min(min(bboxdiag.x(), bboxdiag.y()), bboxdiag.z()))) &&
+ (t < raylength)) {
#else
if (tmp_t < t_) {
#endif
diff --git a/source/blender/freestyle/intern/geometry/Polygon.h b/source/blender/freestyle/intern/geometry/Polygon.h
index ad8a947d21d..739f880443c 100644
--- a/source/blender/freestyle/intern/geometry/Polygon.h
+++ b/source/blender/freestyle/intern/geometry/Polygon.h
@@ -211,8 +211,8 @@ class Polygon3r : public Polygon<Vec3r> {
real epsilon = M_EPSILON) const
{
#if 0
- if (_vertices.size() < 3)
- return false;
+ if (_vertices.size() < 3)
+ return false;
#endif
return GeomUtils::intersectRayTriangle(
orig, dir, _vertices[0], _vertices[1], _vertices[2], t, u, v, epsilon);
diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h
index 04797bc8998..81b0fd90d82 100644
--- a/source/blender/freestyle/intern/geometry/SweepLine.h
+++ b/source/blender/freestyle/intern/geometry/SweepLine.h
@@ -226,8 +226,8 @@ template<class T, class Point> class SweepLine {
inline void process(Point &p,
vector<Segment<T, Point> *> &segments,
#if 0
- binary_rule<Segment<T, Point>,Segment<T, Point> >& binrule = \
- binary_rule<Segment<T, Point>, Segment<T, Point> >(),
+ binary_rule<Segment<T, Point>, Segment<T, Point>> &binrule =
+ binary_rule<Segment<T, Point>, Segment<T, Point>>(),
#else
binary_rule<Segment<T, Point>, Segment<T, Point>> &binrule,
#endif
@@ -249,8 +249,8 @@ template<class T, class Point> class SweepLine {
inline void add(Segment<T, Point> *S,
#if 0
- binary_rule<Segment<T, Point>, Segment<T, Point> >& binrule = \
- binary_rule<Segment<T, Point>, Segment<T, Point> >(),
+ binary_rule<Segment<T, Point>, Segment<T, Point>> &binrule =
+ binary_rule<Segment<T, Point>, Segment<T, Point>>(),
#else
binary_rule<Segment<T, Point>, Segment<T, Point>> &binrule,
#endif
diff --git a/source/blender/freestyle/intern/geometry/VecMat.h b/source/blender/freestyle/intern/geometry/VecMat.h
index 22fcd3aef41..b9cf604fed7 100644
--- a/source/blender/freestyle/intern/geometry/VecMat.h
+++ b/source/blender/freestyle/intern/geometry/VecMat.h
@@ -796,24 +796,22 @@ template<class T, unsigned N> class SquareMatrix : public Matrix<T, N, N> {
/////////////////////////////////////////////////////////////////////////////
#if 0
-template <class T, unsigned N>
-inline Vec<T, N> operator+(const Vec<T, N>& v1, const Vec<T, N>& v2)
+template<class T, unsigned N> inline Vec<T, N> operator+(const Vec<T, N> &v1, const Vec<T, N> &v2)
{
Vec<T, N> res(v1);
res += v2;
return res;
}
-template <class T, unsigned N>
-inline Vec<T, N> operator-(const Vec<T, N>& v1, const Vec<T, N>& v2)
+template<class T, unsigned N> inline Vec<T, N> operator-(const Vec<T, N> &v1, const Vec<T, N> &v2)
{
Vec<T, N> res(v1);
res -= v2;
return res;
}
-template <class T, unsigned N>
-inline Vec<T, N> operator*(const Vec<T, N>& v, const typename Vec<T, N>::value_type r)
+template<class T, unsigned N>
+inline Vec<T, N> operator*(const Vec<T, N> &v, const typename Vec<T, N>::value_type r)
{
Vec<T, N> res(v);
res *= r;
@@ -830,8 +828,8 @@ inline Vec<T, N> operator*(const typename Vec<T, N>::value_type r, const Vec<T,
}
#if 0
-template <class T, unsigned N>
-inline Vec<T, N> operator/(const Vec<T, N>& v, const typename Vec<T, N>::value_type r)
+template<class T, unsigned N>
+inline Vec<T, N> operator/(const Vec<T, N> &v, const typename Vec<T, N>::value_type r)
{
Vec<T, N> res(v);
if (r)
@@ -840,8 +838,8 @@ inline Vec<T, N> operator/(const Vec<T, N>& v, const typename Vec<T, N>::value_t
}
// dot product
-template <class T, unsigned N>
-inline typename Vec<T, N>::value_type operator*(const Vec<T, N>& v1, const Vec<T, N>& v2)
+template<class T, unsigned N>
+inline typename Vec<T, N>::value_type operator*(const Vec<T, N> &v1, const Vec<T, N> &v2)
{
typename Vec<T, N>::value_type sum = 0;
for (unsigned int i = 0; i < N; i++)
@@ -850,10 +848,10 @@ inline typename Vec<T, N>::value_type operator*(const Vec<T, N>& v1, const Vec<T
}
// cross product for 3D Vectors
-template <typename T>
-inline Vec3<T> operator^(const Vec<T, 3>& v1, const Vec<T, 3>& v2)
+template<typename T> inline Vec3<T> operator^(const Vec<T, 3> &v1, const Vec<T, 3> &v2)
{
- Vec3<T> res(v1[1] * v2[2] - v1[2] * v2[1], v1[2] * v2[0] - v1[0] * v2[2], v1[0] * v2[1] - v1[1] * v2[0]);
+ Vec3<T> res(
+ v1[1] * v2[2] - v1[2] * v2[1], v1[2] * v2[0] - v1[0] * v2[2], v1[0] * v2[1] - v1[1] * v2[0]);
return res;
}
#endif
diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp
index caf469328b5..12d322d7472 100644
--- a/source/blender/freestyle/intern/image/ImagePyramid.cpp
+++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp
@@ -30,9 +30,9 @@ using namespace std;
namespace Freestyle {
#if 0
-ImagePyramid::ImagePyramid(const GrayImage& level0, unsigned nbLevels)
+ImagePyramid::ImagePyramid(const GrayImage &level0, unsigned nbLevels)
{
- BuildPyramid(level0,nbLevels);
+ BuildPyramid(level0, nbLevels);
}
#endif
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
index 30d05ee571c..ae87b77aee7 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
@@ -48,7 +48,7 @@ NodeCamera::NodeCamera(CameraType camera_type) : camera_type_(camera_type)
}
#if 0 /* UNUSED, gives warning in gcc */
-NodeCamera::NodeCamera(const NodeCamera& iBrother) : camera_type_(iBrother.camera_type_)
+NodeCamera::NodeCamera(const NodeCamera &iBrother) : camera_type_(iBrother.camera_type_)
{
memcpy(modelview_matrix_, iBrother.modelview_matrix_, 16 * sizeof(double));
memcpy(projection_matrix_, iBrother.projection_matrix_, 16 * sizeof(double));
diff --git a/source/blender/freestyle/intern/scene_graph/NodeCamera.h b/source/blender/freestyle/intern/scene_graph/NodeCamera.h
index c3c93fa1f88..2878e7a834e 100644
--- a/source/blender/freestyle/intern/scene_graph/NodeCamera.h
+++ b/source/blender/freestyle/intern/scene_graph/NodeCamera.h
@@ -47,7 +47,7 @@ class NodeCamera : public Node {
/*! Default matrices: Identity for both projection and modelview. */
NodeCamera(CameraType camera_type = GENERIC);
#if 0 /* UNUSED, gives warning in gcc */
- NodeCamera(const NodeCamera& iBrother);
+ NodeCamera(const NodeCamera &iBrother);
#endif
virtual ~NodeCamera()
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<CurvePoint >(this);
+ return local_average_depth_function<CurvePoint>(this);
}
float CurvePoint::local_depth_variance() const
{
- return local_depth_variance_function<CurvePoint >(this);
+ return local_depth_variance_function<CurvePoint>(this);
}
real CurvePoint::local_average_density(float sigma) const
{
//return local_average_density<CurvePoint >(this);
- return density_function<CurvePoint >(this);
+ return density_function<CurvePoint>(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 <class BaseVertex>
-Vec3r Curve::orientation2d(int iCombination) const
+template<class BaseVertex> Vec3r Curve::orientation2d(int iCombination) const
{
- return edge_orientation2d_function<Curve >(this, iCombination);
+ return edge_orientation2d_function<Curve>(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<Curve >(this, iCombination);
+ return edge_orientation3d_function<Curve>(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<Curve>(this, iCombination);
}
-float Curve::local_depth_variance(int iCombination ) const
+float Curve::local_depth_variance(int iCombination) const
{
return local_depth_variance_edge_function<Curve>(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<Curve>(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)
diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h
index 234f9df0e48..2a1d80f3029 100644
--- a/source/blender/freestyle/intern/stroke/Curve.h
+++ b/source/blender/freestyle/intern/stroke/Curve.h
@@ -525,7 +525,7 @@ class Curve : public Interface1D {
int occluders_size() const;
bool occluders_empty() const;
- const Polygon3r& occludee() const
+ const Polygon3r &occludee() const
{
return *(_FEdgeA->aFace());
}
diff --git a/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h b/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
index 3cd55facd15..f993c21ddb6 100644
--- a/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
+++ b/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
@@ -66,7 +66,7 @@ class __point_iterator : public IteratorBase<Traits, BidirectionalIteratorTag_Tr
typedef __point_iterator<CurvePoint_const_traits> const_iterator;
#if 0
- typedef Vertex vertex_type ;
+ typedef Vertex vertex_type;
typedef vertex_container_iterator vertex_iterator_type;
typedef CurvePoint<Vertex> Point;
typedef Point point_type;
@@ -76,7 +76,8 @@ class __point_iterator : public IteratorBase<Traits, BidirectionalIteratorTag_Tr
# if defined(__GNUC__) && (__GNUC__ < 3)
typedef bidirectional_iterator<CurvePoint<Vertex>, ptrdiff_t> bidirectional_point_iterator;
# else
- typedef iterator<bidirectional_iterator_tag, CurvePoint<Vertex>, ptrdiff_t> bidirectional_point_iterator;
+ typedef iterator<bidirectional_iterator_tag, CurvePoint<Vertex>, ptrdiff_t>
+ bidirectional_point_iterator;
# endif
#endif
friend class Curve;
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index 2c8a83e2518..fc4d099061c 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -206,7 +206,9 @@ error:
}
#if 0
-void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred, UnaryFunction1D_void& modifier)
+void Operators::bidirectionalChain(ViewEdgeIterator &it,
+ UnaryPredicate1D &pred,
+ UnaryFunction1D_void &modifier)
{
if (_current_view_edges_set.empty())
return;
@@ -217,12 +219,11 @@ void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred,
for (I1DContainer::iterator it_edge = _current_view_edges_set.begin();
it_edge != _current_view_edges_set.end();
- ++it_edge)
- {
+ ++it_edge) {
if (pred(**it_edge))
continue;
- edge = dynamic_cast<ViewEdge*>(*it_edge);
+ edge = dynamic_cast<ViewEdge *>(*it_edge);
it.setBegin(edge);
it.setCurrentEdge(edge);
@@ -253,7 +254,7 @@ void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred,
_current_set = &_current_chains_set;
}
-void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred)
+void Operators::bidirectionalChain(ViewEdgeIterator &it, UnaryPredicate1D &pred)
{
if (_current_view_edges_set.empty())
return;
@@ -267,12 +268,11 @@ void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred)
for (I1DContainer::iterator it_edge = _current_view_edges_set.begin();
it_edge != _current_view_edges_set.end();
- ++it_edge)
- {
+ ++it_edge) {
if (pred(**it_edge) || pred_ts(**it_edge))
continue;
- edge = dynamic_cast<ViewEdge*>(*it_edge);
+ edge = dynamic_cast<ViewEdge *>(*it_edge);
it.setBegin(edge);
it.setCurrentEdge(edge);
@@ -835,7 +835,7 @@ static int __recursiveSplit(Chain *_curve,
CurveInternal::CurvePointIterator split = second;
Interface0DIterator it0d = it.castToInterface0DIterator();
#if 0
- real _min = func(it0d);
+ real _min = func(it0d);
++it;
#endif
real _min = FLT_MAX;
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index 7b6e53138bb..ef40865ecf1 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -834,7 +834,6 @@ Stroke::vertex_container::reverse_iterator Stroke::vertices_last(float sampling)
return _Vertices.rbegin();
}
-
inline Vec3r shaded_color(int iCombination = 0) const;
inline Vec<3, real> Stroke::orientation2d(const_vertex_iterator it) const
@@ -871,7 +870,7 @@ Material Stroke::material() const
int Stroke::qi() const
{
const_vertex_iterator v = vertices_begin(), vend = vertices_end();
- int qi_= (*v)->qi();
+ int qi_ = (*v)->qi();
for (; v != vend; ++v) {
if ((*v)->qi() != qi_)
Exception::raiseException();
@@ -965,10 +964,9 @@ float Stroke::shape_importance(int iCombination) const
return shape_importance_edge_function<Stroke>(*this, iCombination);
}
-
-float Stroke::local_average_depth(int iCombination ) const
+float Stroke::local_average_depth(int iCombination) const
{
- return local_average_depth_edge_function<Stroke >(*this, iCombination);
+ return local_average_depth_edge_function<Stroke>(*this, iCombination);
}
float Stroke::local_depth_variance(int iCombination) const
@@ -976,7 +974,7 @@ float Stroke::local_depth_variance(int iCombination) const
return local_depth_variance_edge_function<Stroke>(*this, iCombination);
}
-real Stroke::local_average_density(float sigma , int iCombination ) const
+real Stroke::local_average_density(float sigma, int iCombination) const
{
return density_edge_function<Stroke>(*this, iCombination);
}
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 026a7b2fc8f..f1483e80083 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -105,7 +105,7 @@ static bool notValid(Vec2r p)
}
#if 0
-static real crossP(const Vec2r& A, const Vec2r& B)
+static real crossP(const Vec2r &A, const Vec2r &B)
{
return A[0] * B[1] - A[1] * B[0];
}
@@ -498,8 +498,8 @@ void Strip::setVertexColor(const vector<StrokeVertex *> &iStrokeVertices)
_vertices[i]->setAlpha(sv->attribute().getAlpha());
i++;
#if 0
- cerr << "col=("<<sv->attribute().getColor()[0] << ", "
- << sv->attribute().getColor()[1] << ", " << sv->attribute().getColor()[2] << ")" << endl;
+ cerr << "col=(" << sv->attribute().getColor()[0] << ", " << sv->attribute().getColor()[1]
+ << ", " << sv->attribute().getColor()[2] << ")" << endl;
#endif
}
}
@@ -545,8 +545,8 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
fact = (float(tiles) + 0.5) / l;
#if 0
- cerr << "l=" << l << " tiles=" << tiles << " _averageThicnkess="
- << _averageThickness << " strokeLength=" << (*v)->strokeLength() << endl;
+ cerr << "l=" << l << " tiles=" << tiles << " _averageThicnkess=" << _averageThickness
+ << " strokeLength=" << (*v)->strokeLength() << endl;
#endif
vector<StrokeVertexRep *>::iterator currentSV = _vertices.begin();
@@ -690,7 +690,7 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
for (i = 0; i < _sizeStrip; i++)
cerr << "(" << _texCoord[i][0] << ", " << _texCoord[i][1] << ") ";
- cerr << endl;
+ cerr << endl;
Vec2r vec_tmp;
for (i = 0; i < _sizeStrip / 2; i++)
@@ -718,7 +718,7 @@ StrokeRep::StrokeRep()
if (ptm)
_textureId = ptm->getDefaultTextureId();
#if 0
- _averageTextureAlpha = 0.5; //default value
+ _averageTextureAlpha = 0.5; //default value
if (_strokeType == OIL_STROKE)
_averageTextureAlpha = 0.75;
if (_strokeType >= NO_BLEND_STROKE)
@@ -749,7 +749,7 @@ StrokeRep::StrokeRep(Stroke *iStroke)
}
#if 0
- _averageTextureAlpha = 0.5; //default value
+ _averageTextureAlpha = 0.5; //default value
if (_strokeType == OIL_STROKE)
_averageTextureAlpha = 0.75;
if (_strokeType >= NO_BLEND_STROKE)
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
index bb2b95be84e..1de4a87886c 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
@@ -425,8 +425,7 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
if (flayer->nPosDotP() != numVertices) {
if ((fabs(flayer->dotP(0)) < threshold) && (fabs(flayer->dotP(1)) < threshold) &&
- (fabs(flayer->dotP(2)) < threshold))
- {
+ (fabs(flayer->dotP(2)) < threshold)) {
flayer->ReplaceDotP(0, 0);
flayer->ReplaceDotP(1, 0);
flayer->ReplaceDotP(2, 0);
@@ -443,7 +442,7 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
WVertex *v;
Vec3r v1v2;
real t;
- vector<WXFaceLayer*> SmoothLayers;
+ vector<WXFaceLayer *> SmoothLayers;
WXFaceLayer *faceLayer;
Face_Curvature_Info *layer_info;
real K1_a(0), K1_b(0);
@@ -451,7 +450,7 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
// find the ridge layer of the face
iFace->retrieveSmoothLayers(Nature::RIDGE, SmoothLayers);
- if ( SmoothLayers.size()!=1 )
+ if (SmoothLayers.size() != 1)
return;
faceLayer = SmoothLayers[0];
// retrieve the curvature info of this layer
@@ -461,27 +460,28 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
for (int i = 0; i < numVertices; i++) {
v = iFace->GetVertex(i);
// vec_curvature_info[i] contains the curvature info of this vertex
- Vec3r e2 = layer_info->vec_curvature_info[i]->K2*layer_info->vec_curvature_info[i]->e2;
- Vec3r e1 = layer_info->vec_curvature_info[i]->K1*layer_info->vec_curvature_info[i]->e1;
+ Vec3r e2 = layer_info->vec_curvature_info[i]->K2 * layer_info->vec_curvature_info[i]->e2;
+ Vec3r e1 = layer_info->vec_curvature_info[i]->K1 * layer_info->vec_curvature_info[i]->e1;
e2.normalize();
WVertex::face_iterator fit = v->faces_begin();
WVertex::face_iterator fitend = v->faces_end();
for (; fit != fitend; ++fit) {
- WXFace *wxf = dynamic_cast<WXFace*>(*fit);
+ WXFace *wxf = dynamic_cast<WXFace *>(*fit);
WOEdge *oppositeEdge;
if (!(wxf->getOppositeEdge(v, oppositeEdge)))
continue;
v1v2 = oppositeEdge->GetbVertex()->GetVertex() - oppositeEdge->GetaVertex()->GetVertex();
GeomUtils::intersection_test res;
- res = GeomUtils::intersectRayPlane(oppositeEdge->GetaVertex()->GetVertex(), v1v2, e2, -(v->GetVertex()*e2),
- t, 1.0e-06);
+ res = GeomUtils::intersectRayPlane(
+ oppositeEdge->GetaVertex()->GetVertex(), v1v2, e2, -(v->GetVertex() * e2), t, 1.0e-06);
if ((res == GeomUtils::DO_INTERSECT) && (t >= 0.0) && (t <= 1.0)) {
- vector<WXFaceLayer*> second_ridge_layer;
+ vector<WXFaceLayer *> second_ridge_layer;
wxf->retrieveSmoothLayers(Nature::RIDGE, second_ridge_layer);
if (second_ridge_layer.size() != 1)
continue;
- Face_Curvature_Info *second_layer_info = (Face_Curvature_Info*)second_ridge_layer[0]->userdata;
+ Face_Curvature_Info *second_layer_info =
+ (Face_Curvature_Info *)second_ridge_layer[0]->userdata;
unsigned index1 = wxf->GetIndex(oppositeEdge->GetaVertex());
unsigned index2 = wxf->GetIndex(oppositeEdge->GetbVertex());
@@ -566,10 +566,9 @@ void FEdgeXDetector::ProcessSuggestiveContourFace(WXFace *iFace)
#if 0 // FIXME: find a more clever way to compute the threshold
real threshold = _meanKr;
- if (faceLayer->nPosDotP()!=numVertices) {
+ if (faceLayer->nPosDotP() != numVertices) {
if ((fabs(faceLayer->dotP(0)) < threshold) && (fabs(faceLayer->dotP(1)) < threshold) &&
- (fabs(faceLayer->dotP(2)) < threshold))
- {
+ (fabs(faceLayer->dotP(2)) < threshold)) {
faceLayer->ReplaceDotP(0, 0);
faceLayer->ReplaceDotP(1, 0);
faceLayer->ReplaceDotP(2, 0);
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
index 61e0c9267a1..fafc391aa8f 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
@@ -209,7 +209,7 @@ class FEdgeXDetector {
protected:
Vec3f _Viewpoint;
#if 0
- real _bbox_diagonal; // diagonal of the current processed shape bbox
+ real _bbox_diagonal; // diagonal of the current processed shape bbox
#endif
//oldtmp values
bool _computeViewIndependent;
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.cpp b/source/blender/freestyle/intern/view_map/Silhouette.cpp
index 73bf38107cd..af97efa1406 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.cpp
+++ b/source/blender/freestyle/intern/view_map/Silhouette.cpp
@@ -294,7 +294,7 @@ real FEdge::z_discontinuity() const
#if 0
real result;
z_discontinuity_functor<SVertex> _functor;
- Evaluate<SVertex, z_discontinuity_functor<SVertex> >(&_functor, iCombination, result);
+ Evaluate<SVertex, z_discontinuity_functor<SVertex>>(&_functor, iCombination, result);
#endif
Vec3r middle((_VertexB->point3d() - _VertexA->point3d()));
middle /= 2;
@@ -306,7 +306,7 @@ real FEdge::z_discontinuity() const
}
#if 0
-float FEdge::local_average_depth(int iCombination ) const
+float FEdge::local_average_depth(int iCombination) const
{
float result;
local_average_depth_functor<SVertex> functor;
@@ -315,7 +315,7 @@ float FEdge::local_average_depth(int iCombination ) const
return result;
}
-float FEdge::local_depth_variance(int iCombination ) const
+float FEdge::local_depth_variance(int iCombination) const
{
float result;
@@ -326,7 +326,7 @@ float FEdge::local_depth_variance(int iCombination ) const
return result;
}
-real FEdge::local_average_density( float sigma, int iCombination) const
+real FEdge::local_average_density(float sigma, int iCombination) const
{
float result;
@@ -337,7 +337,7 @@ real FEdge::local_average_density( float sigma, int iCombination) const
return result;
}
-Vec3r FEdge::normal(int& oException /* = Exception::NO_EXCEPTION */)
+Vec3r FEdge::normal(int &oException /* = Exception::NO_EXCEPTION */)
{
Vec3r Na = _VertexA->normal(oException);
if (oException != Exception::NO_EXCEPTION)
@@ -352,7 +352,7 @@ Vec3r FEdge::curvature2d_as_vector(int iCombination) const
{
Vec3r result;
curvature2d_as_vector_functor<SVertex> _functor;
- Evaluate<Vec3r, curvature2d_as_vector_functor<SVertex> >(&_functor, iCombination, result);
+ Evaluate<Vec3r, curvature2d_as_vector_functor<SVertex>>(&_functor, iCombination, result);
return result;
}
@@ -360,7 +360,7 @@ real FEdge::curvature2d_as_angle(int iCombination) const
{
real result;
curvature2d_as_angle_functor<SVertex> _functor;
- Evaluate<real, curvature2d_as_angle_functor<SVertex> >(&_functor, iCombination, result);
+ Evaluate<real, curvature2d_as_angle_functor<SVertex>>(&_functor, iCombination, result);
return result;
}
#endif
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index 510aedf6cbf..b9f84e7077f 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -333,12 +333,12 @@ class SVertex : public Interface0D {
_directionFredo = d;
}
- real curvatureFredo ()
+ real curvatureFredo()
{
return _curvatureFredo;
}
- const Vec2r directionFredo ()
+ const Vec2r directionFredo()
{
return _directionFredo;
}
@@ -657,7 +657,7 @@ class FEdge : public Interface1D {
int invisibility() const;
#if 0
- inline const vector<Polygon3r>& occluders() const
+ inline const vector<Polygon3r> &occluders() const
{
return _Occluders;
}
@@ -765,7 +765,7 @@ class FEdge : public Interface1D {
}
#if 0
- inline void AddOccluder(Polygon3r& iPolygon)
+ inline void AddOccluder(Polygon3r &iPolygon)
{
_Occluders.push_back(iPolygon);
}
@@ -783,12 +783,12 @@ class FEdge : public Interface1D {
_hasVisibilityPoint = iBool;
}
- inline void setVisibilityPointA(const Vec3r& iPoint)
+ inline void setVisibilityPointA(const Vec3r &iPoint)
{
_VisibilityPointA = iPoint;
}
- inline void setVisibilityPointB(const Vec3r& iPoint)
+ inline void setVisibilityPointB(const Vec3r &iPoint)
{
_VisibilityPointB = iPoint;
}
@@ -891,7 +891,7 @@ class FEdge : public Interface1D {
const SShape *occluded_shape() const;
#if 0
- inline const bool occludee_empty() const
+ inline const bool occludee_empty() const
{
return _occludeeEmpty;
}
@@ -904,7 +904,9 @@ class FEdge : public Interface1D {
inline float local_average_depth(int iCombination = 0) const;
inline float local_depth_variance(int iCombination = 0) const;
inline real local_average_density(float sigma = 2.3f, int iCombination = 0) const;
- inline Vec3r shaded_color(int iCombination = 0) const {}
+ inline Vec3r shaded_color(int iCombination = 0) const
+ {
+ }
#endif
int viewedge_nature() const;
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
index 7d105a662b8..eeec347efc6 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
@@ -262,7 +262,8 @@ real SilhouetteGeomEngine::ImageToWorldParameter(FEdge *fe, real t)
}
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
- cout << "SilhouetteGeomEngine::ImageToWorldParameter(): #iters = " << i << ", dist = " << dist << "\n";
+ cout << "SilhouetteGeomEngine::ImageToWorldParameter(): #iters = " << i
+ << ", dist = " << dist << "\n";
}
#endif
if (i == max_iters && G.debug & G_DEBUG_FREESTYLE) {
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
index 94541b2c312..d9258a05ebd 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
@@ -279,7 +279,7 @@ void SteerableViewMap::saveSteerableViewMap() const
GrayImage *img = _imagesPyramids[i]->getLevel(j);
int ow = img->width();
int oh = img->height();
- float coeff = 1.0f; // 100 * 255; // * pow(2, j);
+ float coeff = 1.0f; // 100 * 255; // * pow(2, j);
QImage qtmp(ow, oh, 32);
for (unsigned int y = 0; y < oh; ++y) {
for (unsigned int x = 0; x < ow; ++x) {
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index 8896918e60d..629ec3d5d77 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -229,7 +229,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
while (!stopSharpViewEdge(currentWEdge.e)) {
edgesChain.push_back(currentWEdge);
++size;
- currentWEdge.e->userdata = (void *)1; // processed
+ currentWEdge.e->userdata = (void *)1; // processed
// Find the next edge!
currentWEdge = FindNextWEdge(currentWEdge);
}
@@ -239,7 +239,7 @@ ViewEdge *ViewEdgeXBuilder::BuildSharpViewEdge(const OWXEdge &iWEdge)
while (!stopSharpViewEdge(currentWEdge.e)) {
edgesChain.push_front(currentWEdge);
++size;
- currentWEdge.e->userdata = (void *)1; // processed
+ currentWEdge.e->userdata = (void *)1; // processed
// Find the previous edge!
currentWEdge = FindPreviousWEdge(currentWEdge);
}
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index 7c72e44fc10..d859f83079c 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -271,7 +271,7 @@ ViewVertex *ViewMap::InsertViewVertex(SVertex *iVertex, vector<ViewEdge *> &newV
}
#if 0
-FEdge *ViewMap::Connect(FEdge *ioEdge, SVertex *ioVertex, vector<ViewEdge*>& oNewVEdges)
+FEdge *ViewMap::Connect(FEdge *ioEdge, SVertex *ioVertex, vector<ViewEdge *> &oNewVEdges)
{
SShape *sshape = ioEdge->shape();
FEdge *newFEdge = sshape->SplitEdgeIn2(ioEdge, ioVertex);
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index b25e13d990f..96c9c3c0b4a 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -1761,7 +1761,7 @@ inline Vec3r ViewEdge::orientation2d(int iCombination) const
return edge_orientation2d_function<ViewEdge>(*this, iCombination);
}
-inline Vec3r ViewEdge::orientation3d(int iCombination) const
+inline Vec3r ViewEdge::orientation3d(int iCombination) const
{
return edge_orientation3d_function<ViewEdge>(*this, iCombination);
}
@@ -1771,7 +1771,7 @@ inline real ViewEdge::z_discontinuity(int iCombination) const
return z_discontinuity_edge_function<ViewEdge>(*this, iCombination);
}
-inline float ViewEdge::local_average_depth(int iCombination ) const
+inline float ViewEdge::local_average_depth(int iCombination) const
{
return local_average_depth_edge_function<ViewEdge>(*this, iCombination);
}
diff --git a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
index 2c09bde487b..6af70120832 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
@@ -168,8 +168,9 @@ class edge_iterator_base : public IteratorBase<Traits, InputIteratorTag_Traits>
//protected://FIXME
public:
#if 0
- inline edge_iterator_base(value_type ifeA, value_type ifeB, value_type ibeA, value_type ibeB, value_type iter)
- : parent_class()
+ inline edge_iterator_base(
+ value_type ifeA, value_type ifeB, value_type ibeA, value_type ibeB, value_type iter)
+ : parent_class()
{
_Nature = Nature::T_VERTEX;
_feA = ifeA;
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index ed0f5c9b0bd..44d840c2cc5 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -1431,7 +1431,7 @@ void ViewMapBuilder::ComputeEdgesVisibility(ViewMap *ioViewMap,
real epsilon)
{
#if 0
- iAlgo = ray_casting; // for testing algorithms equivalence
+ iAlgo = ray_casting; // for testing algorithms equivalence
#endif
switch (iAlgo) {
case ray_casting:
@@ -1780,7 +1780,7 @@ void ViewMapBuilder::ComputeFastRayCastingVisibility(ViewMap *ioViewMap, real ep
++p;
#if 0
for (; p != pend; ++p) {
- WFace *f = (WFace*)((*p)->userdata);
+ WFace *f = (WFace *)((*p)->userdata);
ViewShape *vs = ioViewMap->viewShape(f->GetVertex(0)->shape()->GetId());
if (vs != vshape) {
sameShape = false;
@@ -2030,9 +2030,9 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe,
Vec3r B(fe->vertexB()->point2d());
int viewport[4];
SilhouetteGeomEngine::retrieveViewport(viewport);
- if ((A.x() < viewport[0]) || (A.x() > viewport[2]) || (A.y() < viewport[1]) || (A.y() > viewport[3]) ||
- (B.x() < viewport[0]) || (B.x() > viewport[2]) || (B.y() < viewport[1]) || (B.y() > viewport[3]))
- {
+ if ((A.x() < viewport[0]) || (A.x() > viewport[2]) || (A.y() < viewport[1]) ||
+ (A.y() > viewport[3]) || (B.x() < viewport[0]) || (B.x() > viewport[2]) ||
+ (B.y() < viewport[1]) || (B.y() > viewport[3])) {
cerr << "Warning: point is out of the grid for fedge " << fe->getId() << endl;
//return 0;
}
@@ -2206,10 +2206,10 @@ void ViewMapBuilder::ComputeIntersections(ViewMap *ioViewMap,
}
#if 0
if (_global.debug & G_DEBUG_FREESTYLE) {
- ViewMap::viewvertices_container& vvertices = ioViewMap->ViewVertices();
+ ViewMap::viewvertices_container &vvertices = ioViewMap->ViewVertices();
for (ViewMap::viewvertices_container::iterator vv = vvertices.begin(), vvend = vvertices.end();
- vv != vvend; ++vv)
- {
+ vv != vvend;
+ ++vv) {
if ((*vv)->getNature() == Nature::T_VERTEX) {
TVertex *tvertex = (TVertex *)(*vv);
cout << "TVertex " << tvertex->getId() << " has :" << endl;
@@ -2295,8 +2295,10 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
unsigned fEdgesSize = ioViewMap->FEdges().size();
#if 0
if (_global.debug & G_DEBUG_FREESTYLE) {
- ViewMap::fedges_container& fedges = ioViewMap->FEdges();
- for (ViewMap::fedges_container::const_iterator f = fedges.begin(), end = fedges.end(); f != end; ++f) {
+ ViewMap::fedges_container &fedges = ioViewMap->FEdges();
+ for (ViewMap::fedges_container::const_iterator f = fedges.begin(), end = fedges.end();
+ f != end;
+ ++f) {
cout << (*f)->aMaterialIndex() << "-" << (*f)->bMaterialIndex() << endl;
}
}
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
index b42c3f9b0e6..ada1b20780a 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
@@ -144,7 +144,7 @@ bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh)
WOEdge *e = (*itE)->getPrevOnFace();
#if 0
if ((e->GetaVertex() == v) || (e->GetbVertex() == v))
- cerr<< "BUG ";
+ cerr << "BUG ";
#endif
WVertex *v1 = e->GetaVertex();
WVertex *v2 = e->GetbVertex();
@@ -534,8 +534,8 @@ namespace OGF {
#if 0
inline static real angle(WOEdge *h)
{
- const Vec3r& n1 = h->GetbFace()->GetNormal();
- const Vec3r& n2 = h->GetaFace()->GetNormal();
+ const Vec3r &n1 = h->GetbFace()->GetNormal();
+ const Vec3r &n2 = h->GetaFace()->GetNormal();
const Vec3r v = h->GetVec();
real sine = (n1 ^ n2) * v / v.norm();
if (sine >= 1.0) {
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
index 629e8ffe901..c884c6f5df6 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
@@ -103,7 +103,7 @@ WFace *WVertex::face_iterator::operator*()
}
#if 0
-bool WVertex::isBoundary () const
+bool WVertex::isBoundary() const
{
return _Border;
}
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index 79c6a24e6d9..f645c3d7520 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -368,10 +368,10 @@ class WEdge;
class WOEdge {
protected:
#if 0
- WOEdge *_paCWEdge; // edge reached when traveling clockwise on aFace from the edge
- WOEdge *_pbCWEdge; // edge reached when traveling clockwise on bFace from the edge
- WOEdge *_paCCWEdge; // edge reached when traveling counterclockwise on aFace from the edge
- WOEdge *_pbCCWEdge; // edge reached when traveling counterclockwise on bFace from the edge
+ WOEdge *_paCWEdge; // edge reached when traveling clockwise on aFace from the edge
+ WOEdge *_pbCWEdge; // edge reached when traveling clockwise on bFace from the edge
+ WOEdge *_paCCWEdge; // edge reached when traveling counterclockwise on aFace from the edge
+ WOEdge *_pbCCWEdge; // edge reached when traveling counterclockwise on bFace from the edge
#endif
WVertex *_paVertex; // starting vertex
WVertex *_pbVertex; // ending vertex
@@ -1099,7 +1099,7 @@ class WShape {
}
#if 0
- inline void bbox(Vec3f& min, Vec3f& max)
+ inline void bbox(Vec3f &min, Vec3f &max)
{
min = _min;
max = _max;
@@ -1160,7 +1160,7 @@ class WShape {
}
#if 0
- inline void setBBox(const Vec3f& min, const Vec3f& max)
+ inline void setBBox(const Vec3f &min, const Vec3f &max)
{
_min = min;
_max = max;
@@ -1275,7 +1275,9 @@ class WShape {
_max = _VertexList[0]->GetVertex();
Vec3f v;
- for (vector<WVertex *>::iterator wv = _VertexList.begin(), wvend = _VertexList.end(); wv != wvend; wv++) {
+ for (vector<WVertex *>::iterator wv = _VertexList.begin(), wvend = _VertexList.end();
+ wv != wvend;
+ wv++) {
for (unsigned int i = 0; i < 3; i++) {
v = (*wv)->GetVertex();
if (v[i] < _min[i])
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
index fcac2b386ea..26c75accc12 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
@@ -190,7 +190,8 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
for (int i = 0; i < numberOfEdges(); i++) {
WSFace *bface = (WSFace *)GetBordingFace(i);
if (bface) {
- if ((front()) ^ (bface->front())) { // fA->front XOR fB->front (true if one is 0 and the other is 1)
+ if ((front()) ^
+ (bface->front())) { // fA->front XOR fB->front (true if one is 0 and the other is 1)
// that means that the edge i of the face is a silhouette edge
// CHECK FIRST WHETHER THE EXACTSILHOUETTEEDGE HAS NOT YET BEEN BUILT ON THE OTHER FACE (1 is enough).
if (((WSExactFace *)bface)->exactSilhouetteEdge()) {
@@ -200,7 +201,7 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
// Else we must build it
WOEdge *woea, *woeb;
float ta, tb;
- if (!front()) { // is it in the right order ?
+ if (!front()) { // is it in the right order ?
// the order of the WOEdge index is wrong
woea = _OEdgeList[(i + 1) % numberOfEdges()];
if (0 == i)
@@ -288,7 +289,9 @@ WFace *WXShape::MakeFace(vector<WVertex *> &iVertexList,
#if 0
Vec3f center;
- for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end(); wv != wvend; ++wv) {
+ for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
+ wv != wvend;
+ ++wv) {
center += (*wv)->GetVertex();
}
center /= (float)iVertexList.size();
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h
index 63c2ef4f52b..01ce9bf2ea5 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h
@@ -696,7 +696,7 @@ class WXFace : public WFace {
class WXShape : public WShape {
#if 0
-public:
+ public:
typedef WXShape type_name;
#endif