Cleanup: trailing space for freestyle

This commit is contained in:
Campbell Barton 2018-06-17 17:05:14 +02:00
parent e74bd46ede
commit 410880552b
83 changed files with 164 additions and 164 deletions

View File

@ -64,7 +64,7 @@ void AppCanvas::setViewer(AppView *iViewer)
_pViewer = iViewer;
}
int AppCanvas::width() const
int AppCanvas::width() const
{
return _pViewer->width();
}
@ -84,7 +84,7 @@ float AppCanvas::thickness() const
return _pViewer->thickness();
}
BBox<Vec3r> AppCanvas::scene3DBBox() const
BBox<Vec3r> AppCanvas::scene3DBBox() const
{
return _pViewer->scene3DBBox();
}

View File

@ -471,11 +471,11 @@ void Controller::ComputeViewMap()
// retrieve the 3D viewpoint and transformations information
//----------------------------------------------------------
// Save the viewpoint context at the view level in order
// Save the viewpoint context at the view level in order
// to be able to restore it later:
// Restore the context of view:
// we need to perform all these operations while the
// we need to perform all these operations while the
// 3D context is on.
Vec3f vp(UNPACK3(g_freestyle.viewpoint));

View File

@ -668,7 +668,7 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
}
}
// We might have several times the same vertex. We want a clean
// We might have several times the same vertex. We want a clean
// shape with no real-vertex. Here, we are making a cleaning pass.
float *cleanVertices = NULL;
unsigned int cvSize;

View File

@ -113,7 +113,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
freestyle_scene->r.gauss = old_scene->r.gauss;
freestyle_scene->r.dither_intensity = old_scene->r.dither_intensity;
BLI_strncpy(freestyle_scene->r.engine, old_scene->r.engine, sizeof(freestyle_scene->r.engine));
freestyle_scene->r.im_format.planes = R_IMF_PLANES_RGBA;
freestyle_scene->r.im_format.planes = R_IMF_PLANES_RGBA;
freestyle_scene->r.im_format.imtype = R_IMF_IMTYPE_PNG;
if (G.debug & G_DEBUG_FREESTYLE) {

View File

@ -96,7 +96,7 @@ static bCallbackFuncStore load_post_callback_funcstore = {
};
//=======================================================
// Initialization
// Initialization
//=======================================================
void FRS_initialize()
@ -133,7 +133,7 @@ void FRS_exit()
}
//=======================================================
// Rendering
// Rendering
//=======================================================
static void init_view(Render *re)

View File

@ -32,7 +32,7 @@
namespace Freestyle {
/*! Class to define a regular grid used for ray casting computations
/*! Class to define a regular grid used for ray casting computations
* We don't use a hashtable here. The grid is explicitly stored for faster computations.
* However, this might result in significant increase in memory usage (compared to the regular grid)
*/

View File

@ -61,7 +61,7 @@ static double V2SquaredLength(Vector2 *a)
}
/* returns length of input vector */
static double V2Length(Vector2 *a)
static double V2Length(Vector2 *a)
{
return (sqrt(V2SquaredLength(a)));
}
@ -96,7 +96,7 @@ static Vector2 *V2Add(Vector2 *a, Vector2 *b, Vector2 *c)
(*c)[0] = (*a)[0] + (*b)[0];
(*c)[1] = (*a)[1] + (*b)[1];
return c;
}
}
/* normalizes the input vector and returns it */
static Vector2 *V2Normalize(Vector2 *v)

View File

@ -90,7 +90,7 @@ public:
* Control points of the sets of bezier curve segments.
* Each segment is made of 4 points (polynomial degree of curve = 3)
* error
* max error tolerance between resulting curve and input data
* max error tolerance between resulting curve and input data
*/
void FitCurve(std::vector<Vec2d>& data, std::vector<Vec2d>& oCurve, double error);

View File

@ -174,7 +174,7 @@ void fromWorldToImage(const Vec3r& p, Vec3r& q, const real model_view_matrix[4][
*/
void fromWorldToImage(const Vec3r& p, Vec3r& q, const real transform[4][4], const int viewport[4]);
/*! Projects from world coordinates to camera coordinates
/*! Projects from world coordinates to camera coordinates
* Returns the point's coordinates expressed in the camera's
* coordinates system.
* p
@ -220,7 +220,7 @@ void fromRetinaToImage(const Vec3r& p, Vec3r& q, const int viewport[4]);
*/
void fromImageToRetina(const Vec3r& p, Vec3r& q, const int viewport[4]);
/*! computes the coordinates of q in the camera coordinates system,
/*! computes the coordinates of q in the camera coordinates system,
* using the known z coordinates of the 3D point.
* That means that this method does not inverse any matrices,
* it only computes X and Y from x,y and Z)

View File

@ -242,7 +242,7 @@ bool Grid::nextRayCell(Vec3u& current_cell, Vec3u& next_cell)
real t_min, t;
unsigned i;
t_min = FLT_MAX; // init tmin with handle of the case where one or 2 _u[i] = 0.
t_min = FLT_MAX; // init tmin with handle of the case where one or 2 _u[i] = 0.
unsigned coord = 0; // predominant coord(0=x, 1=y, 2=z)

View File

@ -73,7 +73,7 @@ T closestPointToSegment(const T& P, const T& A, const T& B, real& distance)
distance = PPb.norm();
return Pb; // closest point lies on AB
}
}
inline Vec3r closestPointOnPolygon(const Vec3r& point, const Polygon3r& poly)
{

View File

@ -216,7 +216,7 @@ struct binary_rule
template<class T, class Point>
class SweepLine
class SweepLine
{
public:
SweepLine() {}
@ -231,7 +231,7 @@ public:
}
}
inline void process(Point& p, vector<Segment<T, Point>*>& segments,
inline void process(Point& p, vector<Segment<T, Point>*>& segments,
#if 0
binary_rule<Segment<T, Point>,Segment<T, Point> >& binrule = \
binary_rule<Segment<T, Point>, Segment<T, Point> >(),

View File

@ -150,21 +150,21 @@ public:
Vec<T, N> res(v);
res += *this;
return res;
}
}
inline Vec<T, N> operator-(const Vec<T, N>& v) const
{
Vec<T, N> res(*this);
res -= v;
return res;
}
}
inline Vec<T, N> operator*(const typename Vec<T, N>::value_type r) const
{
Vec<T, N> res(*this);
res *= r;
return res;
}
}
inline Vec<T, N> operator/(const typename Vec<T, N>::value_type r) const
{
@ -172,7 +172,7 @@ public:
if (r)
res /= r;
return res;
}
}
// dot product
inline value_type operator*(const Vec<T, N>& v) const
@ -181,7 +181,7 @@ public:
for (unsigned int i = 0; i < N; i++)
sum += (*this)[i] * v[i];
return sum;
}
}
template <class U>
inline Vec<T, N>& operator=(const Vec<U, N>& v)
@ -255,7 +255,7 @@ public:
if (this->_coord[i] == v[i])
continue;
}
return false;
return false;
}
inline bool operator>(const Vec<T, N>& v) const
@ -268,7 +268,7 @@ public:
if (this->_coord[i] == v[i])
continue;
}
return false;
return false;
}
protected:

View File

@ -95,7 +95,7 @@ namespace MatrixUtil {
// Ugly Fortran-porting trick: indices for v are between 1 and n
v--;
// Step 3 : compute the weight of the non diagonal terms
// Step 3 : compute the weight of the non diagonal terms
ij = 1;
a_norm = 0.0;
for (i = 1; i <= n; i++) {
@ -240,7 +240,7 @@ namespace MatrixUtil {
index[i] = jj;
}
// Step 7: save the eigen vectors
// Step 7: save the eigen vectors
// back from Fortran to to C++
v++;

View File

@ -120,7 +120,7 @@ protected:
};
/*
#############################################
#############################################
#############################################
@ -130,7 +130,7 @@ protected:
#############################################
#############################################
#############################################
*/
template<class Map>

View File

@ -89,7 +89,7 @@ PyObject *Vector_from_Vec3f(Vec3f& vec)
float vec_data[3]; // because vec->_coord is protected
vec_data[0] = vec.x();
vec_data[1] = vec.y();
vec_data[2] = vec.z();
vec_data[2] = vec.z();
return Vector_CreatePyObject(vec_data, 3, NULL);
}
@ -356,7 +356,7 @@ PyObject *BPy_SShape_from_SShape(SShape& ss)
PyObject *py_ss = SShape_Type.tp_new(&SShape_Type, 0, 0);
((BPy_SShape *)py_ss)->ss = &ss;
((BPy_SShape *)py_ss)->borrowed = true;
return py_ss;
return py_ss;
}
PyObject *BPy_ViewShape_from_ViewShape(ViewShape& vs)

View File

@ -40,7 +40,7 @@ using namespace Freestyle::Geometry;
#include "../geometry/BBox.h"
// FEdge, FEdgeSharp, FEdgeSmooth, SShape, SVertex, FEdgeInternal::SVertexIterator
#include "../view_map/Silhouette.h"
#include "../view_map/Silhouette.h"
// Id
#include "../system/Id.h"

View File

@ -486,7 +486,7 @@ static PyModuleDef module_definition = {
PyObject *Freestyle_Init(void)
{
PyObject *module;
// initialize modules
module = PyModule_Create(&module_definition);
if (!module)
@ -509,9 +509,9 @@ PyObject *Freestyle_Init(void)
else {
printf("Freestyle: couldn't find 'scripts/freestyle/modules', Freestyle won't work properly.\n");
}
// attach its classes (adding the object types to the module)
// those classes have to be initialized before the others
MediumType_Init(module);
Nature_Init(module);

View File

@ -216,7 +216,7 @@ static PyLongObject _IntegrationType_LAST = {
int IntegrationType_Init(PyObject *module)
{
PyObject *m, *d, *f;
if (module == NULL)
return -1;
@ -230,7 +230,7 @@ int IntegrationType_Init(PyObject *module)
PyDict_SetItemString(IntegrationType_Type.tp_dict, "MAX", BPy_IntegrationType_MAX);
PyDict_SetItemString(IntegrationType_Type.tp_dict, "FIRST", BPy_IntegrationType_FIRST);
PyDict_SetItemString(IntegrationType_Type.tp_dict, "LAST", BPy_IntegrationType_LAST);
m = PyModule_Create(&module_definition);
if (m == NULL)
return -1;

View File

@ -59,7 +59,7 @@ int Interface0D_Init(PyObject *module)
if (PyType_Ready(&SVertex_Type) < 0)
return -1;
Py_INCREF(&SVertex_Type);
PyModule_AddObject(module, "SVertex", (PyObject *)&SVertex_Type);
PyModule_AddObject(module, "SVertex", (PyObject *)&SVertex_Type);
if (PyType_Ready(&ViewVertex_Type) < 0)
return -1;

View File

@ -103,7 +103,7 @@ PyLongObject _BPy_MediumType_OPAQUE_MEDIUM = {
//-------------------MODULE INITIALIZATION--------------------------------
int MediumType_Init(PyObject *module)
{
{
if (module == NULL)
return -1;

View File

@ -232,11 +232,11 @@ static PyObject *SShape_vertices_get(BPy_SShape *self, void *UNUSED(closure))
vector< SVertex * >::iterator it;
PyObject *py_vertices = PyList_New(vertices.size());
unsigned int i = 0;
for (it = vertices.begin(); it != vertices.end(); it++) {
PyList_SET_ITEM(py_vertices, i++, BPy_SVertex_from_SVertex(*(*it)));
}
return py_vertices;
}
@ -252,11 +252,11 @@ static PyObject *SShape_edges_get(BPy_SShape *self, void *UNUSED(closure))
vector< FEdge * >::iterator it;
PyObject *py_edges = PyList_New(edges.size());
unsigned int i = 0;
for (it = edges.begin(); it != edges.end(); it++) {
PyList_SET_ITEM(py_edges, i++, Any_BPy_FEdge_from_FEdge(*(*it)));
}
return py_edges;
}

View File

@ -216,7 +216,7 @@ static PyObject *StrokeShader_shade(BPy_StrokeShader *self, PyObject *args, PyOb
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Stroke_Type, &py_s))
return NULL;
if (typeid(*(self->ss)) == typeid(StrokeShader)) {
PyErr_SetString(PyExc_TypeError, "shade method not properly overridden");
return NULL;

View File

@ -161,9 +161,9 @@ static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self, PyObject
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &py_if1D))
return NULL;
Interface1D *if1D = ((BPy_Interface1D *)py_if1D)->if1D;
if (!if1D) {
string class_name(Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_RuntimeError, (class_name + " has no Interface1D").c_str());

View File

@ -222,7 +222,7 @@ static int ViewShape_vertices_set(BPy_ViewShape *self, PyObject *value, void *UN
{
PyObject *item;
vector< ViewVertex *> v;
if (!PyList_Check(value)) {
PyErr_SetString(PyExc_TypeError, "value must be a list of ViewVertex objects");
return -1;

View File

@ -35,7 +35,7 @@ extern "C" {
//------------------------INSTANCE METHODS ----------------------------------
//ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0)
//ViewMapGradientNormBP1D(int level, IntegrationType iType=MEAN, float sampling=2.0)
static char ViewMapGradientNormBP1D___doc__[] =
"Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`ViewMapGradientNormBP1D`\n"

View File

@ -325,7 +325,7 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, void *py_uf1D, Interface1D
vec.push_back(b);
}
((UnaryFunction1D< vector<ViewShape*> > *)uf1D)->result = vec;
}
}
Py_DECREF(result);
return 0;
}

View File

@ -53,7 +53,7 @@ int Director_BPy_UnaryFunction1D___call__(void *uf1D, void *py_uf1D, Interface1D
// UnaryPredicate0D: __call__
int Director_BPy_UnaryPredicate0D___call__(UnaryPredicate0D *up0D, Interface0DIterator& if0D_it);
// UnaryPredicate1D: __call__
int Director_BPy_UnaryPredicate1D___call__(UnaryPredicate1D *up1D, Interface1D& if1D);

View File

@ -341,7 +341,7 @@ PyDoc_STRVAR(SVertex_normals_doc,
static PyObject *SVertex_normals_get(BPy_SVertex *self, void *UNUSED(closure))
{
PyObject *py_normals;
PyObject *py_normals;
set< Vec3r > normals = self->sv->normals();
set< Vec3r >::iterator it;
py_normals = PyList_New(normals.size());

View File

@ -314,7 +314,7 @@ static PyObject *Stroke_stroke_vertices_size(BPy_Stroke *self)
return PyLong_FromLong(self->s->strokeVerticesSize());
}
static PyMethodDef BPy_Stroke_methods[] = {
static PyMethodDef BPy_Stroke_methods[] = {
{"compute_sampling", (PyCFunction)Stroke_compute_sampling, METH_VARARGS | METH_KEYWORDS,
Stroke_compute_sampling_doc},
{"resample", (PyCFunction)Stroke_resample, METH_VARARGS | METH_KEYWORDS, Stroke_resample_doc},

View File

@ -182,7 +182,7 @@ PyDoc_STRVAR(ViewEdge_viewshape_doc,
":type: :class:`ViewShape`");
static PyObject *ViewEdge_viewshape_get(BPy_ViewEdge *self, void *UNUSED(closure))
{
{
ViewShape *vs = self->ve->viewShape();
if (vs)
return BPy_ViewShape_from_ViewShape(*vs);

View File

@ -98,7 +98,7 @@ static int ChainSilhouetteIterator_init(BPy_ChainSilhouetteIterator *self, PyObj
bool restrict_to_selection = (!obj1) ? true : bool_from_PyBool(obj1);
ViewEdge *begin = (!obj2 || obj2 == Py_None) ? NULL : ((BPy_ViewEdge *)obj2)->ve;
bool orientation = (!obj3) ? true : bool_from_PyBool(obj3);
self->cs_it = new ChainSilhouetteIterator(restrict_to_selection, begin, orientation);
self->cs_it = new ChainSilhouetteIterator(restrict_to_selection, begin, orientation);
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument(s)");

View File

@ -161,15 +161,15 @@ static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObj
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_double = new UnaryFunction1D<double>();
else {
self->uf1D_double = new UnaryFunction1D<double>(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_double->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -83,15 +83,15 @@ static int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature *sel
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>();
else {
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_edgenature->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -76,15 +76,15 @@ static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObjec
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_float = new UnaryFunction1D<float>();
else {
self->uf1D_float = new UnaryFunction1D<float>(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_float->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -83,15 +83,15 @@ static int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned *self, P
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>();
else {
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_unsigned->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -89,15 +89,15 @@ static int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f *self, PyObjec
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>();
else {
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_vec2f->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -83,15 +83,15 @@ static int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f *self, PyObjec
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>();
else {
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_vec3f->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -97,16 +97,16 @@ static int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorView
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj) {
self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector<ViewShape*> >();
}
else {
self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector<ViewShape*> >(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_vectorviewshape->py_uf1D = (PyObject *)self;
return 0;
}
@ -149,7 +149,7 @@ static PyObject *UnaryFunction1DVectorViewShape___call__(BPy_UnaryFunction1DVect
ViewShape *v = self->uf1D_vectorviewshape->result[i];
PyList_SET_ITEM(list, i, v ? BPy_ViewShape_from_ViewShape(*v) : (Py_INCREF(Py_None), Py_None));
}
return list;
}

View File

@ -96,15 +96,15 @@ static int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid *self, PyObject
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &IntegrationType_Type, &obj))
return -1;
if (!obj)
self->uf1D_void = new UnaryFunction1D_void();
else {
self->uf1D_void = new UnaryFunction1D_void(IntegrationType_from_BPy_IntegrationType(obj));
}
self->uf1D_void->py_uf1D = (PyObject *)self;
return 0;
}

View File

@ -90,7 +90,7 @@ public:
* - TRIANGLES : the face indices describe single triangles
* If iCopy != 0, the array is copied; you must desallocate iFaceStyle. Else you must not.
* iVIndices,
* Array of vertices indices.
* Array of vertices indices.
* The integers contained in this array must be multiple of 3.
* If iCopy != 0, the array is copied; you must desallocate iVIndices. Else you must not.
* iVISize

View File

@ -39,7 +39,7 @@ void LineRep::ComputeBBox()
real YMin = _vertices.front()[1];
real ZMin = _vertices.front()[2];
// parse all the coordinates to find
// parse all the coordinates to find
// the XMax, YMax, ZMax
vector<Vec3r>::iterator v;
for (v = _vertices.begin(); v != _vertices.end(); ++v) {

View File

@ -104,7 +104,7 @@ public:
protected:
private:
private:
BBox<Vec3r> _BBox;
#ifdef WITH_CXX_GUARDEDALLOC

View File

@ -52,7 +52,7 @@ public:
} CameraType;
/*! Default matrices: Identity for both projection and modelview. */
NodeCamera(CameraType camera_type = GENERIC);
NodeCamera(CameraType camera_type = GENERIC);
#if 0 /* UNUSED, gives warning in gcc */
NodeCamera(const NodeCamera& iBrother);
#endif

View File

@ -48,7 +48,7 @@ public:
/*! Adds a child. Makes a addRef on the iChild reference counter */
virtual void AddChild(Node *iChild);
/*! destroys all the underlying nodes
/*! destroys all the underlying nodes
* Returns the reference counter after having done a release()
*/
virtual int destroy();

View File

@ -37,7 +37,7 @@ NodeLight::NodeLight() : Node()
_number = 7;
}
else {
_number = numberOfLights;
_number = numberOfLights;
numberOfLights++;
}
@ -61,7 +61,7 @@ NodeLight::NodeLight(NodeLight& iBrother) : Node(iBrother)
_number = 7;
}
else {
_number = numberOfLights;
_number = numberOfLights;
numberOfLights++;
}

View File

@ -41,7 +41,7 @@ using namespace Geometry;
class NodeLight : public Node
{
public:
NodeLight();
NodeLight();
NodeLight(NodeLight& iBrother);
virtual ~NodeLight() {}

View File

@ -97,7 +97,7 @@ public:
return *this;
}
virtual ~Rep()
virtual ~Rep()
{
if (0 != _FrsMaterial) {
delete _FrsMaterial;

View File

@ -28,7 +28,7 @@
* \date 16/12/2002
*/
//! inherits from class Rep
//! inherits from class Rep
#include "Rep.h"
namespace Freestyle {

View File

@ -109,7 +109,7 @@ private:
int _level;
public:
/*! Builds the functor from name of the
/*! Builds the functor from name of the
* Map that must be read.
* \param iMapName
* The name of the map.
@ -171,7 +171,7 @@ private:
int _level;
public:
/*! Builds the functor
/*! Builds the functor
* \param level
* The level of the pyramid from which the pixel must be read.
*/
@ -199,7 +199,7 @@ private:
float _step;
public:
/*! Builds the functor
/*! Builds the functor
* \param level
* The level of the pyramid from which the pixel must be read.
*/

View File

@ -114,7 +114,7 @@ int GetDirectionalViewMapDensityF1D::operator()(Interface1D& inter)
//soc unsigned size;
result = integrate(_fun, inter.pointsBegin(_sampling), inter.pointsEnd(_sampling), _integration);
return 0;
}
}
int GetCompleteViewMapDensityF1D::operator()(Interface1D& inter)
{

View File

@ -135,7 +135,7 @@ class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double>
public:
/*! Builds the functor.
* \param level
* The level of the pyramid from which
* The level of the pyramid from which
* the pixel must be read.
* \param iType
* The integration method used to compute

View File

@ -61,7 +61,7 @@ public:
protected:
real _maxThickness;
real _minThickness;
Vec2f _orientation;
Vec2f _orientation;
bool _clamp;
};

View File

@ -405,7 +405,7 @@ public:
class BackboneStretcherShader : public StrokeShader
{
private:
float _amount;
float _amount;
public:
/*! Builds the shader.
@ -524,7 +524,7 @@ public:
* The smaller, the closer the new stroke to the orinal one.
* This error corresponds to the maximum distance between the new stroke and the old one.
*/
PolygonalizationShader(float iError) : StrokeShader()
PolygonalizationShader(float iError) : StrokeShader()
{
_error = iError;
}
@ -594,7 +594,7 @@ public:
virtual int shade(Stroke &stroke) const;
protected:
real _tipLength;
real _tipLength;
};
/*! [ Texture Shader ].

View File

@ -128,7 +128,7 @@ public:
void Clear();
/* Erases the layers */
virtual void Erase();
virtual void Erase();
/* Reads a pixel area from the canvas */
virtual void readColorPixels(int x, int y, int w, int h, RGBImage& oImage) const = 0;

View File

@ -80,7 +80,7 @@ public:
{
_internalIterator = iBrother._internalIterator;
_restrictToSelection = iBrother._restrictToSelection;
_restrictToUnvisited = iBrother._restrictToUnvisited;
_restrictToUnvisited = iBrother._restrictToUnvisited;
return *this;
}
@ -289,7 +289,7 @@ public:
*/
virtual int traverse(const AdjacencyIterator& it);
/*! Inits the iterator context */
/*! Inits the iterator context */
virtual int init()
{
return 0;

View File

@ -64,7 +64,7 @@ BBox<Vec2i> GetBorderCF();
void LoadMapCF(const char *iFileName, const char *iMapName, unsigned iNbLevels = 4, float iSigma = 1.0f);
// ReadMapPixel
/*! Reads a pixel in a user-defined map
/*! Reads a pixel in a user-defined map
* \return the floating value stored for that pixel
* \param iMapName
* The name of the map

View File

@ -317,7 +317,7 @@ float CurvePoint::shape_importance() const
if (__A == 0)
return __B->shape_importance();
return __A->shape_importance();
}
}
const unsigned CurvePoint::qi() const

View File

@ -94,7 +94,7 @@ public: // Implementation of Interface0D
return _Point3d.z();
}
/*! Returns the 3D point. */
/*! Returns the 3D point. */
virtual Vec3r getPoint3D() const
{
return _Point3d;
@ -118,7 +118,7 @@ public: // Implementation of Interface0D
return _Point2d.z();
}
/*! Returns the 2D point. */
/*! Returns the 2D point. */
virtual Vec2r getPoint2D() const
{
return Vec2r(_Point2d.x(), _Point2d.y());
@ -444,7 +444,7 @@ public:
}
/*! Adds a single vertex (SVertex) at the end of the Curve */
inline void push_vertex_back(SVertex *iVertex)
inline void push_vertex_back(SVertex *iVertex)
{
if (!_Vertices.empty()) {
Vec3r vec_tmp(iVertex->point2d() - _Vertices.back()->point2d());
@ -456,7 +456,7 @@ public:
}
/*! Adds a single vertex (CurvePoint) at the front of the Curve */
inline void push_vertex_front(Vertex *iVertex)
inline void push_vertex_front(Vertex *iVertex)
{
if (!_Vertices.empty()) {
Vec3r vec_tmp(iVertex->point2d() - _Vertices.front()->point2d());
@ -468,7 +468,7 @@ public:
}
/*! Adds a single vertex (SVertex) at the front of the Curve */
inline void push_vertex_front(SVertex *iVertex)
inline void push_vertex_front(SVertex *iVertex)
{
if (!_Vertices.empty()) {
Vec3r vec_tmp(iVertex->point2d() - _Vertices.front()->point2d());

View File

@ -39,7 +39,7 @@ class CurvePoint_const_traits : public Const_traits<CurvePoint*>
public:
typedef deque<CurvePoint*> vertex_container;
typedef vertex_container::const_iterator vertex_container_iterator;
typedef SVertex vertex_type;
typedef SVertex vertex_type;
};
class CurvePoint_nonconst_traits : public Nonconst_traits<CurvePoint*>
@ -47,7 +47,7 @@ class CurvePoint_nonconst_traits : public Nonconst_traits<CurvePoint*>
public:
typedef deque<CurvePoint*> vertex_container;
typedef vertex_container::iterator vertex_container_iterator;
typedef SVertex vertex_type;
typedef SVertex vertex_type;
};
/**********************************/
@ -325,7 +325,7 @@ protected:
}
}
virtual void decrement()
virtual void decrement()
{
if (_Point != 0) {
delete _Point;

View File

@ -35,13 +35,13 @@ namespace Freestyle {
namespace CurveInternal {
/*! iterator on a curve. Allows an iterating outside
/*! iterator on a curve. Allows an iterating outside
* initial vertices. A CurvePoint is instanciated an returned
* when the iterator is dereferenced.
*/
class CurvePointIterator : public Interface0DIteratorNested
{
{
public:
friend class Freestyle::Curve;

View File

@ -704,7 +704,7 @@ static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryP
if (newId == 0) {
newId = new Id(_curve->getId());
_curve->setSplittingId(newId);
}
}
Chain *new_curve_a = new Chain(*newId);
newId->setSecond(newId->getSecond() + 1);
@ -791,9 +791,9 @@ int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& p
if (!splitted_chains.empty()) {
for (cit = splitted_chains.begin(), citend = splitted_chains.end(); cit != citend; ++cit) {
delete (*cit);
}
}
splitted_chains.clear();
}
}
_current_chains_set.clear();
#if 0
@ -1036,7 +1036,7 @@ static Stroke *createStroke(Interface1D& inter)
Vec2r previous = current;
SVertex *sv;
CurvePoint *cp;
StrokeVertex *stroke_vertex = NULL;
StrokeVertex *stroke_vertex = NULL;
bool hasSingularity = false;
do {

View File

@ -94,7 +94,7 @@ public:
* \param pred
* The predicate on the ViewEdge that expresses the stopping condition.
*/
static int chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred);
static int chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred);
/*! Builds a set of chains from the current set of ViewEdges.
* Each ViewEdge of the current list potentially starts a new chain. The chaining operator then iterates over

View File

@ -565,7 +565,7 @@ public:
* \param iBegin
* The iterator pointing to the first vertex.
* \param iEnd
* The iterator pointing to the end of the vertex list.
* The iterator pointing to the end of the vertex list.
*/
template<class InputVertexIterator>
Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd);
@ -601,7 +601,7 @@ public:
* Resamples the curve with a given sampling.
* If this sampling is < to the actual sampling value, no resampling is done.
* \param iSampling
* The new sampling value.
* The new sampling value.
*/
int Resample(float iSampling);
@ -609,7 +609,7 @@ public:
*/
void RemoveAllVertices();
/*! Removes the stroke vertex iVertex
/*! Removes the stroke vertex iVertex
* from the stroke.
* The length and curvilinear abscissa are updated
* consequently.

View File

@ -112,7 +112,7 @@ protected:
static string _patterns_path;
static string _brushes_path;
unsigned int _defaultTextureId;
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:TextureManager")
#endif

View File

@ -741,7 +741,7 @@ StrokeRep::StrokeRep(Stroke *iStroke)
#if 0
_averageTextureAlpha = 0.5; //default value
if (_strokeType == OIL_STROKE)
_averageTextureAlpha = 0.75;
_averageTextureAlpha = 0.75;
if (_strokeType >= NO_BLEND_STROKE)
_averageTextureAlpha = 1.0;
#endif

View File

@ -28,7 +28,7 @@
// Purpose : Class to define the text rendering of a stroke
// Format:
// x y width height // bbox
// //list of vertices :
// //list of vertices :
// t x y z t1 t2 r g b alpha ...
// ...
// Date of creation : 01/14/2005

View File

@ -78,7 +78,7 @@ public:
_first = iBrother._first;
_second = iBrother._second;
return *this;
}
}
/*! Returns the first Id number */
id_type getFirst() const

View File

@ -49,7 +49,7 @@ ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& sourc
}
ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, unsigned numCells)
: GridDensityProvider(source), numCells(numCells)
: GridDensityProvider(source), numCells(numCells)
{
real proscenium[4];
calculateOptimalProscenium(source, proscenium);

View File

@ -199,7 +199,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap& viewMap, bool extensiveFEdgeSe
fe = fe->nextEdge();
}
// If bestOccluderTarget was not found inside the occluder proscenium,
// If bestOccluderTarget was not found inside the occluder proscenium,
// we need to expand the occluder proscenium to include it.
if ((*ve)->isInImage() && bestOccluderTarget != NULL && ! bestOccluderTargetFound) {
// Expand occluder proscenium to enclose bestOccluderTarget
@ -249,7 +249,7 @@ void CulledOccluderSource::cullViewEdges(ViewMap& viewMap, bool extensiveFEdgeSe
FEdge *festart = (*ve)->fedgeA();
FEdge *fe = festart;
do {
// If not (already) visible and center point inside occluder proscenium,
// If not (already) visible and center point inside occluder proscenium,
if (!fe->isInImage() && insideProscenium(occluderProscenium, fe->center2d())) {
// Use the feature edge for visibility determination
fe->setIsInImage(true);

View File

@ -193,7 +193,7 @@ void FEdgeXDetector::computeCurvatures(WXVertex *vertex)
Vec3r e1, n, v;
// one vertex curvature info :
CurvatureInfo *C;
float radius = _sphereRadius * _meanEdgeSize;
float radius = _sphereRadius * _meanEdgeSize;
// view independent stuff
if (_computeViewIndependent) {
@ -369,7 +369,7 @@ void FEdgeXDetector::processCreaseShape(WXShape *iWShape)
if (!_computeViewIndependent)
return;
// Make a pass on the edges to detect the CREASE
// Make a pass on the edges to detect the CREASE
vector<WEdge*>::iterator we, weend;
vector<WEdge*> &wedges = iWShape->getEdgeList();
for (we = wedges.begin(), weend = wedges.end(); we != weend; ++we) {

View File

@ -250,7 +250,7 @@ int Curvature2DAngleF0D::operator()(Interface0DIterator& iter)
if ((N1.norm() == 0) && (N2.norm() == 0)) {
Exception::raiseException();
result = 0;
return -1;
return -1;
}
double cosin = N1 * N2;
if (cosin > 1)

View File

@ -101,7 +101,7 @@ public:
}
/*! The operator ().
* \param inter
* \param inter
* The Interface1D on which we wish to evaluate the function.
* \return the result of the function of type T.
*/

View File

@ -102,7 +102,7 @@ public: // Implementation of Interface0D
return _Point3D.z();
}
/*! Returns the 3D point. */
/*! Returns the 3D point. */
virtual Vec3r getPoint3D() const
{
return _Point3D;
@ -126,7 +126,7 @@ public: // Implementation of Interface0D
return _Point2D.z();
}
/*! Returns the 2D point. */
/*! Returns the 2D point. */
virtual Vec2r getPoint2D() const
{
return Vec2r(_Point2D.x(), _Point2D.y());
@ -144,16 +144,16 @@ public: // Implementation of Interface0D
/*! Returns the nature of the vertex .*/
virtual Nature::VertexNature getNature() const;
/*! Cast the Interface0D in SVertex if it can be. */
/*! Cast the Interface0D in SVertex if it can be. */
virtual SVertex *castToSVertex();
/*! Cast the Interface0D in ViewVertex if it can be. */
/*! Cast the Interface0D in ViewVertex if it can be. */
virtual ViewVertex *castToViewVertex();
/*! Cast the Interface0D in NonTVertex if it can be. */
/*! Cast the Interface0D in NonTVertex if it can be. */
virtual NonTVertex *castToNonTVertex();
/*! Cast the Interface0D in TVertex if it can be. */
/*! Cast the Interface0D in TVertex if it can be. */
virtual TVertex *castToTVertex();
public:
@ -163,7 +163,7 @@ private:
Id _Id;
Vec3r _Point3D;
Vec3r _Point2D;
set<Vec3r> _Normals;
set<Vec3r> _Normals;
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.
@ -1291,10 +1291,10 @@ protected:
unsigned _FrsMaterialIndex;
#if 0
bool _hasVisibilityPoint;
Vec3r _VisibilityPointA; // The edge on which the visibility will be computed represented
Vec3r _VisibilityPointA; // The edge on which the visibility will be computed represented
Vec3r _VisibilityPointB; // using its 2 extremity points A and B
#endif
void *_Face; // In case of exact silhouette, Face is the WFace crossed by Fedge
void *_Face; // In case of exact silhouette, Face is the WFace crossed by Fedge
// NOT HANDLED BY THE COPY CONSTRUCTEUR
bool _FaceMark;
@ -1418,7 +1418,7 @@ private:
const char *_Name;
const char *_LibraryPath;
BBox<Vec3r> _BBox;
vector<FrsMaterial> _FrsMaterials;
vector<FrsMaterial> _FrsMaterials;
float _importance;

View File

@ -173,7 +173,7 @@ public:
// Accessors:
bool orthographicProjection() const;
const Vec3r& viewpoint() const;
bool enableQI() const;
bool enableQI() const;
private:
void getCellCoordinates(const Vec3r& point, unsigned& x, unsigned& y);
@ -317,7 +317,7 @@ inline void SphericalGrid::Iterator::reportDepth(Vec3r origin, Vec3r u, real t)
// If the current occluder is the best occludee so far, save it.
if (! _foundOccludee || _occludeeDepth > depth) {
markCurrentOccludeeCandidate(depth);
}
}
}
else {
#if SPHERICAL_GRID_LOGGING

View File

@ -91,7 +91,7 @@ void SteerableViewMap::Clear()
}
delete[] _imagesPyramids;
_imagesPyramids = 0;
}
}
if (!_mapping.empty()) {
for (map<unsigned int, double*>::iterator m = _mapping.begin(), mend = _mapping.end(); m != mend; ++m) {
delete[] (*m).second;
@ -170,7 +170,7 @@ unsigned SteerableViewMap::getSVMNumber(unsigned id)
map<unsigned int, double *>::iterator o = _mapping.find(id);
if (o != _mapping.end()) {
double *wvalues = (*o).second;
double maxw = 0.0;
double maxw = 0.0;
unsigned winner = _nbOrientations + 1;
for (unsigned i = 0; i < _nbOrientations; ++i) {
double w = wvalues[i];

View File

@ -48,7 +48,7 @@ class FEdge;
class ImagePyramid;
class GrayImage;
/*! This class checks for every FEdge in which steerable it belongs and stores the mapping allowing to retrieve
/*! This class checks for every FEdge in which steerable it belongs and stores the mapping allowing to retrieve
* this information from the FEdge Id.
*/
class SteerableViewMap

View File

@ -95,7 +95,7 @@ ViewShape *ViewMap::viewShape(unsigned id)
void ViewMap::AddViewShape(ViewShape *iVShape)
{
_shapeIdToIndex[iVShape->getId().getFirst()] = _VShapes.size();
_shapeIdToIndex[iVShape->getId().getFirst()] = _VShapes.size();
_VShapes.push_back(iVShape);
}
@ -305,13 +305,13 @@ static bool ViewEdgeComp(ViewVertex::directedViewEdge& dve1, ViewVertex::directe
if (v1.y() > 0) {
if (v2.y() < 0)
return true;
else
else
return (v1.x() > v2.x());
}
else {
if (v2.y() > 0)
return false;
else
else
return (v1.x() < v2.x());
}
return false;
@ -387,7 +387,7 @@ void TVertex::setBackEdgeB(ViewEdge *iBackEdgeB, bool incoming)
void TVertex::Replace(ViewEdge *iOld, ViewEdge *iNew)
{
// theoritically, we only replace edges for which this
// theoritically, we only replace edges for which this
// view vertex is the B vertex
if ((iOld == _FrontEdgeA.first) && (_FrontEdgeA.first->B() == this)) {
_FrontEdgeA.first = iNew;
@ -501,7 +501,7 @@ ViewVertexInternal::orientedViewEdgeIterator TVertex::edgesIterator(ViewEdge *iE
/**********************************/
/* */
/* */
/* NonTVertex */
/* NonTVertex */
/* */
/* */
/**********************************/

View File

@ -218,7 +218,7 @@ public:
* iB2D
* The x,y,z 2D coordinates of the projection of iB3D
* iFEdgeB
* The second FEdge
* The second FEdge
* id
* The id that must be given to that TVertex
*/
@ -650,7 +650,7 @@ public:
/**********************************/
/* */
/* */
/* NonTVertex */
/* NonTVertex */
/* */
/* */
/**********************************/
@ -1643,7 +1643,7 @@ void ViewShape::SplitEdge(FEdge *fe, const vector<TVertex*>& iViewVertices, vect
ViewEdge *vEdge = fe->viewedge();
// We first need to sort the view vertices from farther to closer to fe->vertexA
SVertex *sv, *sv2;
SVertex *sv, *sv2;
ViewVertex *vva, *vvb;
vector<TVertex*>::const_iterator vv, vvend;
for (vv = iViewVertices.begin(), vvend = iViewVertices.end(); vv != vvend; vv++) {
@ -1685,7 +1685,7 @@ void ViewShape::SplitEdge(FEdge *fe, const vector<TVertex*>& iViewVertices, vect
if ((vva == 0) || (vvb == 0)) { // that means we're dealing with a closed viewedge (loop)
// remove the chain that was starting by the fedge A of vEdge (which is different from fe !!!!)
shape->RemoveEdgeFromChain(vEdge->fedgeA());
// we set
// we set
vEdge->setA(*vv);
vEdge->setB(*vv);
vEdge->setFEdgeA(newEdge);

View File

@ -1004,7 +1004,7 @@ ViewMap *ViewMapBuilder::BuildViewMap(WingedEdge& we, visibility_algo iAlgo, rea
computeInitialViewEdges(we);
// Detects cusps
computeCusps(_ViewMap);
computeCusps(_ViewMap);
// Compute intersections
ComputeIntersections(_ViewMap, sweep_line, epsilon);
@ -1059,7 +1059,7 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap, real viewProscenium[4], r
cout << "Origin: [" << prosceniumOrigin[0] << ", " << prosceniumOrigin[1] << "]"<< endl;
}
// A separate occluder proscenium will also be maintained, starting out the same as the viewport proscenium, and
// A separate occluder proscenium will also be maintained, starting out the same as the viewport proscenium, and
// expanding as necessary so that it encompasses the center point of at least one feature edge in each retained view
// edge.
// The occluder proscenium will be used later to cull occluding triangles before they are inserted into the Grid.
@ -1182,7 +1182,7 @@ void ViewMapBuilder::CullViewEdges(ViewMap *ioViewMap, real viewProscenium[4], r
FEdge *festart = (*ve)->fedgeA();
FEdge *fe = festart;
do {
// If not (already) visible and center point inside occluder proscenium,
// If not (already) visible and center point inside occluder proscenium,
if (!fe->isInImage() && insideProscenium(occluderProscenium, fe->center2d())) {
// Use the feature edge for visibility determination
fe->setIsInImage(true);
@ -2286,7 +2286,7 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
for (fe = ioEdges.begin(), fend = ioEdges.end(); fe != fend; fe++)
(*fe)->userdata = NULL;
// list containing the new edges resulting from splitting operations.
// list containing the new edges resulting from splitting operations.
vector<FEdge*> newEdges;
// retrieve the intersected edges:

View File

@ -159,7 +159,7 @@ public:
/*! Builds the scene view map returns the list the view map
* it is up to the caller to delete this ViewMap
* iWRoot
* The root group node containing the WEdge structured scene
* The root group node containing the WEdge structured scene
*/
ViewMap *BuildViewMap(WingedEdge& we, visibility_algo iAlgo, real epsilon, const BBox<Vec3r>& bbox,
unsigned int sceneNumFaces);
@ -180,7 +180,7 @@ public:
/*! Computes the 2D scene silhouette edges visibility
* iGrid
* For the Ray Casting algorithm.
* For the Ray Casting algorithm.
*/
void ComputeEdgesVisibility(ViewMap *ioViewMap, WingedEdge& we, const BBox<Vec3r>& bbox, unsigned int sceneNumFaces,
visibility_algo iAlgo = ray_casting, real epsilon = 1.0e-6);

View File

@ -284,7 +284,7 @@ static int load(istream& in, FEdge *fe)
load(in, v);
fesharp->setNormalB(v);
// Materials
// Materials
READ(matindex);
fesharp->setaFrsMaterialIndex(matindex);
READ(matindex);

View File

@ -30,7 +30,7 @@
#include "ViewMap.h"
#include "../system/Iterator.h" //soc
#include "../system/Iterator.h" //soc
namespace Freestyle {