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-30 10:50:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-01 00:58:27 +0300
commit1e8697cd8094183a3f356bf8564284a31ffb89fc (patch)
tree554b1ac7856f3f168c58476ce53d1953beaa760e /source/blender/freestyle/intern/winged_edge
parent5ca8ac51d04c6feb9d29d75fb2525168d30fbe74 (diff)
Cleanup: comments (long lines) in freestyle
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge')
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.cpp73
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.cpp24
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.h61
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.cpp11
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.h72
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp6
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h4
-rw-r--r--source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp16
-rw-r--r--source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h4
9 files changed, 142 insertions, 129 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
index ada1b20780a..4fb92e35b40 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
@@ -78,7 +78,8 @@ static real cotan(WVertex *vo, WVertex *v1, WVertex *v2)
udotv = u * v;
denom = sqrt(u.squareNorm() * v.squareNorm() - udotv * udotv);
- /* denom can be zero if u==v. Returning 0 is acceptable, based on the callers of this function below. */
+ /* denom can be zero if u==v. Returning 0 is acceptable, based on the callers of this function
+ * below. */
if (denom == 0.0)
return 0.0;
return (udotv / denom);
@@ -109,9 +110,9 @@ static real angle_from_cotan(WVertex *vo, WVertex *v1, WVertex *v2)
* Computes the Discrete Mean Curvature Normal approximation at @v.
* The mean curvature at @v is half the magnitude of the vector @Kh.
*
- * Note: the normal computed is not unit length, and may point either into or out of the surface, depending on
- * the curvature at @v. It is the responsibility of the caller of the function to use the mean curvature normal
- * appropriately.
+ * Note: the normal computed is not unit length, and may point either into or out of the surface,
+ * depending on the curvature at @v. It is the responsibility of the caller of the function to use
+ * the mean curvature normal appropriately.
*
* This approximation is from the paper:
* Discrete Differential-Geometry Operators for Triangulated 2-Manifolds
@@ -119,8 +120,8 @@ static real angle_from_cotan(WVertex *vo, WVertex *v1, WVertex *v2)
* VisMath '02, Berlin (Germany)
* http://www-grail.usc.edu/pubs.html
*
- * Returns: %true if the operator could be evaluated, %false if the evaluation failed for some reason (@v is
- * boundary or is the endpoint of a non-manifold edge.)
+ * Returns: %true if the operator could be evaluated, %false if the evaluation failed for some
+ * reason (@v is boundary or is the endpoint of a non-manifold edge.)
*/
bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh)
{
@@ -181,8 +182,8 @@ bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh)
* VisMath '02, Berlin (Germany)
* http://www-grail.usc.edu/pubs.html
*
- * Returns: %true if the operator could be evaluated, %false if the evaluation failed for some reason (@v is
- * boundary or is the endpoint of a non-manifold edge.)
+ * Returns: %true if the operator could be evaluated, %false if the evaluation failed for some
+ * reason (@v is boundary or is the endpoint of a non-manifold edge.)
*/
bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
{
@@ -223,7 +224,8 @@ bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
* @K1: first principal curvature.
* @K2: second principal curvature.
*
- * Computes the principal curvatures at a point given the mean and Gaussian curvatures at that point.
+ * Computes the principal curvatures at a point given the mean and Gaussian curvatures at that
+ * point.
*
* The mean curvature can be computed as one-half the magnitude of the vector computed by
* gts_vertex_mean_curvature_normal().
@@ -275,12 +277,12 @@ static void eigenvector(real a, real b, real c, Vec3r e)
* @e1: first principal curvature direction (direction of largest curvature).
* @e2: second principal curvature direction.
*
- * Computes the principal curvature directions at a point given @Kh and @Kg, the mean curvature normal and
- * Gaussian curvatures at that point, computed with gts_vertex_mean_curvature_normal() and
- * gts_vertex_gaussian_curvature(), respectively.
+ * Computes the principal curvature directions at a point given @Kh and @Kg, the mean curvature
+ * normal and Gaussian curvatures at that point, computed with gts_vertex_mean_curvature_normal()
+ * and gts_vertex_gaussian_curvature(), respectively.
*
- * Note that this computation is very approximate and tends to be unstable. Smoothing of the surface or the principal
- * directions may be necessary to achieve reasonable results.
+ * Note that this computation is very approximate and tends to be unstable. Smoothing of the
+ * surface or the principal directions may be necessary to achieve reasonable results.
*/
void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, Vec3r &e2)
{
@@ -306,8 +308,8 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
Kh.normalize();
}
else {
- /* This vertex is a point of zero mean curvature (flat or saddle point). Compute a normal by averaging
- * the adjacent triangles
+ /* This vertex is a point of zero mean curvature (flat or saddle point). Compute a normal by
+ * averaging the adjacent triangles
*/
N[0] = N[1] = N[2] = 0.0;
@@ -354,8 +356,9 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
continue;
e = *itE;
- /* since this vertex passed the tests in gts_vertex_mean_curvature_normal(), this should be true. */
- //g_assert(gts_edge_face_number (e, s) == 2);
+ /* since this vertex passed the tests in gts_vertex_mean_curvature_normal(), this should be
+ * true. */
+ // g_assert(gts_edge_face_number (e, s) == 2);
/* identify the two triangles bordering e in s */
f1 = e->GetaFace();
@@ -365,17 +368,18 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
* B = [ a b ; b c ].
* The computations here are from section 5 of [Meyer et al 2002].
*
- * The first step is to calculate the linear equations governing the values of (a,b,c). These can be computed
- * by setting the derivatives of the error E to zero (section 5.3).
+ * The first step is to calculate the linear equations governing the values of (a,b,c). These
+ * can be computed by setting the derivatives of the error E to zero (section 5.3).
*
- * Since a + c = norm(Kh), we only compute the linear equations for dE/da and dE/db. (NB: [Meyer et al 2002]
- * has the equation a + b = norm(Kh), but I'm almost positive this is incorrect).
+ * Since a + c = norm(Kh), we only compute the linear equations for dE/da and dE/db. (NB:
+ * [Meyer et al 2002] has the equation a + b = norm(Kh), but I'm almost positive this is
+ * incorrect).
*
- * Note that the w_ij (defined in section 5.2) are all scaled by (1/8*A_mixed). We drop this uniform scale
- * factor because the solution of the linear equations doesn't rely on it.
+ * Note that the w_ij (defined in section 5.2) are all scaled by (1/8*A_mixed). We drop this
+ * uniform scale factor because the solution of the linear equations doesn't rely on it.
*
- * The terms of the linear equations are xterm_dy with x in {a,b,c} and y in {a,b}. There are also const_dy
- * terms that are the constant factors in the equations.
+ * The terms of the linear equations are xterm_dy with x in {a,b,c} and y in {a,b}. There are
+ * also const_dy terms that are the constant factors in the equations.
*/
/* find the vector from v along edge e */
@@ -389,8 +393,9 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
/* section 5.2 */
- /* I don't like performing a minimization where some of the weights can be negative (as can be the case
- * if f1 or f2 are obtuse). To ensure all-positive weights, we check for obtuseness. */
+ /* I don't like performing a minimization where some of the weights can be negative (as can be
+ * the case if f1 or f2 are obtuse). To ensure all-positive weights, we check for obtuseness.
+ */
weight = 0.0;
if (!triangle_obtuse(v, f1)) {
weight += ve2 *
@@ -471,12 +476,14 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
eig[1] = 0.0;
}
- /* Although the eigenvectors of B are good estimates of the principal directions, it seems that which one is
- * attached to which curvature direction is a bit arbitrary. This may be a bug in my implementation, or just
- * a side-effect of the inaccuracy of B due to the discrete nature of the sampling.
+ /* Although the eigenvectors of B are good estimates of the principal directions, it seems that
+ * which one is attached to which curvature direction is a bit arbitrary. This may be a bug in my
+ * implementation, or just a side-effect of the inaccuracy of B due to the discrete nature of the
+ * sampling.
*
- * To overcome this behavior, we'll evaluate which assignment best matches the given eigenvectors by comparing
- * the curvature estimates computed above and the curvatures calculated from the discrete differential operators.
+ * To overcome this behavior, we'll evaluate which assignment best matches the given eigenvectors
+ * by comparing the curvature estimates computed above and the curvatures calculated from the
+ * discrete differential operators.
*/
gts_vertex_principal_curvatures(0.5 * normKh, Kg, &K1, &K2);
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.cpp b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
index c884c6f5df6..3dc574515c1 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.cpp
@@ -293,7 +293,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
// Adds the edge to the face
AddEdge(woea);
(*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges() + 1);
- //sets these vertices as border:
+ // sets these vertices as border:
v1->setBorder(true);
v2->setBorder(true);
return woea;
@@ -307,7 +307,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
// Adds the edge to the face
AddEdge(woeb);
(*it1)->setNumberOfOEdges((*it1)->GetNumberOfOEdges() + 1);
- //sets these vertices as border:
+ // sets these vertices as border:
v1->setBorder(true);
v2->setBorder(true);
return woeb;
@@ -334,7 +334,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
}
}
- //DEBUG:
+ // DEBUG:
if (true == exist) { // The invert edge already exists
// Retrieves the corresponding edge
edge = pInvertEdge->GetOwner();
@@ -347,7 +347,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
}
else { // The invert edge does not exist yet
// we must create a new edge
- //edge = new WEdge;
+ // edge = new WEdge;
edge = instanciateEdge();
// updates the a,b vertex edges list:
@@ -365,7 +365,7 @@ WOEdge *WFace::MakeEdge(WVertex *v1, WVertex *v2)
cerr << "Warning: edge " << this << " null with vertex " << v1->GetId() << endl;
edge->AddOEdge(pOEdge);
- //edge->setNumberOfOEdges(edge->GetNumberOfOEdges() + 1);
+ // edge->setNumberOfOEdges(edge->GetNumberOfOEdges() + 1);
// Add this face (the b face)
pOEdge->setbFace(this);
@@ -468,7 +468,7 @@ WShape::WShape(WShape &iBrother)
vector<WVertex *> &vertexList = iBrother.getVertexList();
vector<WVertex *>::iterator v = vertexList.begin(), vend = vertexList.end();
for (; v != vend; ++v) {
- //WVertex *newVertex = new WVertex(*(*v));
+ // WVertex *newVertex = new WVertex(*(*v));
WVertex *newVertex = (*v)->duplicate();
newVertex->setShape(this);
@@ -478,7 +478,7 @@ WShape::WShape(WShape &iBrother)
vector<WEdge *> &edgeList = iBrother.getEdgeList();
vector<WEdge *>::iterator e = edgeList.begin(), eend = edgeList.end();
for (; e != eend; ++e) {
- //WEdge *newEdge = new WEdge(*(*e));
+ // WEdge *newEdge = new WEdge(*(*e));
WEdge *newEdge = (*e)->duplicate();
AddEdge(newEdge);
}
@@ -486,7 +486,7 @@ WShape::WShape(WShape &iBrother)
vector<WFace *> &faceList = iBrother.GetFaceList();
vector<WFace *>::iterator f = faceList.begin(), fend = faceList.end();
for (; f != fend; ++f) {
- //WFace *newFace = new WFace(*(*f));
+ // WFace *newFace = new WFace(*(*f));
WFace *newFace = (*f)->duplicate();
AddFace(newFace);
}
@@ -539,8 +539,8 @@ WShape::WShape(WShape &iBrother)
WOEdge *current = oedgeList[i];
oedgedata *currentoedata = (oedgedata *)current->userdata;
newoedgelist.push_back(currentoedata->_copy);
- //oedgeList[i] = currentoedata->_copy;
- //oedgeList[i] = ((oedgedata *)(oedgeList[i]->userdata))->_copy;
+ // oedgeList[i] = currentoedata->_copy;
+ // oedgeList[i] = ((oedgedata *)(oedgeList[i]->userdata))->_copy;
}
(*f)->setEdgeList(newoedgelist);
}
@@ -662,11 +662,11 @@ WFace *WShape::MakeFace(vector<WVertex *> &iVertexList,
for (; va != iVertexList.end(); va = vb) {
++vb;
// Adds va to the vertex list:
- //face->AddVertex(*va);
+ // face->AddVertex(*va);
WOEdge *oedge;
if (*va == iVertexList.back())
- oedge = face->MakeEdge(*va, iVertexList.front()); //for the last (closing) edge
+ oedge = face->MakeEdge(*va, iVertexList.front()); // for the last (closing) edge
else
oedge = face->MakeEdge(*va, *vb);
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index f645c3d7520..1a141629c6d 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -178,7 +178,7 @@ class WVertex {
{
}
#endif
- virtual ~incoming_edge_iterator(){}; //soc
+ virtual ~incoming_edge_iterator(){}; // soc
protected:
friend class WVertex;
@@ -237,7 +237,7 @@ class WVertex {
// dereferencing
virtual WOEdge *operator*();
- //virtual WOEdge **operator->();
+ // virtual WOEdge **operator->();
protected:
virtual void increment();
@@ -266,7 +266,7 @@ class WVertex {
{
}
#endif
- virtual ~face_iterator(){}; //soc
+ virtual ~face_iterator(){}; // soc
protected:
friend class WVertex;
@@ -321,7 +321,7 @@ class WVertex {
// dereferencing
virtual WFace *operator*();
- //virtual WOEdge **operator->();
+ // virtual WOEdge **operator->();
protected:
inline void increment()
@@ -401,7 +401,7 @@ class WOEdge {
userdata = NULL;
}
- virtual ~WOEdge(){}; //soc
+ virtual ~WOEdge(){}; // soc
/*! copy constructor */
WOEdge(WOEdge &iBrother);
@@ -1196,10 +1196,9 @@ class WShape {
/*! adds a new face to the shape
* returns the built face.
* iVertexList
- * List of face's vertices. These vertices are not added to the WShape vertex list; they are supposed to be
- * already stored when calling MakeFace.
- * The order in which the vertices are stored in the list determines the face's edges orientation and (so) the
- * face orientation.
+ * List of face's vertices. These vertices are not added to the WShape vertex list; they are
+ * supposed to be already stored when calling MakeFace. The order in which the vertices are
+ * stored in the list determines the face's edges orientation and (so) the face orientation.
* iMaterialIndex
* The material index for this face
*/
@@ -1207,21 +1206,16 @@ class WShape {
vector<bool> &iFaceEdgeMarksList,
unsigned iMaterialIndex);
- /*! adds a new face to the shape. The difference with the previous method is that this one is designed
- * to build a WingedEdge structure for which there are per vertex normals, opposed to per face normals.
- * returns the built face.
- * iVertexList
- * List of face's vertices. These vertices are not added to the WShape vertex list; they are supposed to be
- * already stored when calling MakeFace.
- * The order in which the vertices are stored in the list determines the face's edges orientation and (so) the
- * face orientation.
- * iMaterialIndex
- * The materialIndex for this face
+ /*! adds a new face to the shape. The difference with the previous method is that this one is
+ * designed to build a WingedEdge structure for which there are per vertex normals, opposed to
+ * per face normals. returns the built face. iVertexList List of face's vertices. These vertices
+ * are not added to the WShape vertex list; they are supposed to be already stored when calling
+ * MakeFace. The order in which the vertices are stored in the list determines the face's edges
+ * orientation and (so) the face orientation. iMaterialIndex The materialIndex for this face
* iNormalsList
- * The list of normals, iNormalsList[i] corresponding to the normal of the vertex iVertexList[i] for that face.
- * iTexCoordsList
- * The list of tex coords, iTexCoordsList[i] corresponding to the normal of the vertex iVertexList[i] for
- * that face.
+ * The list of normals, iNormalsList[i] corresponding to the normal of the vertex
+ * iVertexList[i] for that face. iTexCoordsList The list of tex coords, iTexCoordsList[i]
+ * corresponding to the normal of the vertex iVertexList[i] for that face.
*/
virtual WFace *MakeFace(vector<WVertex *> &iVertexList,
vector<Vec3f> &iNormalsList,
@@ -1300,16 +1294,17 @@ class WShape {
#endif
protected:
- /*! Builds the face passed as argument (which as already been allocated)
- * iVertexList
- * List of face's vertices. These vertices are not added to the WShape vertex list; they are supposed to be
- * already stored when calling MakeFace.
- * The order in which the vertices are stored in the list determines the face's edges orientation and (so) the
- * face orientation.
- * iMaterialIndex
- * The material index for this face
- * face
- * The Face that is filled in
+ /*!
+ * Builds the face passed as argument (which as already been allocated)
+ * - iVertexList
+ * List of face's vertices. These vertices are not added to the WShape vertex list;
+ * they are supposed to be already stored when calling MakeFace.
+ * The order in which the vertices are stored in the list determines
+ * the face's edges orientation and (so) the face orientation.
+ * - iMaterialIndex
+ * The material index for this face
+ * - face
+ * The Face that is filled in
*/
virtual WFace *MakeFace(vector<WVertex *> &iVertexList,
vector<bool> &iFaceEdgeMarksList,
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
index 26c75accc12..2e36790563e 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.cpp
@@ -91,8 +91,9 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
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 right.
- // So if the WOEdge woea is such that woea[0].dotp > 0 and woea[1].dotp < 0, it is the starting edge.
+ // We can do that because we defined that a silhouette edge had the back facing part on its
+ // right. So if the WOEdge woea is such that woea[0].dotp > 0 and woea[1].dotp < 0, it is the
+ // starting edge.
//-------------------------------------------
if (_DotP[cuspEdgesIndices[0]] > 0.0f) {
@@ -114,7 +115,8 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
ok = true;
}
else if (_nNullDotP == 1) {
- // that means that we have exactly one of the 2 extremities of our silhouette edge is a vertex of the mesh
+ // that means that we have exactly one of the 2 extremities of our silhouette edge is a vertex
+ // of the mesh
if ((_nPosDotP == 2) || (_nPosDotP == 0)) {
_pSmoothEdge = NULL;
return _pSmoothEdge;
@@ -193,7 +195,8 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
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).
+ // 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();
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h
index 01ce9bf2ea5..0f1b8d77c59 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h
@@ -108,8 +108,8 @@ class WXEdge : public WEdge {
WXNature _nature;
// 0: the order doesn't matter. 1: the order is the orginal one. -1: the order is not good
short _order;
- // A front facing edge is an edge for which the bording face which is the nearest from the viewpoint is front.
- // A back facing edge is the opposite.
+ // A front facing edge is an edge for which the bording face which is the nearest from the
+ // viewpoint is front. A back facing edge is the opposite.
bool _front;
public:
@@ -322,13 +322,13 @@ class WXFaceLayer {
public:
void *userdata;
WXFace *_pWXFace;
- // in case of silhouette: the values obtained when computing the normal-view direction dot product. _DotP[i] is
- // this value for the vertex i for that face.
+ // in case of silhouette: the values obtained when computing the normal-view direction dot
+ // product. _DotP[i] is this value for the vertex i for that face.
vector<float> _DotP;
WXSmoothEdge *_pSmoothEdge;
WXNature _Nature;
- //oldtmp values
+ // oldtmp values
// count the number of positive dot products for vertices.
// if this number is != 0 and !=_DotP.size() -> it is a silhouette fac
unsigned _nPosDotP;
@@ -435,14 +435,16 @@ class WXFaceLayer {
}
}
- /*! If one of the face layer vertex has a DotP equal to 0, this method returns the vertex where it happens */
+ /*! If one of the face layer vertex has a DotP equal to 0, this method returns the vertex where
+ * it happens */
unsigned int Get0VertexIndex() const;
- /*! In case one of the edge of the triangle is a smooth edge, this method allows to retrieve the concerned edge */
+ /*! In case one of the edge of the triangle is a smooth edge, this method allows to retrieve the
+ * concerned edge */
unsigned int GetSmoothEdgeIndex() const;
- /*! retrieves the edges of the triangle for which the signs are different (a null value is not considered) for
- * the dotp values at each edge extrimity
+ /*! retrieves the edges of the triangle for which the signs are different (a null value is not
+ * considered) for the dotp values at each edge extrimity
*/
void RetrieveCuspEdgesIndices(vector<int> &oCuspEdges);
@@ -492,8 +494,8 @@ class WXFace : public WFace {
bool _front; // flag to tell whether the face is front facing or back facing
float _dotp; // value obtained when computing the normal-viewpoint dot product
- vector<WXFaceLayer *>
- _SmoothLayers; // The data needed to store one or several smooth edges that traverse the face
+ vector<WXFaceLayer *> _SmoothLayers; // The data needed to store one or several smooth edges
+ // that traverse the face
public:
inline WXFace() : WFace()
@@ -701,8 +703,8 @@ class WXShape : public WShape {
#endif
protected:
- bool
- _computeViewIndependent; // flag to indicate whether the view independent stuff must be computed or not
+ bool _computeViewIndependent; // flag to indicate whether the view independent stuff must be
+ // computed or not
public:
inline WXShape() : WShape()
@@ -742,29 +744,35 @@ class WXShape : public WShape {
return new WXFace;
}
- /*! adds a new face to the shape returns the built face.
- * iVertexList
- * List of face's vertices. These vertices are not added to the WShape vertex list; they are supposed
- * to be already stored when calling MakeFace. The order in which the vertices are stored in the list
- * determines the face's edges orientation and (so) the face orientation.
+ /*!
+ * Adds a new face to the shape returns the built face.
+ * - iVertexList
+ * List of face's vertices.
+ * These vertices are not added to the WShape vertex list; they are
+ * supposed to be already stored when calling MakeFace. The order in which the vertices are
+ * stored in the list determines the face's edges orientation and (so) the face orientation.
*/
virtual WFace *MakeFace(vector<WVertex *> &iVertexList,
vector<bool> &iFaceEdgeMarksList,
unsigned iMaterialIndex);
- /*! adds a new face to the shape. The difference with the previous method is that this one is designed to build
- * a WingedEdge structure for which there are per vertex normals, opposed to per face normals.
- * returns the built face.
- * iVertexList
- * List of face's vertices. These vertices are not added to the WShape vertex list; they are supposed to be
- * already stored when calling MakeFace.
- * The order in which the vertices are stored in the list determines the face's edges orientation and (so) the
- * face orientation.
- * iNormalsList
- * The list of normals, iNormalsList[i] corresponding to the normal of the vertex iVertexList[i] for that face.
- * iTexCoordsList
- * The list of tex coords, iTexCoordsList[i] corresponding to the normal of the vertex iVertexList[i] for
- * that face.
+ /*!
+ * Adds a new face to the shape.
+ * The difference with the previous method is that this one is designed to build a WingedEdge
+ * structure for which there are per vertex normals, opposed to per face normals.
+ * returns the built face.
+ *
+ * - iVertexList:
+ * List of face's vertices. These vertices are not added to the WShape vertex list;
+ * they are supposed to be already stored when calling MakeFace.
+ * The order in which the vertices are stored in the list determines
+ * the face's edges orientation and (so) the face orientation.
+ * - iNormalsList:
+ * The list of normals, iNormalsList[i]
+ * corresponding to the normal of the vertex iVertexList[i] for that face.
+ * - iTexCoordsList:
+ * The list of tex coords, iTexCoordsList[i]
+ * corresponding to the normal of the vertex iVertexList[i] for that face.
*/
virtual WFace *MakeFace(vector<WVertex *> &iVertexList,
vector<Vec3f> &iNormalsList,
@@ -781,7 +789,7 @@ class WXShape : public WShape {
((WXEdge *)(*we))->Reset();
}
- //Reset faces:
+ // Reset faces:
vector<WFace *> &wfaces = GetFaceList();
for (vector<WFace *>::iterator wf = wfaces.begin(), wfend = wfaces.end(); wf != wfend; ++wf) {
((WXFace *)(*wf))->Reset();
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp
index fb0b6a9b63f..a34f2272200 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.cpp
@@ -16,8 +16,8 @@
/** \file
* \ingroup freestyle
- * \brief Class inherited from WingedEdgeBuilder and designed to build a WX (WingedEdge + extended info
- * (silhouette etc...)) structure from a polygonal model
+ * \brief Class inherited from WingedEdgeBuilder and designed to build a WX (WingedEdge + extended
+ * info (silhouette etc...)) structure from a polygonal model
*/
#include "WXEdge.h"
@@ -37,7 +37,7 @@ void WXEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet &ifs)
shape->setId(ifs.getId().getFirst());
shape->setName(ifs.getName());
shape->setLibraryPath(ifs.getLibraryPath());
- //ifs.setId(shape->GetId());
+ // ifs.setId(shape->GetId());
}
void WXEdgeBuilder::buildWVertices(WShape &shape, const float *vertices, unsigned vsize)
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h b/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h
index e98832f4fba..08189c5010e 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h
+++ b/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h
@@ -19,8 +19,8 @@
/** \file
* \ingroup freestyle
- * \brief Class inherited from WingedEdgeBuilder and designed to build a WX (WingedEdge + extended info
- * (silhouette etc...)) structure from a polygonal model
+ * \brief Class inherited from WingedEdgeBuilder and designed to build a WX (WingedEdge + extended
+ * info (silhouette etc...)) structure from a polygonal model
*/
#include "WingedEdgeBuilder.h"
diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
index 977eb2b4d57..f190d78014d 100644
--- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
+++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp
@@ -16,8 +16,8 @@
/** \file
* \ingroup freestyle
- * \brief Class to render a WingedEdge data structure from a polyhedral data structure organized in nodes
- * of a scene graph
+ * \brief Class to render a WingedEdge data structure from a polyhedral data structure organized in
+ * nodes of a scene graph
*/
#include <set>
@@ -42,12 +42,12 @@ void WingedEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet &ifs)
return;
}
shape->setId(ifs.getId().getFirst());
- //ifs.setId(shape->GetId());
+ // ifs.setId(shape->GetId());
}
void WingedEdgeBuilder::visitNodeShape(NodeShape &ns)
{
- //Sets the current material to iShapeode->material:
+ // Sets the current material to iShapeode->material:
_current_frs_material = &(ns.frs_material());
}
@@ -81,7 +81,7 @@ bool WingedEdgeBuilder::buildWShape(WShape &shape, IndexedFaceSet &ifs)
{
unsigned int vsize = ifs.vsize();
unsigned int nsize = ifs.nsize();
- //soc unused - unsigned tsize = ifs.tsize();
+ // soc unused - unsigned tsize = ifs.tsize();
const float *vertices = ifs.vertices();
const float *normals = ifs.normals();
@@ -256,7 +256,7 @@ void WingedEdgeBuilder::buildTriangleStrip(const float * /*vertices*/,
{
unsigned nDoneVertices = 2; // number of vertices already treated
unsigned nTriangle = 0; // number of the triangle currently being treated
- //int nVertex = 0; // vertex number
+ // int nVertex = 0; // vertex number
WShape *currentShape = _current_wshape; // the current shape being built
vector<WVertex *> triangleVertices;
@@ -265,9 +265,9 @@ void WingedEdgeBuilder::buildTriangleStrip(const float * /*vertices*/,
vector<bool> triangleFaceEdgeMarks;
while (nDoneVertices < nvertices) {
- //clear the vertices list:
+ // clear the vertices list:
triangleVertices.clear();
- //Then rebuild it:
+ // Then rebuild it:
if (0 == nTriangle % 2) { // if nTriangle is even
triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle] / 3]);
triangleVertices.push_back(currentShape->getVertexList()[vindices[nTriangle + 1] / 3]);
diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
index 606e8561401..a4aa08d50b6 100644
--- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
+++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
@@ -19,8 +19,8 @@
/** \file
* \ingroup freestyle
- * \brief Class to render a WingedEdge data structure from a polyhedral data structure organized in nodes
- * of a scene graph
+ * \brief Class to render a WingedEdge data structure
+ * from a polyhedral data structure organized in nodes of a scene graph.
*/
#include "WEdge.h"