[Bf-blender-cvs] [62bf22e] master: Freestyle: Removed SVertex _curvatureFredo and _directionFredo and their getter/setter methods..

Tamito Kajiyama noreply at git.blender.org
Fri Apr 4 16:50:15 CEST 2014


Commit: 62bf22e27b47fd929e54c4e127a1bba02faf5f34
Author: Tamito Kajiyama
Date:   Fri Apr 4 17:01:10 2014 +0900
https://developer.blender.org/rB62bf22e27b47fd929e54c4e127a1bba02faf5f34

Freestyle: Removed SVertex _curvatureFredo and _directionFredo and their getter/setter methods..

These data elements are undocumented and of little use.  For now they are commented out
in the implementation in favor of less memory consumption, and a very limited support for
these data components in the Python API was just removed (should be easy to recover).

===================================================================

M	source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
M	source/blender/freestyle/intern/stroke/Curve.cpp
M	source/blender/freestyle/intern/stroke/Curve.h
M	source/blender/freestyle/intern/view_map/Silhouette.h

===================================================================

diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index 69d0ada..50c9d03 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 af9c8c2..e5dc27a 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 7e3b673..fd4150c 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 02d3698..88a0712 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)




More information about the Bf-blender-cvs mailing list