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:
Diffstat (limited to 'source/blender/freestyle')
-rw-r--r--source/blender/freestyle/FRS_freestyle.h4
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp4
-rw-r--r--source/blender/freestyle/intern/image/GaussianFilter.h14
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h2
-rw-r--r--source/blender/freestyle/intern/system/PythonInterpreter.h2
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.cpp66
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.h63
7 files changed, 76 insertions, 79 deletions
diff --git a/source/blender/freestyle/FRS_freestyle.h b/source/blender/freestyle/FRS_freestyle.h
index bc5e9d49bee..77e906c6ea5 100644
--- a/source/blender/freestyle/FRS_freestyle.h
+++ b/source/blender/freestyle/FRS_freestyle.h
@@ -59,6 +59,10 @@ void FRS_exit(void);
void FRS_copy_active_lineset(struct FreestyleConfig *config);
void FRS_paste_active_lineset(struct FreestyleConfig *config);
void FRS_delete_active_lineset(struct FreestyleConfig *config);
+/**
+ * Reinsert the active lineset at an offset \a direction from current position.
+ * \return if position of active lineset has changed.
+ */
bool FRS_move_active_lineset(struct FreestyleConfig *config, int direction);
/* Testing */
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index b31f4fd2303..ce80ed78594 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -769,10 +769,6 @@ void FRS_delete_active_lineset(FreestyleConfig *config)
}
}
-/**
- * Reinsert the active lineset at an offset \a direction from current position.
- * \return if position of active lineset has changed.
- */
bool FRS_move_active_lineset(FreestyleConfig *config, int direction)
{
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h
index 2cb3e7d7ac5..af537cf2d86 100644
--- a/source/blender/freestyle/intern/image/GaussianFilter.h
+++ b/source/blender/freestyle/intern/image/GaussianFilter.h
@@ -37,14 +37,16 @@ namespace Freestyle {
class GaussianFilter {
protected:
/* The mask is a symmetrical 2d array (with respect to the middle point).
- * Thus, M(i,j) = M(-i,j) = M(i,-j) = M(-i,-j).
- * For this reason, to represent a NxN array (N odd), we only store a ((N+1)/2)x((N+1)/2) array.
- */
+ * Thus: `M(i,j) = M(-i,j) = M(i,-j) = M(-i,-j)`.
+ * For this reason, to represent a NxN array (N odd),
+ * we only store a `((N+1)/2)x((N+1)/2)` array. */
+
+ /** The sigma value of the gaussian function. */
float _sigma;
float *_mask;
int _bound;
- // the real mask size (must be odd)(the size of the mask we store is
- // ((_maskSize+1)/2)*((_maskSize+1)/2))
+ /* the real mask size (must be odd)(the size of the mask we store is:
+ * `((_maskSize+1)/2)*((_maskSize+1)/2))`. */
int _maskSize;
int _storedMaskSize; // (_maskSize+1)/2)
@@ -65,8 +67,6 @@ class GaussianFilter {
* The abscissa of the pixel where we want to evaluate the gaussian blur.
* \param y:
* The ordinate of the pixel where we want to evaluate the gaussian blur.
- * \param sigma:
- * The sigma value of the gaussian function.
*/
template<class Map> float getSmoothedPixel(Map *map, int x, int y);
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h
index 52cd037a73a..b41beb356c4 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h
+++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.h
@@ -119,7 +119,7 @@ class SmoothingShader : public StrokeShader {
* 0.2
* \param iAnisoPoint:
* 0
- * \param iAnisNormal:
+ * \param iAnisoNormal:
* 0
* \param iAnisoCurvature:
* 0
diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h
index 50ebacbd6e8..90dbc259038 100644
--- a/source/blender/freestyle/intern/system/PythonInterpreter.h
+++ b/source/blender/freestyle/intern/system/PythonInterpreter.h
@@ -71,7 +71,7 @@ class PythonInterpreter : public Interpreter {
bool ok = BPY_run_filepath(_context, fn, reports);
#else
bool ok;
- Text *text = BKE_text_load(&_freestyle_bmain, fn, G_MAIN->name);
+ Text *text = BKE_text_load(&_freestyle_bmain, fn, G_MAIN->filepath);
if (text) {
ok = BPY_run_text(_context, text, reports, false);
BKE_id_delete(&_freestyle_bmain, text);
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
index 411685bd921..ec07a124808 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
@@ -104,27 +104,6 @@ static real angle_from_cotan(WVertex *vo, WVertex *v1, WVertex *v2)
return (fabs(atan2(denom, udotv)));
}
-/** gts_vertex_mean_curvature_normal:
- * \param v: a #WVertex.
- * \param s: a #GtsSurface.
- * \param Kh: the Mean Curvature Normal at \a v.
- *
- * Computes the Discrete Mean Curvature Normal approximation at \a v.
- * The mean curvature at \a v is half the magnitude of the vector \a Kh.
- *
- * NOTE: the normal computed is not unit length, and may point either into or out of the surface,
- * depending on the curvature at \a 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
- * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr
- * 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.)
- */
bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh)
{
real area = 0.0;
@@ -175,22 +154,6 @@ bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh)
return true;
}
-/** gts_vertex_gaussian_curvature:
- * \param v: a #WVertex.
- * \param s: a #GtsSurface.
- * \param Kg: the Discrete Gaussian Curvature approximation at \a v.
- *
- * Computes the Discrete Gaussian Curvature approximation at \a v.
- *
- * This approximation is from the paper:
- * Discrete Differential-Geometry Operators for Triangulated 2-Manifolds
- * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr
- * 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.)
- */
bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
{
real area = 0.0;
@@ -226,20 +189,6 @@ bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg)
return true;
}
-/** gts_vertex_principal_curvatures:
- * @Kh: mean curvature.
- * @Kg: Gaussian curvature.
- * @K1: first principal curvature.
- * @K2: second principal curvature.
- *
- * 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().
- *
- * The Gaussian curvature can be computed with gts_vertex_gaussian_curvature().
- */
void gts_vertex_principal_curvatures(real Kh, real Kg, real *K1, real *K2)
{
real temp = Kh * Kh - Kg;
@@ -279,21 +228,6 @@ static void eigenvector(real a, real b, real c, Vec3r e)
e[2] = 0.0;
}
-/** gts_vertex_principal_directions:
- * \param v: a #WVertex.
- * \param s: a #GtsSurface.
- * \param Kh: mean curvature normal (a #Vec3r).
- * \param Kg: Gaussian curvature (a real).
- * \param e1: first principal curvature direction (direction of largest curvature).
- * \param e2: second principal curvature direction.
- *
- * Computes the principal curvature directions at a point given \a Kh and \a 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.
- */
void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, Vec3r &e2)
{
Vec3r N;
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.h b/source/blender/freestyle/intern/winged_edge/Curvature.h
index 0eefc57c3a2..acbe4e8daf6 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.h
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.h
@@ -122,12 +122,75 @@ class Face_Curvature_Info {
#endif
};
+/**
+ * \param v: a #WVertex.
+ * \param Kh: the Mean Curvature Normal at \a v.
+ *
+ * Computes the Discrete Mean Curvature Normal approximation at \a v.
+ * The mean curvature at \a v is half the magnitude of the vector \a Kh.
+ *
+ * \note the normal computed is not unit length, and may point either into or out of the surface,
+ * depending on the curvature at \a 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
+ * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr
+ * 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.)
+ */
bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh);
+/**
+ * \param v: a #WVertex.
+ * \param Kg: the Discrete Gaussian Curvature approximation at \a v.
+ *
+ * Computes the Discrete Gaussian Curvature approximation at \a v.
+ *
+ * This approximation is from the paper:
+ * Discrete Differential-Geometry Operators for Triangulated 2-Manifolds
+ * Mark Meyer, Mathieu Desbrun, Peter Schroder, Alan H. Barr
+ * 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.)
+ */
bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg);
+/**
+ * \param Kh: mean curvature.
+ * \param Kg: Gaussian curvature.
+ * \param K1: first principal curvature.
+ * \param K2: second principal curvature.
+ *
+ * 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().
+ *
+ * The Gaussian curvature can be computed with gts_vertex_gaussian_curvature().
+ */
void gts_vertex_principal_curvatures(real Kh, real Kg, real *K1, real *K2);
+/**
+ * \param v: a #WVertex.
+ * \param Kh: mean curvature normal (a #Vec3r).
+ * \param Kg: Gaussian curvature (a real).
+ * \param e1: first principal curvature direction (direction of largest curvature).
+ * \param e2: second principal curvature direction.
+ *
+ * Computes the principal curvature directions at a point given \a Kh and \a 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.
+ */
void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, Vec3r &e2);
namespace OGF {