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/intern/stroke')
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.cpp47
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.h2
-rw-r--r--source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h5
-rw-r--r--source/blender/freestyle/intern/stroke/Operators.cpp18
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp10
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp16
6 files changed, 49 insertions, 49 deletions
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp
index f7309252aaf..a0709b0e2be 100644
--- a/source/blender/freestyle/intern/stroke/Curve.cpp
+++ b/source/blender/freestyle/intern/stroke/Curve.cpp
@@ -253,12 +253,18 @@ FEdge *CurvePoint::getFEdge(Interface0D &inter)
if (G.debug & G_DEBUG_FREESTYLE) {
printf("__A 0x%p p (%f, %f)\n", __A, __A->getPoint2D().x(), __A->getPoint2D().y());
printf("__B 0x%p p (%f, %f)\n", __B, __B->getPoint2D().x(), __B->getPoint2D().y());
- printf("iVertexB->A() 0x%p p (%f, %f)\n", iVertexB->A(), iVertexB->A()->getPoint2D().x(),
- iVertexB->A()->getPoint2D().y());
- printf("iVertexB->B() 0x%p p (%f, %f)\n", iVertexB->B(), iVertexB->B()->getPoint2D().x(),
- iVertexB->B()->getPoint2D().y());
+ printf("iVertexB->A() 0x%p p (%f, %f)\n",
+ iVertexB->A(),
+ iVertexB->A()->getPoint2D().x(),
+ iVertexB->A()->getPoint2D().y());
+ printf("iVertexB->B() 0x%p p (%f, %f)\n",
+ iVertexB->B(),
+ iVertexB->B()->getPoint2D().x(),
+ iVertexB->B()->getPoint2D().y());
printf("_t2d %f p (%f, %f)\n", _t2d, getPoint2D().x(), getPoint2D().y());
- printf("iVertexB->t2d() %f p (%f, %f)\n", iVertexB->t2d(), iVertexB->getPoint2D().x(),
+ printf("iVertexB->t2d() %f p (%f, %f)\n",
+ iVertexB->t2d(),
+ iVertexB->getPoint2D().x(),
iVertexB->getPoint2D().y());
}
#endif
@@ -315,7 +321,6 @@ float CurvePoint::shape_importance() const
return __A->shape_importance();
}
-
const unsigned CurvePoint::qi() const
{
if (__A == 0)
@@ -404,18 +409,18 @@ real CurvePoint::z_discontinuity() const
#if 0
float CurvePoint::local_average_depth() const
{
- return local_average_depth_function<CurvePoint >(this);
+ return local_average_depth_function<CurvePoint>(this);
}
float CurvePoint::local_depth_variance() const
{
- return local_depth_variance_function<CurvePoint >(this);
+ return local_depth_variance_function<CurvePoint>(this);
}
real CurvePoint::local_average_density(float sigma) const
{
//return local_average_density<CurvePoint >(this);
- return density_function<CurvePoint >(this);
+ return density_function<CurvePoint>(this);
}
Vec3r shaded_color() const;
@@ -484,7 +489,7 @@ real CurvePoint::curvatureFredo() const
return ((1 - _t2d) * __A->curvatureFredo() + _t2d * __B->curvatureFredo());
}
-Vec2d CurvePoint::directionFredo () const
+Vec2d CurvePoint::directionFredo() const
{
if (__A == 0)
return __B->directionFredo();
@@ -676,10 +681,9 @@ Vec3r Curve::orientation2d(point_iterator it) const
return (*it)->orientation2d();
}
-template <class BaseVertex>
-Vec3r Curve::orientation2d(int iCombination) const
+template<class BaseVertex> Vec3r Curve::orientation2d(int iCombination) const
{
- return edge_orientation2d_function<Curve >(this, iCombination);
+ return edge_orientation2d_function<Curve>(this, iCombination);
}
Vec3r Curve::orientation3d(point_iterator it) const
@@ -689,7 +693,7 @@ Vec3r Curve::orientation3d(point_iterator it) const
Vec3r Curve::orientation3d(int iCombination) const
{
- return edge_orientation3d_function<Curve >(this, iCombination);
+ return edge_orientation3d_function<Curve>(this, iCombination);
}
real curvature2d(point_iterator it) const
@@ -702,7 +706,7 @@ real curvature2d(int iCombination = 0) const;
Material Curve::material() const
{
const_vertex_iterator v = vertices_begin(), vend = vertices_end();
- const Material& mat = (*v)->material();
+ const Material &mat = (*v)->material();
for (; v != vend; ++v) {
if ((*v)->material() != mat)
Exception::raiseException();
@@ -747,7 +751,7 @@ bool Curve::occluders_empty() const
return empty;
}
-const Polygon3r& occludee() const
+const Polygon3r &occludee() const
{
return *(_FEdgeA->aFace());
}
@@ -789,7 +793,6 @@ int Curve::shape_id() const
return id.first;
}
-
const SShape *Curve::shape() const
{
const_vertex_iterator v = vertices_begin(), vend = vertices_end();
@@ -801,14 +804,12 @@ const SShape *Curve::shape() const
return sshape;
}
-
occluder_container::const_iterator Curve::occluders_begin() const
{
const_vertex_iterator v = vertices_begin();
return (*v)->occluders_begin();
}
-
occluder_container::const_iterator Curve::occluders_end() const
{
const_vertex_iterator v = vertices_end();
@@ -835,7 +836,7 @@ float Curve::local_average_depth(int iCombination) const
return local_average_depth_edge_function<Curve>(this, iCombination);
}
-float Curve::local_depth_variance(int iCombination ) const
+float Curve::local_depth_variance(int iCombination) const
{
return local_depth_variance_edge_function<Curve>(this, iCombination);
# if 0
@@ -846,7 +847,7 @@ float Curve::local_depth_variance(int iCombination ) const
# endif
}
-real Curve::local_average_density(float sigma, int iCombination ) const
+real Curve::local_average_density(float sigma, int iCombination) const
{
return density_edge_function<Curve>(this, iCombination);
# if 0
@@ -860,7 +861,7 @@ real Curve::local_average_density(float sigma, int iCombination ) const
/* UNUSED */
// #define EPS_CURVA_DIR 0.01
-void Curve::computeCurvatureAndOrientation ()
+void Curve::computeCurvatureAndOrientation()
{
const_vertex_iterator v = vertices_begin(), vend = vertices_end(), v2, prevV, v0;
Vec2d p0, p1, p2;
@@ -874,7 +875,7 @@ void Curve::computeCurvatureAndOrientation ()
p1 = Vec2d(p[0], p[1]);
Vec2d prevDir(p1 - p0);
- for (; v! = vend; ++v) {
+ for (; v ! = vend; ++v) {
v2 = v;
++v2;
if (v2 == vend)
diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h
index 234f9df0e48..2a1d80f3029 100644
--- a/source/blender/freestyle/intern/stroke/Curve.h
+++ b/source/blender/freestyle/intern/stroke/Curve.h
@@ -525,7 +525,7 @@ class Curve : public Interface1D {
int occluders_size() const;
bool occluders_empty() const;
- const Polygon3r& occludee() const
+ const Polygon3r &occludee() const
{
return *(_FEdgeA->aFace());
}
diff --git a/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h b/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
index 3cd55facd15..f993c21ddb6 100644
--- a/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
+++ b/source/blender/freestyle/intern/stroke/CurveAdvancedIterators.h
@@ -66,7 +66,7 @@ class __point_iterator : public IteratorBase<Traits, BidirectionalIteratorTag_Tr
typedef __point_iterator<CurvePoint_const_traits> const_iterator;
#if 0
- typedef Vertex vertex_type ;
+ typedef Vertex vertex_type;
typedef vertex_container_iterator vertex_iterator_type;
typedef CurvePoint<Vertex> Point;
typedef Point point_type;
@@ -76,7 +76,8 @@ class __point_iterator : public IteratorBase<Traits, BidirectionalIteratorTag_Tr
# if defined(__GNUC__) && (__GNUC__ < 3)
typedef bidirectional_iterator<CurvePoint<Vertex>, ptrdiff_t> bidirectional_point_iterator;
# else
- typedef iterator<bidirectional_iterator_tag, CurvePoint<Vertex>, ptrdiff_t> bidirectional_point_iterator;
+ typedef iterator<bidirectional_iterator_tag, CurvePoint<Vertex>, ptrdiff_t>
+ bidirectional_point_iterator;
# endif
#endif
friend class Curve;
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp
index 2c8a83e2518..fc4d099061c 100644
--- a/source/blender/freestyle/intern/stroke/Operators.cpp
+++ b/source/blender/freestyle/intern/stroke/Operators.cpp
@@ -206,7 +206,9 @@ error:
}
#if 0
-void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred, UnaryFunction1D_void& modifier)
+void Operators::bidirectionalChain(ViewEdgeIterator &it,
+ UnaryPredicate1D &pred,
+ UnaryFunction1D_void &modifier)
{
if (_current_view_edges_set.empty())
return;
@@ -217,12 +219,11 @@ void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred,
for (I1DContainer::iterator it_edge = _current_view_edges_set.begin();
it_edge != _current_view_edges_set.end();
- ++it_edge)
- {
+ ++it_edge) {
if (pred(**it_edge))
continue;
- edge = dynamic_cast<ViewEdge*>(*it_edge);
+ edge = dynamic_cast<ViewEdge *>(*it_edge);
it.setBegin(edge);
it.setCurrentEdge(edge);
@@ -253,7 +254,7 @@ void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred,
_current_set = &_current_chains_set;
}
-void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred)
+void Operators::bidirectionalChain(ViewEdgeIterator &it, UnaryPredicate1D &pred)
{
if (_current_view_edges_set.empty())
return;
@@ -267,12 +268,11 @@ void Operators::bidirectionalChain(ViewEdgeIterator& it, UnaryPredicate1D& pred)
for (I1DContainer::iterator it_edge = _current_view_edges_set.begin();
it_edge != _current_view_edges_set.end();
- ++it_edge)
- {
+ ++it_edge) {
if (pred(**it_edge) || pred_ts(**it_edge))
continue;
- edge = dynamic_cast<ViewEdge*>(*it_edge);
+ edge = dynamic_cast<ViewEdge *>(*it_edge);
it.setBegin(edge);
it.setCurrentEdge(edge);
@@ -835,7 +835,7 @@ static int __recursiveSplit(Chain *_curve,
CurveInternal::CurvePointIterator split = second;
Interface0DIterator it0d = it.castToInterface0DIterator();
#if 0
- real _min = func(it0d);
+ real _min = func(it0d);
++it;
#endif
real _min = FLT_MAX;
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index 7b6e53138bb..ef40865ecf1 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -834,7 +834,6 @@ Stroke::vertex_container::reverse_iterator Stroke::vertices_last(float sampling)
return _Vertices.rbegin();
}
-
inline Vec3r shaded_color(int iCombination = 0) const;
inline Vec<3, real> Stroke::orientation2d(const_vertex_iterator it) const
@@ -871,7 +870,7 @@ Material Stroke::material() const
int Stroke::qi() const
{
const_vertex_iterator v = vertices_begin(), vend = vertices_end();
- int qi_= (*v)->qi();
+ int qi_ = (*v)->qi();
for (; v != vend; ++v) {
if ((*v)->qi() != qi_)
Exception::raiseException();
@@ -965,10 +964,9 @@ float Stroke::shape_importance(int iCombination) const
return shape_importance_edge_function<Stroke>(*this, iCombination);
}
-
-float Stroke::local_average_depth(int iCombination ) const
+float Stroke::local_average_depth(int iCombination) const
{
- return local_average_depth_edge_function<Stroke >(*this, iCombination);
+ return local_average_depth_edge_function<Stroke>(*this, iCombination);
}
float Stroke::local_depth_variance(int iCombination) const
@@ -976,7 +974,7 @@ float Stroke::local_depth_variance(int iCombination) const
return local_depth_variance_edge_function<Stroke>(*this, iCombination);
}
-real Stroke::local_average_density(float sigma , int iCombination ) const
+real Stroke::local_average_density(float sigma, int iCombination) const
{
return density_edge_function<Stroke>(*this, iCombination);
}
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 026a7b2fc8f..f1483e80083 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -105,7 +105,7 @@ static bool notValid(Vec2r p)
}
#if 0
-static real crossP(const Vec2r& A, const Vec2r& B)
+static real crossP(const Vec2r &A, const Vec2r &B)
{
return A[0] * B[1] - A[1] * B[0];
}
@@ -498,8 +498,8 @@ void Strip::setVertexColor(const vector<StrokeVertex *> &iStrokeVertices)
_vertices[i]->setAlpha(sv->attribute().getAlpha());
i++;
#if 0
- cerr << "col=("<<sv->attribute().getColor()[0] << ", "
- << sv->attribute().getColor()[1] << ", " << sv->attribute().getColor()[2] << ")" << endl;
+ cerr << "col=(" << sv->attribute().getColor()[0] << ", " << sv->attribute().getColor()[1]
+ << ", " << sv->attribute().getColor()[2] << ")" << endl;
#endif
}
}
@@ -545,8 +545,8 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
fact = (float(tiles) + 0.5) / l;
#if 0
- cerr << "l=" << l << " tiles=" << tiles << " _averageThicnkess="
- << _averageThickness << " strokeLength=" << (*v)->strokeLength() << endl;
+ cerr << "l=" << l << " tiles=" << tiles << " _averageThicnkess=" << _averageThickness
+ << " strokeLength=" << (*v)->strokeLength() << endl;
#endif
vector<StrokeVertexRep *>::iterator currentSV = _vertices.begin();
@@ -690,7 +690,7 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
for (i = 0; i < _sizeStrip; i++)
cerr << "(" << _texCoord[i][0] << ", " << _texCoord[i][1] << ") ";
- cerr << endl;
+ cerr << endl;
Vec2r vec_tmp;
for (i = 0; i < _sizeStrip / 2; i++)
@@ -718,7 +718,7 @@ StrokeRep::StrokeRep()
if (ptm)
_textureId = ptm->getDefaultTextureId();
#if 0
- _averageTextureAlpha = 0.5; //default value
+ _averageTextureAlpha = 0.5; //default value
if (_strokeType == OIL_STROKE)
_averageTextureAlpha = 0.75;
if (_strokeType >= NO_BLEND_STROKE)
@@ -749,7 +749,7 @@ StrokeRep::StrokeRep(Stroke *iStroke)
}
#if 0
- _averageTextureAlpha = 0.5; //default value
+ _averageTextureAlpha = 0.5; //default value
if (_strokeType == OIL_STROKE)
_averageTextureAlpha = 0.75;
if (_strokeType >= NO_BLEND_STROKE)