diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-09 21:22:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-09 21:22:52 +0400 |
commit | 0fbb6bff27139d66951fe223ff322c609d368a18 (patch) | |
tree | e75d0d4399e4b82746f4edbc0c2e20e8c25f7015 /intern/cycles/subd | |
parent | 2f60d9b0b9af1df967e29fd1822d82ffd2450d0f (diff) |
style cleanup: block comments
Diffstat (limited to 'intern/cycles/subd')
-rw-r--r-- | intern/cycles/subd/subd_build.cpp | 15 | ||||
-rw-r--r-- | intern/cycles/subd/subd_dice.cpp | 10 | ||||
-rw-r--r-- | intern/cycles/subd/subd_ring.cpp | 8 |
3 files changed, 18 insertions, 15 deletions
diff --git a/intern/cycles/subd/subd_build.cpp b/intern/cycles/subd/subd_build.cpp index 640c30eba9d..07f89b2a371 100644 --- a/intern/cycles/subd/subd_build.cpp +++ b/intern/cycles/subd/subd_build.cpp @@ -82,7 +82,7 @@ static float pseudoValence(SubdVert *vert) if(vert->is_boundary()) { /* we treat boundary verts as being half a closed mesh. corners are - special case. n = 4 for corners and n = 2*(n-1) for boundaries. */ + * special case. n = 4 for corners and n = 2*(n-1) for boundaries. */ if(valence == 2) return 4; return (valence - 1)*2; } @@ -481,10 +481,11 @@ void SubdAccBuilder::computeInteriorStencil(SubdFaceRing *ring, GregoryAccStenci } /* this change makes the triangle boundaries smoother, but distorts the quads next to them */ - /*if(ring->is_triangle() || SubdFaceRing::is_triangle(edge->pair->face)) - { +#if 0 + if(ring->is_triangle() || SubdFaceRing::is_triangle(edge->pair->face)) { y *= 4.0f / 3.0f; - }*/ + } +#endif stencil->get(interior1Indices[primitiveOffset+v]) = stencil->get(edge1Indices[primitiveOffset+v]); stencil->get(interior1Indices[primitiveOffset+v]) += x; @@ -539,8 +540,10 @@ void SubdAccBuilder::computeInteriorStencil(SubdFaceRing *ring, GregoryAccStenci } /* this change makes the triangle boundaries smoother, but distorts the quads next to them. */ - /*if(ring->is_triangle() || SubdFaceRing::is_triangle(edge->pair->face)) - y *= 4.0f / 3.0f;*/ +#if 0 + if(ring->is_triangle() || SubdFaceRing::is_triangle(edge->pair->face)) + y *= 4.0f / 3.0f; +#endif stencil->get(interior2Indices[primitiveOffset+v]) = stencil->get(edge2Indices[primitiveOffset+v]); stencil->get(interior2Indices[primitiveOffset+v]) += x; diff --git a/intern/cycles/subd/subd_dice.cpp b/intern/cycles/subd/subd_dice.cpp index 6e24bb410b5..583abb2b58a 100644 --- a/intern/cycles/subd/subd_dice.cpp +++ b/intern/cycles/subd/subd_dice.cpp @@ -81,9 +81,9 @@ void EdgeDice::stitch_triangles(vector<int>& outer, vector<int>& inner) return; // XXX avoid crashes for Mu or Mv == 1, missing polygons /* stitch together two arrays of verts with triangles. at each step, - we compare using the next verts on both sides, to find the split - direction with the smallest diagonal, and use that in order to keep - the triangle shape reasonable. */ + * we compare using the next verts on both sides, to find the split + * direction with the smallest diagonal, and use that in order to keep + * the triangle shape reasonable. */ for(size_t i = 0, j = 0; i+1 < inner.size() || j+1 < outer.size();) { int v0, v1, v2; @@ -354,8 +354,8 @@ void TriangleDice::add_grid(SubPatch& sub, EdgeFactors& ef, int M) // XXX normals are flipped, why? /* grid is constructed starting from the outside edges, and adding - progressively smaller inner triangles that connected to the outer - one, until M = 1 or 2, the we fill up the last part. */ + * progressively smaller inner triangles that connected to the outer + * one, until M = 1 or 2, the we fill up the last part. */ vector<int> outer_u, outer_v, outer_w; int m; diff --git a/intern/cycles/subd/subd_ring.cpp b/intern/cycles/subd/subd_ring.cpp index cbd12e60da0..66eab02231c 100644 --- a/intern/cycles/subd/subd_ring.cpp +++ b/intern/cycles/subd/subd_ring.cpp @@ -82,8 +82,8 @@ int SubdFaceRing::vert_index(SubdVert *vertex) void SubdFaceRing::evaluate_stencils(float3 *P, StencilMask *mask, int num) { /* first we sort verts by id. this way verts will always be added - in the same order to ensure the exact same float ops happen for control - points of other patches, so we get water-tight patches */ + * in the same order to ensure the exact same float ops happen for control + * points of other patches, so we get water-tight patches */ int num_verts = m_verts.size(); vector<int> vmap(num_verts); @@ -161,8 +161,8 @@ bool SubdFaceRing::is_quad(SubdFace *face) bool SubdFaceRing::is_boundary(SubdFace *face) { /* note that face->is_boundary() returns a different result. That function - returns true when any of the *edges* are on the boundary. however, this - function returns true if any of the face *verts* are on the boundary. */ + * returns true when any of the *edges* are on the boundary. however, this + * function returns true if any of the face *verts* are on the boundary. */ for(SubdFace::EdgeIterator it(face->edges()); !it.isDone(); it.advance()) { SubdEdge *edge = it.current(); |