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:
Diffstat (limited to 'source/blender/freestyle/intern/geometry/GeomUtils.cpp')
-rw-r--r--source/blender/freestyle/intern/geometry/GeomUtils.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
index 89a89d095ea..51727fd2288 100644
--- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp
+++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp
@@ -21,9 +21,7 @@
#include "GeomUtils.h"
-namespace Freestyle {
-
-namespace GeomUtils {
+namespace Freestyle::GeomUtils {
// This internal procedure is defined below.
bool intersect2dSegPoly(Vec2r *seg, Vec2r *poly, unsigned n);
@@ -219,14 +217,18 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
#define FINDMINMAX(x0, x1, x2, min, max) \
{ \
min = max = x0; \
- if (x1 < min) \
+ if (x1 < min) { \
min = x1; \
- if (x1 > max) \
+ } \
+ if (x1 > max) { \
max = x1; \
- if (x2 < min) \
+ } \
+ if (x2 < min) { \
min = x2; \
- if (x2 > max) \
+ } \
+ if (x2 > max) { \
max = x2; \
+ } \
} \
(void)0
@@ -244,8 +246,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -262,8 +265,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[Y] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -281,8 +285,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -299,8 +304,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Z]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -318,8 +324,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p2; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -336,8 +343,9 @@ intersection_test intersect2dSeg2dSegParametric(const Vec2r &p1,
max = p0; \
} \
rad = fa * boxhalfsize[X] + fb * boxhalfsize[Y]; \
- if (min > rad || max < -rad) \
+ if (min > rad || max < -rad) { \
return 0; \
+ } \
} \
(void)0
@@ -836,6 +844,4 @@ inline void fromCoordAToCoordB(const Vec3r &p, Vec3r &q, const real transform[4]
}
}
-} // end of namespace GeomUtils
-
-} /* namespace Freestyle */
+} // namespace Freestyle::GeomUtils