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:
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp14
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp6
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.h4
4 files changed, 9 insertions, 19 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index 69d0adadc00..50c9d031d0d 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -199,26 +199,12 @@ static int CurvePoint_t2d_set(BPy_CurvePoint *self, PyObject *value, void *UNUSE
return 0;
}
-PyDoc_STRVAR(CurvePoint_curvature_fredo_doc,
-"The angle (Fredo's curvature) in radians.\n"
-"\n"
-":type: float");
-
-static PyObject *CurvePoint_curvature_fredo_get(BPy_CurvePoint *self, void *UNUSED(closure))
-{
- return PyFloat_FromDouble(self->cp->curvatureFredo());
-}
-
-// todo - CurvePoint.directionFredo()
-
static PyGetSetDef BPy_CurvePoint_getseters[] = {
{(char *)"first_svertex", (getter)CurvePoint_first_svertex_get, (setter)CurvePoint_first_svertex_set,
(char *)CurvePoint_first_svertex_doc, NULL},
{(char *)"second_svertex", (getter)CurvePoint_second_svertex_get, (setter)CurvePoint_second_svertex_set,
(char *)CurvePoint_second_svertex_doc, NULL},
{(char *)"t2d", (getter)CurvePoint_t2d_get, (setter)CurvePoint_t2d_set, (char *)CurvePoint_t2d_doc, NULL},
- {(char *)"curvature_fredo", (getter)CurvePoint_curvature_fredo_get, (setter)NULL,
- (char *)CurvePoint_curvature_fredo_doc, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index af9c8c2869d..e5dc27a0c57 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -475,7 +475,6 @@ real CurvePoint::curvature2d_as_angle() const
return __A->curvature2d_as_angle();
return ((1 - _t2d) * __A->curvature2d_as_angle() + _t2d * __B->curvature2d_as_angle());
}
-#endif
real CurvePoint::curvatureFredo() const
{
@@ -494,6 +493,7 @@ Vec2d CurvePoint::directionFredo () const
return __A->directionFredo();
return ((1 - _t2d) * __A->directionFredo() + _t2d * __B->directionFredo());
}
+#endif
/**********************************/
/* */
@@ -813,14 +813,12 @@ real Curve::local_average_density(float sigma, int iCombination ) const
return result;
#endif
}
-#endif
/* UNUSED */
// #define EPS_CURVA_DIR 0.01
void Curve::computeCurvatureAndOrientation ()
{
-#if 0
const_vertex_iterator v = vertices_begin(), vend = vertices_end(), v2, prevV, v0;
Vec2d p0, p1, p2;
Vec3r p;
@@ -924,7 +922,7 @@ void Curve::computeCurvatureAndOrientation ()
p0 = p1;
p1 = p2;
}
-#endif
}
+#endif
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h
index 7e3b6732bff..fd4150c6c13 100644
--- a/source/blender/freestyle/intern/stroke/Curve.h
+++ b/source/blender/freestyle/intern/stroke/Curve.h
@@ -337,10 +337,10 @@ public:
Vec3r curvature2d_as_vector() const;
/*! angle in radians */
real curvature2d_as_angle() const;
-#endif
real curvatureFredo() const;
Vec2d directionFredo() const;
+#endif
};
@@ -422,8 +422,10 @@ public:
return "Curve";
}
+#if 0
/* fredo's curvature storage */
void computeCurvatureAndOrientation();
+#endif
/*! Adds a single vertex (CurvePoint) at the end of the Curve */
inline void push_vertex_back(Vertex *iVertex)
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index 02d3698c914..88a07127837 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -167,8 +167,10 @@ private:
vector<FEdge*> _FEdges; // the edges containing this vertex
SShape *_Shape; // the shape to which belongs the vertex
ViewVertex *_pViewVertex; // The associated viewvertex, in case there is one.
+#if 0
real _curvatureFredo;
Vec2r _directionFredo;
+#endif
CurvatureInfo *_curvature_info;
public:
@@ -326,6 +328,7 @@ public:
return _curvature_info;
}
+#if 0
/* Fredo's normal and curvature*/
void setCurvatureFredo(real c)
{
@@ -346,6 +349,7 @@ public:
{
return _directionFredo;
}
+#endif
/*! Sets the Id */
inline void setId(const Id& id)