diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-15 13:21:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-15 13:44:13 +0400 |
commit | ea99efeb2ca91b108bf3e86f4964e1a4555b46d8 (patch) | |
tree | 0eedd99c4b3c524fabe8a743c077b616d5124a54 /source/blender/freestyle/intern/winged_edge | |
parent | d9211b1e7b8503c67ad7898c09b338902e794e9d (diff) |
Code cleanup: indentation
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge')
-rw-r--r-- | source/blender/freestyle/intern/winged_edge/WXEdge.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp index 88da9cf9f80..84dbd5fbef8 100644 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp @@ -197,43 +197,43 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge() 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) - // 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()) { - // that means that this silhouette edge has already been built - return ((WSExactFace *)bface)->exactSilhouetteEdge(); - } - // Else we must build it - WOEdge *woea, *woeb; - real ta, tb; - if (!front()) { // is it in the right order ? - // the order of the WOEdge index is wrong - woea = _OEdgeList[(i + 1) % numberOfEdges()]; - if (0 == i) - woeb = _OEdgeList[numberOfEdges() - 1]; - else - woeb = _OEdgeList[(i - 1)]; - ta = 0; - tb = 1; - } - else { - // the order of the WOEdge index is good - if (0 == i) - woea = _OEdgeList[numberOfEdges() - 1]; - else - woea = _OEdgeList[(i - 1)]; - woeb = _OEdgeList[(i + 1) % numberOfEdges()]; - ta = 1; - tb = 0; - } + // 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()) { + // that means that this silhouette edge has already been built + return ((WSExactFace *)bface)->exactSilhouetteEdge(); + } + // Else we must build it + WOEdge *woea, *woeb; + real ta, tb; + if (!front()) { // is it in the right order ? + // the order of the WOEdge index is wrong + woea = _OEdgeList[(i + 1) % numberOfEdges()]; + if (0 == i) + woeb = _OEdgeList[numberOfEdges() - 1]; + else + woeb = _OEdgeList[(i - 1)]; + ta = 0; + tb = 1; + } + else { + // the order of the WOEdge index is good + if (0 == i) + woea = _OEdgeList[numberOfEdges() - 1]; + else + woea = _OEdgeList[(i - 1)]; + woeb = _OEdgeList[(i + 1) % numberOfEdges()]; + ta = 1; + tb = 0; + } - _pSmoothEdge = new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX); - _pSmoothEdge->setWOeA(woea); - _pSmoothEdge->setWOeA(woeb); - _pSmoothEdge->setTa(ta); - _pSmoothEdge->setTb(tb); + _pSmoothEdge = new ExactSilhouetteEdge(ExactSilhouetteEdge::VERTEX_VERTEX); + _pSmoothEdge->setWOeA(woea); + _pSmoothEdge->setWOeA(woeb); + _pSmoothEdge->setTa(ta); + _pSmoothEdge->setTb(tb); - return _pSmoothEdge; + return _pSmoothEdge; } } } |