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/winged_edge/WXEdge.cpp')
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
index 2e36790563e..566b046bb2c 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
@@ -70,8 +70,9 @@ void WXFaceLayer::RetrieveCuspEdgesIndices(vector<int> &oCuspEdges)
WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
{
// if the smooth edge has already been built: exit
- if (_pSmoothEdge)
+ if (_pSmoothEdge) {
return _pSmoothEdge;
+ }
float ta, tb;
WOEdge *woea(0), *woeb(0);
bool ok = false;
@@ -87,8 +88,9 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
//-----------------------------
// We retrieve the 2 edges for which we have opposite signs for each extremity
RetrieveCuspEdgesIndices(cuspEdgesIndices);
- if (cuspEdgesIndices.size() != 2) // we necessarly have 2 cusp edges
+ if (cuspEdgesIndices.size() != 2) { // we necessarly have 2 cusp edges
return 0;
+ }
// let us determine which cusp edge corresponds to the starting:
// We can do that because we defined that a silhouette edge had the back facing part on its
@@ -179,10 +181,12 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
_pSmoothEdge->setTb(tb);
if (_Nature & Nature::SILHOUETTE) {
if (_nNullDotP != 2) {
- if (_DotP[_ClosestPointIndex] + 0.01f > 0.0f)
+ if (_DotP[_ClosestPointIndex] + 0.01f > 0.0f) {
_pSmoothEdge->setFront(true);
- else
+ }
+ else {
_pSmoothEdge->setFront(false);
+ }
}
}
}
@@ -266,8 +270,9 @@ WFace *WXShape::MakeFace(vector<WVertex *> &iVertexList,
unsigned iMaterialIndex)
{
WFace *face = WShape::MakeFace(iVertexList, iFaceEdgeMarksList, iMaterialIndex);
- if (!face)
+ if (!face) {
return NULL;
+ }
Vec3f center;
for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();