Attempt to fix a potential name conflict between Freestyle and the compositor.

A crash in the Freestyle renderer was reported by Ton on IRC with a stack trace
below.  Note that #2 is in Freestyle, whereas #1 is in the compositor.  The problem
was observed in a debug build on OS X 10.7 (gcc 4.2, openmp disabled, no llvm).

----------------------------------------------------------------------
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
[Switching to process 72386 thread 0xf303]
0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43
43			delete (this->m_outputsockets.back());
Current language:  auto; currently c++
(gdb) where
#0  0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43
#1  0x0000000100c29066 in Node::~Node (this=0x10e501c80) at COM_Node.h:49
#2  0x000000010089c273 in NodeShape::~NodeShape (this=0x10e501c80) at NodeShape.cpp:43
#3  0x000000010089910b in NodeGroup::destroy (this=0x10e501da0) at NodeGroup.cpp:61
#4  0x00000001008990cd in NodeGroup::destroy (this=0x10e5014b0) at NodeGroup.cpp:59
#5  0x00000001008990cd in NodeGroup::destroy (this=0x114e18da0) at NodeGroup.cpp:59
#6  0x00000001007e6602 in Controller::ClearRootNode (this=0x114e19640) at Controller.cpp:329
#7  0x00000001007ea52e in Controller::LoadMesh (this=0x114e19640, re=0x10aba4638, srl=0x1140f5258) at Controller.cpp:302
#8  0x00000001008030ad in prepare (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:302
#9  0x000000010080457a in FRS_do_stroke_rendering (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:600
#10 0x00000001006aeb9d in add_freestyle (re=0x10aba4638) at pipeline.c:1584
#11 0x00000001006aceb7 in do_render_3d (re=0x10aba4638) at pipeline.c:1094
#12 0x00000001006ae061 in do_render_fields_blur_3d (re=0x10aba4638) at pipeline.c:1367
#13 0x00000001006afa16 in do_render_composite_fields_blur_3d (re=0x10aba4638) at pipeline.c:1815
#14 0x00000001006b04e4 in do_render_all_options (re=0x10aba4638) at pipeline.c:2021
----------------------------------------------------------------------

Apparently a name conflict between the two Blender modules is taking place.
The present commit hence intends to address it by putting all the Freestyle C++
classes in the namespace 'Freestyle'.  This revision will also prevent potential
name conflicts with other Blender modules in the future.

Special thanks to Lukas Toenne for the help with C++ namespace.
This commit is contained in:
Tamito Kajiyama
2013-04-09 00:46:49 +00:00
parent e6bd510dde
commit 800f86c845
233 changed files with 915 additions and 80 deletions

View File

@@ -33,6 +33,8 @@
#include "../system/StringUtils.h"
namespace Freestyle {
AppCanvas::AppCanvas()
:Canvas()
{
@@ -205,7 +207,8 @@ void AppCanvas::RenderStroke(Stroke *iStroke)
iStroke->Render(_Renderer);
}
void AppCanvas::update()
{
}
} /* namespace Freestyle */

View File

@@ -28,6 +28,8 @@
#include "../stroke/Canvas.h"
#include "AppView.h"
namespace Freestyle {
class AppCanvas : public Canvas
{
public:
@@ -91,4 +93,6 @@ private:
} _pass_diffuse, _pass_z;
};
} /* namespace Freestyle */
#endif // __APPCANVAS_H__

View File

@@ -33,6 +33,8 @@ extern "C" {
#include "BLI_path_util.h"
}
namespace Freestyle {
namespace Config {
Path *Path::_pInstance = 0;
@@ -95,3 +97,5 @@ string Path::getEnvVar(const string& iEnvVarName)
}
} // End of namepace Config
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
using namespace std;
namespace Freestyle {
namespace Config {
class Path {
@@ -98,4 +100,6 @@ static const real DEFAULT_DKR_EPSILON = 0.0;
} // End of namepace Config
} /* namespace Freestyle */
#endif // __APP_CONFIG_H__

View File

@@ -56,6 +56,8 @@ extern "C" {
#include "FRS_freestyle.h"
}
namespace Freestyle {
AppView::AppView(const char *iName)
{
_Fovy = DEG2RADF(30.0f);
@@ -189,3 +191,5 @@ real AppView::GetFocalLength()
real Near = std::max(0.1, (real)(-2.0f * _maxAbs + distanceToSceneCenter()));
return Near;
}
} /* namespace Freestyle */

View File

@@ -31,6 +31,8 @@
#include "../scene_graph/NodeDrawingStyle.h"
#include "../system/Precision.h"
namespace Freestyle {
using namespace Geometry;
class AppView
@@ -228,4 +230,6 @@ protected:
NodeDrawingStyle *_p2DSelectionNode;
};
} /* namespace Freestyle */
#endif // __APPVIEW_H__

View File

@@ -63,19 +63,11 @@
#include "BKE_global.h"
// XXX Not inside an "extern C" block???
#include "DNA_freestyle_types.h"
// XXX Are those "ifdef __cplusplus" useful here?
#ifdef __cplusplus
extern "C" {
#endif
#include "FRS_freestyle.h"
#ifdef __cplusplus
}
#endif
namespace Freestyle {
Controller::Controller()
{
@@ -1043,3 +1035,5 @@ void Controller::init_options()
setPassDiffuse(NULL, 0, 0);
setPassZ(NULL, 0, 0);
}
} /* namespace Freestyle */

View File

@@ -40,6 +40,13 @@
#include "../view_map/FEdgeXDetector.h"
#include "../view_map/ViewMapBuilder.h"
extern "C" {
#include "render_types.h"
#include "DNA_scene_types.h"
}
namespace Freestyle {
class AppView;
class NodeGroup;
class WShape;
@@ -51,18 +58,6 @@ class InteractiveShader;
class Shader;
class StrokeRenderer;
// XXX Are those "ifdef __cplusplus" useful here?
#ifdef __cplusplus
extern "C" {
#endif
#include "render_types.h"
#include "DNA_scene_types.h"
#ifdef __cplusplus
}
#endif
class Controller
{
public:
@@ -247,4 +242,6 @@ private:
extern Controller *g_pController;
} /* namespace Freestyle */
#endif // __CONTROLLER_H__

View File

@@ -28,6 +28,8 @@
#include "BKE_global.h"
namespace Freestyle {
BlenderFileLoader::BlenderFileLoader(Render *re, SceneRenderLayer *srl)
{
_re = re;
@@ -756,3 +758,5 @@ void BlenderFileLoader::insertShapeNode(ObjectInstanceRen *obi, int id)
currentMesh->AddChild(shape);
_Scene->AddChild(currentMesh);
}
} /* namespace Freestyle */

View File

@@ -39,11 +39,7 @@
#include "../system/FreestyleConfig.h"
#include "../system/RenderMonitor.h"
// XXX Are those "ifdef __cplusplus" useful here?
#ifdef __cplusplus
extern "C" {
#endif
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
@@ -55,11 +51,9 @@ extern "C" {
#include "BKE_scene.h"
#include "BLI_math.h"
#ifdef __cplusplus
}
#endif
namespace Freestyle {
class NodeGroup;
@@ -128,4 +122,6 @@ protected:
RenderMonitor *_pRenderMonitor;
};
} /* namespace Freestyle */
#endif // __BLENDER_FILE_LOADER_H__

View File

@@ -60,6 +60,8 @@ extern "C" {
}
#endif
namespace Freestyle {
BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : StrokeRenderer()
{
// TEMPORARY - need a texture manager
@@ -510,3 +512,5 @@ Render *BlenderStrokeRenderer::RenderScene(Render *re)
RE_RenderFreestyleStrokes(freestyle_render, G.main, freestyle_scene);
return freestyle_render;
}
} /* namespace Freestyle */

View File

@@ -28,19 +28,14 @@
#include "../stroke/StrokeRenderer.h"
#include "../system/FreestyleConfig.h"
// XXX Are those "ifdef __cplusplus" useful here?
#ifdef __cplusplus
extern "C" {
#endif
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
#include "render_types.h"
#ifdef __cplusplus
}
#endif
namespace Freestyle {
class LIB_STROKE_EXPORT BlenderStrokeRenderer : public StrokeRenderer
{
@@ -68,4 +63,6 @@ protected:
unsigned int get_stroke_mesh_id(void) const;
};
} /* namespace Freestyle */
#endif // __BLENDER_STROKE_RENDERER_H__

View File

@@ -34,6 +34,8 @@ extern "C" {
#include "BKE_text.h"
}
namespace Freestyle {
class BlenderStyleModule : public StyleModule
{
public:
@@ -58,4 +60,6 @@ private:
struct Text *_text;
};
} /* namespace Freestyle */
#endif // __BLENDERSTYLEMODULE_H__

View File

@@ -26,6 +26,8 @@
#include "BKE_global.h"
namespace Freestyle {
BlenderTextureManager::BlenderTextureManager()
: TextureManager()
{
@@ -95,3 +97,5 @@ unsigned int BlenderTextureManager::loadBrush(string sname, Stroke::MediumType m
return 0;
#endif
}
} /* namespace Freestyle */

View File

@@ -29,6 +29,8 @@
# include "../stroke/StrokeRep.h"
# include "../system/FreestyleConfig.h"
namespace Freestyle {
/*! Class to load textures */
class LIB_RENDERING_EXPORT BlenderTextureManager : public TextureManager
{
@@ -43,4 +45,6 @@ protected:
virtual void loadStandardBrushes();
};
} /* namespace Freestyle */
#endif // __BLENDERTEXTUREMANAGER_H__

View File

@@ -32,6 +32,7 @@
#include "../application/Controller.h"
using namespace std;
using namespace Freestyle;
extern "C" {

View File

@@ -28,6 +28,8 @@
* \date 22/05/2003
*/
namespace Freestyle {
template <class Point>
class BBox
{
@@ -144,4 +146,6 @@ BBox<Point>& operator+(const BBox<Point> &b1, const BBox<Point> &b2)
return BBox<Point>(new_min, new_max);
}
} /* namespace Freestyle */
#endif // __BBOX_H__

View File

@@ -30,6 +30,8 @@
using namespace std;
namespace Freestyle {
BezierCurveSegment::BezierCurveSegment()
{
}
@@ -118,3 +120,5 @@ void BezierCurve::AddControlPoint(const Vec2d& iPoint)
_currentSegment->AddControlPoint(iPoint);
}
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
class LIB_GEOMETRY_EXPORT BezierCurveSegment
@@ -86,4 +88,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __BEZIER_H__

View File

@@ -29,6 +29,8 @@
#include "BKE_global.h"
namespace Freestyle {
void FastGrid::clear()
{
if (!_cells)
@@ -78,3 +80,5 @@ void FastGrid::fillCell(const Vec3u& p, Cell& cell)
assert(p[2] < _cells_nb[2]);
_cells[_cells_nb[0] * (p[2] * _cells_nb[1] + p[1]) + p[0]] = &cell;
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "Grid.h"
namespace Freestyle {
/*! 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)
@@ -76,4 +78,6 @@ protected:
unsigned _cells_size;
};
} /* namespace Freestyle */
#endif // __FASTGRID_H__

View File

@@ -34,13 +34,9 @@
using namespace std;
typedef Vector2 *BezierCurve;
namespace Freestyle {
// XXX Do we need "#ifdef __cplusplus" at all here???
#ifdef __cplusplus
extern "C"
{
#endif
typedef Vector2 *BezierCurve;
/* Forward declarations */
static double *Reparameterize(Vector2 *d, int first, int last, double *u, BezierCurve bezCurve);
@@ -332,7 +328,6 @@ static double B0(double u)
return (tmp * tmp * tmp);
}
static double B1(double u)
{
double tmp = 1.0 - u;
@@ -416,9 +411,6 @@ static double *ChordLengthParameterize(Vector2 *d, int first, int last)
return u;
}
/*
* ComputeMaxError :
* Find the maximum squared distance of digitized points to fitted curve.
@@ -474,11 +466,6 @@ static Vector2 V2SubII(Vector2 a, Vector2 b)
return c;
}
#ifdef __cplusplus
}
#endif
//------------------------- WRAPPER -----------------------------//
FitCurveWrapper::FitCurveWrapper()
@@ -591,3 +578,5 @@ void FitCurveWrapper::FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, V
V2Negate(&tHatCenter);
FitCubic(d, splitPoint, last, tHatCenter, tHat2, error);
}
} /* namespace Freestyle */

View File

@@ -35,6 +35,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
/* 2d point */
@@ -115,4 +117,6 @@ protected:
void FitCubic(Vector2 *d, int first, int last, Vector2 tHat1, Vector2 tHat2, double error);
};
} /* namespace Freestyle */
#endif // __FITCURVE_H__

View File

@@ -34,6 +34,8 @@
#include "../system/Precision.h"
namespace Freestyle {
namespace Geometry {
typedef VecMat::Vec2<unsigned> Vec2u;
@@ -74,4 +76,6 @@ typedef VecMat::SquareMatrix<real, 4> Matrix44r;
} // end of namespace Geometry
} /* namespace Freestyle */
#endif // __GEOM_H__

View File

@@ -47,6 +47,7 @@
using namespace std;
namespace Freestyle {
void GeomCleaner::SortIndexedVertexArray(const float *iVertices, unsigned iVSize, const unsigned *iIndices,
unsigned iISize, real **oVertices, unsigned **oIndices)
@@ -231,3 +232,5 @@ void GeomCleaner::CleanIndexedVertexArray(const float *iVertices, unsigned iVSiz
for (i = 0; i < iISize; i++)
(*oIndices)[i] = 3 * newIndices[iIndices[i] / 3];
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
class LIB_GEOMETRY_EXPORT GeomCleaner
@@ -217,4 +219,6 @@ bool operator<(const IndexedVertex& iv1, const IndexedVertex& iv2)
}
#endif
} /* namespace Freestyle */
#endif // __GEOMCLEANER_H__

View File

@@ -27,6 +27,8 @@
#include "GeomUtils.h"
namespace Freestyle {
namespace GeomUtils {
// This internal procedure is defined below.
@@ -774,3 +776,5 @@ inline void fromCoordAToCoordB(const Vec3r&p, Vec3r& q, const real transform[4][
}
} // end of namespace GeomUtils
} /* namespace Freestyle */

View File

@@ -35,6 +35,9 @@
#include "../system/FreestyleConfig.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
namespace GeomUtils {
@@ -267,4 +270,6 @@ void fromCameraToWorld(const Vec3r& p, Vec3r& q, const real model_view_matrix[4]
} // end of namespace GeomUtils
} /* namespace Freestyle */
#endif // __GEOMUTILS_H__

View File

@@ -31,6 +31,8 @@
#include "BBox.h"
#include "Grid.h"
namespace Freestyle {
// Grid Visitors
/////////////////
void allOccludersGridVisitor::examineOccluder(Polygon3r *occ)
@@ -382,3 +384,5 @@ bool Grid::initInfiniteRay (const Vec3r &orig, const Vec3r& dir, unsigned timest
return true;
}
} /* namespace Freestyle */

View File

@@ -46,6 +46,9 @@ extern "C" {
}
using namespace std;
namespace Freestyle {
using namespace Geometry;
typedef vector<Polygon3r*> OccludersSet;
@@ -374,4 +377,6 @@ private:
OccludersSet::iterator it, end;
};
} /* namespace Freestyle */
#endif // __GRID_H__

View File

@@ -29,6 +29,8 @@
#include "GridHelpers.h"
namespace Freestyle {
void GridHelpers::getDefaultViewProscenium(real viewProscenium[4])
{
// Get proscenium boundary for culling
@@ -50,3 +52,5 @@ void GridHelpers::getDefaultViewProscenium(real viewProscenium[4])
GridHelpers::Transform::~Transform ()
{
}
} /* namespace Freestyle */

View File

@@ -37,6 +37,8 @@
#include "../winged_edge/WEdge.h"
namespace Freestyle {
namespace GridHelpers {
/*! Computes the distance from a point P to a segment AB */
@@ -205,4 +207,6 @@ inline void expandProscenium (real proscenium[4], const Vec3r& point)
}; // GridHelpers namespace
} /* namespace Freestyle */
#endif // __GRIDHELPERS_H__

View File

@@ -27,6 +27,8 @@
#include "HashGrid.h"
namespace Freestyle {
void HashGrid::clear()
{
if (!_cells.empty()) {
@@ -44,3 +46,5 @@ void HashGrid::configure(const Vec3r& orig, const Vec3r& size, unsigned nb)
{
Grid::configure(orig, size, nb);
}
} /* namespace Freestyle */

View File

@@ -42,6 +42,8 @@
#include "Grid.h"
namespace Freestyle {
/*! Defines a hash table used for searching the Cells */
struct GridHasher
{
@@ -106,4 +108,6 @@ protected:
GridHashTable _cells;
};
} /* namespace Freestyle */
#endif // __HASHGRID_H__

View File

@@ -32,6 +32,8 @@
#include "Noise.h"
namespace Freestyle {
#define SCURVE(a) ((a) * (a) * (3.0 - 2.0 * (a)))
#if 0 // XXX Unused
@@ -272,3 +274,5 @@ Noise::Noise(long seed)
g3[_NOISE_B + i][j] = g3[i][j];
}
}
} /* namespace Freestyle */

View File

@@ -32,10 +32,13 @@
#include "../system/FreestyleConfig.h"
using namespace std;
namespace Freestyle {
#define _NOISE_B 0x100
using namespace Geometry;
using namespace std;
/*! Class to provide Perlin Noise functionalities */
class LIB_GEOMETRY_EXPORT Noise
@@ -73,4 +76,6 @@ private:
int start;
};
} /* namespace Freestyle */
#endif // __NOISE_H__

View File

@@ -35,6 +35,8 @@
using namespace std;
namespace Freestyle {
namespace Geometry {
template <class Point>
@@ -211,4 +213,6 @@ private:
} // end of namespace Geometry
} /* namespace Freestyle */
#endif // __POLYGON_H__

View File

@@ -31,6 +31,8 @@
#include <list>
#include <vector>
namespace Freestyle {
/*! Class to define the intersection berween two segments*/
template<class Edge>
class Intersection
@@ -322,4 +324,6 @@ private:
std::vector<Intersection<Segment<T, Point> > *> _Intersections; // the list of all intersections.
};
} /* namespace Freestyle */
#endif // __SWEEPLINE_H__

View File

@@ -34,6 +34,8 @@
#include <math.h>
#include <vector>
namespace Freestyle {
namespace VecMat {
namespace Internal {
@@ -967,4 +969,6 @@ inline std::ostream& operator<<(std::ostream& s, const Matrix<T, M, N>& m)
} // end of namespace VecMat
} /* namespace Freestyle */
#endif // __VECMAT_H__

View File

@@ -40,6 +40,8 @@
#include "matrix_util.h"
namespace Freestyle {
namespace OGF {
namespace MatrixUtil {
@@ -261,3 +263,5 @@ namespace MatrixUtil {
} // MatrixUtil namespace
} // OGF namespace
} /* namespace Freestyle */

View File

@@ -41,6 +41,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
namespace OGF {
namespace MatrixUtil {
@@ -66,4 +68,6 @@ namespace MatrixUtil {
} // OGF namespace
} /* namespace Freestyle */
#endif // __MATRIX_UTIL__

View File

@@ -39,6 +39,8 @@
#include "matrix_util.h"
#include "normal_cycle.h"
namespace Freestyle {
namespace OGF {
//_________________________________________________________
@@ -95,3 +97,5 @@ void NormalCycle::end()
//_________________________________________________________
} // OGF namespace
} /* namespace Freestyle */

View File

@@ -43,6 +43,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
namespace OGF {
@@ -138,4 +140,6 @@ inline void NormalCycle::accumulate_dihedral_angle(const Vec3r& edge, const doub
} // OGF namespace
} /* namespace Freestyle */
#endif // __MESH_TOOLS_MATH_NORMAL_CYCLE__

View File

@@ -29,6 +29,8 @@
#include "GaussianFilter.h"
namespace Freestyle {
GaussianFilter::GaussianFilter(float iSigma)
{
_sigma = iSigma;
@@ -103,3 +105,5 @@ void GaussianFilter::computeMask()
}
}
}
} /* namespace Freestyle */

View File

@@ -33,6 +33,12 @@
#include "../system/FreestyleConfig.h"
extern "C" {
#include "BLI_math.h"
}
namespace Freestyle {
class LIB_IMAGE_EXPORT GaussianFilter
{
protected:
@@ -119,8 +125,6 @@ protected:
*/
#include <math.h>
#ifdef __MACH__
# define sqrtf(x) (sqrt(x))
#endif
@@ -152,4 +156,6 @@ float GaussianFilter::getSmoothedPixel(Map *map, int x, int y)
return L;
}
} /* namespace Freestyle */
#endif // __GAUSSIANFILTER_H__

View File

@@ -30,6 +30,8 @@
#include <string.h> // for memcpy
namespace Freestyle {
//
// Image base class, for all types of images
//
@@ -405,4 +407,6 @@ protected:
float *_lvl;
};
} /* namespace Freestyle */
#endif // __IMAGE_H__

View File

@@ -33,6 +33,8 @@
using namespace std;
namespace Freestyle {
#if 0
ImagePyramid::ImagePyramid(const GrayImage& level0, unsigned nbLevels)
{
@@ -183,3 +185,5 @@ void GaussianPyramid::BuildPyramid(GrayImage *level0, unsigned nbLevels)
}
}
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
class GrayImage;
class LIB_IMAGE_EXPORT ImagePyramid
@@ -106,4 +108,6 @@ public:
/* modifiers */
};
} /* namespace Freestyle */
#endif // __IMAGEPYRAMID_H__

View File

@@ -29,7 +29,9 @@
#include "../geometry/BBox.h"
#include "../geometry/Geom.h"
using namespace Geometry;
using namespace Freestyle;
using namespace Freestyle::Geometry;
#ifdef __cplusplus
extern "C" {

View File

@@ -29,6 +29,8 @@
#include "../stroke/Predicates0D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../stroke/Predicates1D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -27,6 +27,8 @@
#include "../stroke/ContextFunctions.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,7 +29,9 @@
#include <typeinfo>
#include "../geometry/Geom.h"
using namespace Geometry;
using namespace Freestyle;
using namespace Freestyle::Geometry;
// BBox
#include "../geometry/BBox.h"

View File

@@ -29,6 +29,8 @@
#include "../scene_graph/FrsMaterial.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../geometry/Noise.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -27,10 +27,13 @@
#include <Python.h>
#include <iostream>
using namespace std;
#include "../system/Id.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/Interface1D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/Interface0D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/Interface1D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../system/Iterator.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../stroke/Stroke.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../winged_edge/Nature.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../stroke/Operators.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/Silhouette.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../stroke/Stroke.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -33,6 +33,8 @@ using namespace std;
#include "../stroke/StrokeShader.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/Functions0D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/Functions1D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../stroke/Predicates0D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../stroke/Predicates1D.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/ViewMap.h"
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {
#endif

View File

@@ -29,6 +29,8 @@
#include "../view_map/ViewMap.h"
using namespace Freestyle;
#include "BPy_SShape.h"
#ifdef __cplusplus

View File

@@ -25,6 +25,7 @@
#ifndef __FREESTYLE_PYTHON_DIRECTOR_H__
#define __FREESTYLE_PYTHON_DIRECTOR_H__
namespace Freestyle {
class UnaryPredicate0D;
class UnaryPredicate1D;
class BinaryPredicate0D;
@@ -36,6 +37,9 @@ class Interface1D;
class Interface0DIterator;
class Stroke;
class StrokeShader;
}
using namespace Freestyle;
#ifdef __cplusplus
extern "C" {

View File

@@ -28,6 +28,8 @@
* \date 10/10/2002
*/
namespace Freestyle {
class DrawingStyle
{
public:
@@ -118,4 +120,6 @@ DrawingStyle& DrawingStyle::operator=(const DrawingStyle& ds)
return *this;
}
} /* namespace Freestyle */
#endif // __FREESTYLE_DRAWING_STYLE_H__

View File

@@ -30,6 +30,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
/*! Class defining a material */
class FrsMaterial
{
@@ -369,4 +371,6 @@ bool FrsMaterial::operator==(const FrsMaterial& m) const
return (!((*this) != m));
}
} /* namespace Freestyle */
#endif // __FREESTYLE_MATERIAL_H__

View File

@@ -27,6 +27,8 @@
#include "IndexedFaceSet.h"
namespace Freestyle {
IndexedFaceSet::IndexedFaceSet() : Rep()
{
_Vertices = NULL;
@@ -321,3 +323,5 @@ void IndexedFaceSet::ComputeBBox()
setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
}
} /* namespace Freestyle */

View File

@@ -36,6 +36,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
class LIB_SCENE_GRAPH_EXPORT IndexedFaceSet : public Rep
{
public:
@@ -312,4 +314,6 @@ protected:
unsigned int _displayList;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_INDEXED_FACE_SET_H__

View File

@@ -27,6 +27,8 @@
#include "LineRep.h"
namespace Freestyle {
void LineRep::ComputeBBox()
{
real XMax = _vertices.front()[0];
@@ -62,3 +64,5 @@ void LineRep::ComputeBBox()
setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
}
} /* namespace Freestyle */

View File

@@ -37,6 +37,8 @@
using namespace std;
namespace Freestyle {
/*! Base class for all lines objects */
class LIB_SCENE_GRAPH_EXPORT LineRep : public Rep
{
@@ -148,4 +150,6 @@ private:
float _width;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_LINE_REP_H__

View File

@@ -38,6 +38,9 @@
#include "../geometry/Geom.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT Node : public BaseObject
@@ -105,4 +108,6 @@ private:
BBox<Vec3r> _BBox;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_H__

View File

@@ -30,6 +30,8 @@
#include "NodeCamera.h"
namespace Freestyle {
static void loadIdentity(double * matrix)
{
int i;
@@ -136,3 +138,5 @@ NodePerspectiveCamera::NodePerspectiveCamera(double left, double right, double b
projection_matrix_[14] = -1.0;
projection_matrix_[15] = 0;
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
class NodeOrthographicCamera;
@@ -205,5 +207,6 @@ public:
NodePerspectiveCamera(double left, double right, double bottom, double top, double zNear, double zFar);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_CAMERA_H__

View File

@@ -27,6 +27,8 @@
#include "NodeDrawingStyle.h"
namespace Freestyle {
void NodeDrawingStyle::accept(SceneVisitor& v)
{
v.visitNodeDrawingStyle(*this);
@@ -37,3 +39,5 @@ void NodeDrawingStyle::accept(SceneVisitor& v)
(*node)->accept(v);
v.visitNodeDrawingStyleAfter(*this);
}
} /* namespace Freestyle */

View File

@@ -33,6 +33,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
class LIB_SCENE_GRAPH_EXPORT NodeDrawingStyle : public NodeGroup
{
public:
@@ -101,4 +103,6 @@ private:
DrawingStyle _DrawingStyle;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_DRAWING_STYLE_H__

View File

@@ -28,6 +28,8 @@
#include "NodeGroup.h"
namespace Freestyle {
void NodeGroup::AddChild(Node *iChild)
{
if (NULL == iChild)
@@ -117,3 +119,5 @@ const BBox<Vec3r>& NodeGroup::UpdateBBox()
return Node::UpdateBBox();
}
} /* namespace Freestyle */

View File

@@ -37,6 +37,8 @@
using namespace std;
namespace Freestyle {
class LIB_SCENE_GRAPH_EXPORT NodeGroup : public Node
{
public:
@@ -79,4 +81,6 @@ protected:
vector<Node*> _Children;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_GROUP_H__

View File

@@ -27,6 +27,8 @@
#include "NodeLight.h"
namespace Freestyle {
int NodeLight::numberOfLights = 0;
NodeLight::NodeLight() : Node()
@@ -77,3 +79,5 @@ void NodeLight::accept(SceneVisitor& v)
{
v.visitNodeLight(*this);
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT NodeLight : public Node
@@ -103,4 +105,6 @@ private:
int _number;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_LIGHT_H__

View File

@@ -27,6 +27,8 @@
#include "NodeShape.h"
namespace Freestyle {
NodeShape::~NodeShape()
{
vector<Rep *>::iterator rep;
@@ -54,3 +56,5 @@ void NodeShape::accept(SceneVisitor& v)
(*rep)->accept(v);
v.visitNodeShapeAfter(*this);
}
} /* namespace Freestyle */

View File

@@ -40,6 +40,9 @@
#include "Rep.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT NodeShape : public Node
@@ -93,4 +96,6 @@ private:
FrsMaterial _FrsMaterial;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_SHAPE_H__

View File

@@ -30,6 +30,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
void NodeTransform::Translate(real x, real y, real z)
{
_Matrix(0, 3) += x;
@@ -169,3 +171,5 @@ bool NodeTransform::isScaled(const Matrix44r &M)
return false;
}
} /* namespace Freestyle */

View File

@@ -35,6 +35,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT NodeTransform : public NodeGroup
@@ -100,4 +102,6 @@ private:
bool _Scaled;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_NODE_TRANSFORM_H__

View File

@@ -29,6 +29,8 @@
#include "../system/BaseObject.h"
namespace Freestyle {
void OrientedLineRep::accept(SceneVisitor& v)
{
Rep::accept(v);
@@ -37,3 +39,5 @@ void OrientedLineRep::accept(SceneVisitor& v)
else
v.visitLineRep(*this);
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
class LIB_SCENE_GRAPH_EXPORT OrientedLineRep : public LineRep
{
public:
@@ -56,4 +58,6 @@ public:
virtual void accept(SceneVisitor& v);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_ORIENTED_LINE_REP_H__

View File

@@ -38,6 +38,8 @@
#include "../system/Id.h"
#include "../system/Precision.h"
namespace Freestyle {
using namespace Geometry;
class LIB_SCENE_GRAPH_EXPORT Rep : public BaseObject
@@ -163,4 +165,6 @@ private:
FrsMaterial *_FrsMaterial;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_REP_H__

View File

@@ -31,6 +31,8 @@
#include "IndexedFaceSet.h"
#include "ScenePrettyPrinter.h"
namespace Freestyle {
#define VISIT(CLASS) \
void ScenePrettyPrinter::visit##CLASS(CLASS&) \
{ \
@@ -101,3 +103,5 @@ void ScenePrettyPrinter::visitIndexedFaceSet(IndexedFaceSet& ifs)
p += 3;
}
}
} /* namespace Freestyle */

View File

@@ -37,6 +37,8 @@
using namespace std;
namespace Freestyle {
class ScenePrettyPrinter : public SceneVisitor
{
public:
@@ -99,4 +101,6 @@ private:
string _space;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_SCENE_PRETTY_PRINTER_H__

View File

@@ -30,6 +30,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
#define VISIT_COMPLETE_DEF(type) \
virtual void visit##type(type&) {} \
virtual void visit##type##Before(type&) {} \
@@ -92,4 +94,6 @@ public:
VISIT_COMPLETE_DEF(FrsMaterial)
};
} /* namespace Freestyle */
#endif // __FREESTYLE_SCENE_VISITOR_H__

View File

@@ -27,6 +27,8 @@
#include "TriangleRep.h"
namespace Freestyle {
void TriangleRep::ComputeBBox()
{
real XMax = _vertices[0][0];
@@ -60,3 +62,5 @@ void TriangleRep::ComputeBBox()
setBBox(BBox<Vec3r>(Vec3r(XMin, YMin, ZMin), Vec3r(XMax, YMax, ZMax)));
}
} /* namespace Freestyle */

View File

@@ -31,6 +31,8 @@
//! inherits from class Rep
#include "Rep.h"
namespace Freestyle {
/*! Base class for all lines objects */
class LIB_SCENE_GRAPH_EXPORT TriangleRep : public Rep
{
@@ -140,4 +142,6 @@ public:
virtual void ComputeBBox();
};
} /* namespace Freestyle */
#endif // __FREESTYLE_TRIANGLE_REP_H__

View File

@@ -27,8 +27,12 @@
#include "VertexRep.h"
namespace Freestyle {
void VertexRep::ComputeBBox()
{
setBBox(BBox<Vec3r>(Vec3r(_coordinates[0], _coordinates[1], _coordinates[2]),
Vec3r(_coordinates[0], _coordinates[1], _coordinates[2])));
}
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "Rep.h"
namespace Freestyle {
class LIB_SCENE_GRAPH_EXPORT VertexRep : public Rep
{
public:
@@ -131,4 +133,6 @@ private:
float _PointSize;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_VERTEX_REP_H__

View File

@@ -32,6 +32,8 @@
#include "../view_map/Functions0D.h"
#include "../view_map/SteerableViewMap.h"
namespace Freestyle {
namespace Functions0D {
int DensityF0D::operator()(Interface0DIterator& iter)
@@ -110,3 +112,5 @@ int GetViewMapGradientNormF0D::operator()(Interface0DIterator& iter)
}
} // end of namespace Functions0D
} /* namespace Freestyle */

View File

@@ -39,6 +39,8 @@
//
///////////////////////////////////////////////////////////
namespace Freestyle {
namespace Functions0D {
// DensityF0D
@@ -219,4 +221,6 @@ public:
} // end of namespace Functions0D
} /* namespace Freestyle */
#endif // __FREESTYLE_ADVANCED_FUNCTIONS_0D_H__

View File

@@ -31,6 +31,8 @@
#include "../view_map/SteerableViewMap.h"
namespace Freestyle {
// FIXME
namespace Functions1D {
@@ -129,3 +131,5 @@ int GetViewMapGradientNormF1D::operator()(Interface1D& inter)
}
} // Functions1D namespace
} /* namespace Freestyle */

View File

@@ -38,6 +38,8 @@
//
///////////////////////////////////////////////////////////
namespace Freestyle {
namespace Functions1D {
// DensityF1D
@@ -288,4 +290,6 @@ public:
} // end of namespace Functions1D
} /* namespace Freestyle */
#endif // __FREESTYLE_ADVANCED_FUNCTIONS_1D_H__

View File

@@ -40,6 +40,8 @@
//
///////////////////////////////////////////////////////////
namespace Freestyle {
namespace Predicates1D {
// DensityLowerThanUP1D
@@ -85,4 +87,6 @@ private:
} // end of namespace Predicates1D
} /* namespace Freestyle */
#endif // __FREESTYLE_ADVANCED_PREDICATES_1D_H__

View File

@@ -31,6 +31,8 @@
#include "../system/PseudoNoise.h"
#include "../system/RandGen.h"
namespace Freestyle {
/////////////////////////////////////////
//
// CALLIGRAPHICS SHADER
@@ -395,3 +397,5 @@ void Omitter::omit(real sizeWindow, real thrVari, real thrFlat, real lFlat)
}
#endif
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "BasicStrokeShaders.h"
namespace Freestyle {
/*! [ Thickness Shader ].
* Assigns thicknesses to the stroke vertices so that the stroke looks like made with a calligraphic tool.
* i.e. The stroke will be the thickest in a main direction, the thinest in the direction perpendicular to this one,
@@ -216,4 +218,6 @@ protected:
real _lengthFlat;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_ADVANCED_STROKE_SHADERS_H__

View File

@@ -51,6 +51,8 @@ extern "C" {
# include "IMB_imbuf_types.h"
}
namespace Freestyle {
// Internal function
#if 0 // soc
@@ -1128,3 +1130,5 @@ int fstreamShader::shade(Stroke& stroke) const
}
} // end of namespace StrokeShaders
} /* namespace Freestyle */

View File

@@ -37,6 +37,9 @@
#include "../geometry/Geom.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
namespace StrokeShaders {
@@ -892,4 +895,6 @@ public:
} // end of namespace StrokeShaders
} /* namespace Freestyle */
#endif // __FREESTYLE_BASIC_STROKE_SHADERS_H__

View File

@@ -54,6 +54,8 @@ extern "C" {
using namespace std;
namespace Freestyle {
LIB_STROKE_EXPORT
Canvas *Canvas::_pInstance = 0;
@@ -466,3 +468,5 @@ float Canvas::readMapPixel(const char *iMapName, int level, int x, int y)
return pyramid->pixel(x, height() - 1 - y, level);
}
} /* namespace Freestyle */

View File

@@ -40,6 +40,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
struct ltstr
@@ -239,4 +241,6 @@ public:
void setModified(unsigned index, bool b);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_CANVAS_H__

View File

@@ -30,6 +30,8 @@
#include "../view_map/ViewMapAdvancedIterators.h"
#include "../view_map/ViewMapIterators.h"
namespace Freestyle {
void Chain::push_viewedge_back(ViewEdge *iViewEdge, bool orientation)
{
ViewEdge::vertex_iterator v;
@@ -147,3 +149,5 @@ void Chain::push_viewedge_front(ViewEdge *iViewEdge, bool orientation)
if (!_fedgeB)
_fedgeB = (orientation) ? iViewEdge->fedgeB() : iViewEdge->fedgeA();
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../view_map/ViewMap.h"
namespace Freestyle {
/*! Class to represent a 1D elements issued from the chaining process.
* A Chain is the last step before the Stroke and is used in the Splitting and Creation processes.
*/
@@ -106,4 +108,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_CHAIN_H__

View File

@@ -29,6 +29,8 @@
#include "../system/TimeStamp.h"
namespace Freestyle {
ViewEdge *AdjacencyIterator::operator*()
{
return (*_internalIterator).first;
@@ -193,3 +195,5 @@ int ChainPredicateIterator::traverse(const AdjacencyIterator& ait)
result = 0;
return 0;
}
} /* namespace Freestyle */

View File

@@ -42,6 +42,8 @@
//using namespace ViewEdgeInternal;
namespace Freestyle {
//
// Adjacency iterator used in the chaining process
//
@@ -397,4 +399,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_CHAINING_ITERATORS_H__

View File

@@ -32,6 +32,8 @@
#include "../system/TimeStamp.h"
namespace Freestyle {
namespace ContextFunctions {
unsigned GetTimeStampCF()
@@ -78,3 +80,5 @@ FEdge *GetSelectedFEdgeCF()
}
} // ContextFunctions namespace
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../image/GaussianFilter.h"
#include "../image/Image.h"
namespace Freestyle {
//
// Context Functions definitions
//
@@ -110,4 +112,6 @@ FEdge *GetSelectedFEdgeCF();
} // end of namespace ContextFunctions
} /* namespace Freestyle */
#endif // __FREESTYLE_CONTEXT_FUNCTIONS_H__

View File

@@ -31,6 +31,8 @@
#include "BKE_global.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -923,3 +925,5 @@ void Curve::computeCurvatureAndOrientation ()
}
#endif
}
} /* namespace Freestyle */

View File

@@ -42,6 +42,9 @@
#include "../system/BaseIterator.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
/**********************************/
@@ -579,4 +582,6 @@ public:
virtual Interface0DIterator pointsEnd(float t = 0.0f);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_CURVE_H__

View File

@@ -30,6 +30,8 @@
#include "Stroke.h"
namespace Freestyle {
namespace CurveInternal {
class CurvePoint_const_traits : public Const_traits<CurvePoint*>
@@ -373,4 +375,6 @@ protected:
} // end of namespace CurveInternal
} /* namespace Freestyle */
#endif // __FREESTYLE_CURVE_ADVANCED_ITERATORS_H__

View File

@@ -31,6 +31,8 @@
#include "Curve.h"
#include "Stroke.h"
namespace Freestyle {
namespace CurveInternal {
/*! iterator on a curve. Allows an iterating outside
@@ -292,4 +294,6 @@ public:
} // end of namespace CurveInternal
} /* namespace Freestyle */
#endif // __FREESTYLE_CURVE_ITERATORS_H__

View File

@@ -30,6 +30,8 @@
#include "TimeStamp.h"
namespace Freestyle {
/* ----------------------------------------- *
* *
* modifiers *
@@ -64,4 +66,6 @@ struct TimestampModifier : public EdgeModifier<Edge>
}
};
} /* namespace Freestyle */
#endif // MODIFIERS_H

View File

@@ -31,6 +31,8 @@
#include "Canvas.h"
#include "StyleModule.h"
namespace Freestyle {
class Module
{
public:
@@ -72,4 +74,6 @@ private:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_MODULE_H__

View File

@@ -32,9 +32,12 @@
#include "Operators.h"
#include "Canvas.h"
#include "Stroke.h"
#include "CurveIterators.h"
#include "BKE_global.h"
namespace Freestyle {
LIB_STROKE_EXPORT Operators::I1DContainer Operators::_current_view_edges_set;
LIB_STROKE_EXPORT Operators::I1DContainer Operators::_current_chains_set;
LIB_STROKE_EXPORT Operators::I1DContainer *Operators::_current_set = NULL;
@@ -79,7 +82,6 @@ int Operators::select(UnaryPredicate1D& pred)
return 0;
}
int Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred, UnaryFunction1D_void& modifier)
{
if (_current_view_edges_set.empty())
@@ -140,7 +142,6 @@ error:
return -1;
}
int Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& pred)
{
if (_current_view_edges_set.empty())
@@ -659,8 +660,6 @@ error:
return -1;
}
#include "CurveIterators.h"
// Internal function
static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling,
Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains)
@@ -814,7 +813,6 @@ int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& p
return 0;
}
// recursive split with pred 0D
static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d,
UnaryPredicate1D& pred, float sampling,
@@ -1205,7 +1203,6 @@ inline int applyShading(Stroke& stroke, vector<StrokeShader*>& shaders)
return 0;
}
int Operators::create(UnaryPredicate1D& pred, vector<StrokeShader*> shaders)
{
//Canvas* canvas = Canvas::getInstance();
@@ -1272,3 +1269,5 @@ void Operators::reset()
_current_set = &_current_view_edges_set;
_current_strokes_set.clear();
}
} /* namespace Freestyle */

View File

@@ -43,6 +43,8 @@
#include "../view_map/Interface1D.h"
#include "../view_map/ViewMap.h"
namespace Freestyle {
/*! Class defining the operators used in a style module.
* There are 4 classes of operators: Selection, Chaining, Splitting and Creating. All these operators are
* user controlled in the scripting language through Functors, Predicates and Shaders that are taken as arguments.
@@ -264,4 +266,6 @@ private:
static StrokesContainer _current_strokes_set;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_OPERATORS_H__

View File

@@ -28,6 +28,8 @@
#include "Canvas.h"
#include "PSStrokeRenderer.h"
namespace Freestyle {
PSStrokeRenderer::PSStrokeRenderer(const char *iFileName) : StrokeRenderer()
{
if (!iFileName)
@@ -97,3 +99,5 @@ void PSStrokeRenderer::Close()
if (_ofstream.is_open())
_ofstream.close();
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -59,4 +61,6 @@ protected:
mutable ofstream _ofstream;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_PS_STROKE_RENDERER_H__

View File

@@ -33,6 +33,8 @@
#include "../view_map/Functions0D.h"
namespace Freestyle {
//
// UnaryPredicate0D (base class for predicates in 0D)
//
@@ -176,4 +178,6 @@ public:
} // end of namespace Predicates0D
} /* namespace Freestyle */
#endif // __FREESTYLE_PREDICATES_0D_H__

View File

@@ -40,6 +40,8 @@
#include "../view_map/Interface1D.h"
#include "../view_map/Functions1D.h"
namespace Freestyle {
//
// UnaryPredicate1D (base class for predicates in 1D)
//
@@ -578,4 +580,6 @@ public:
} // end of namespace Predicates1D
} /* namespace Freestyle */
#endif // __FREESTYLE_PREDICATES_1D_H__

View File

@@ -32,6 +32,8 @@
#include "InformationMap.h"
namespace Freestyle {
class QInformationMap : public InformationMap
{
private:
@@ -63,4 +65,6 @@ protected:
virtual float computeGaussian(int x, int y);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_Q_INFORMATION_MAP_H__

View File

@@ -32,6 +32,8 @@
#include "BKE_global.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -945,3 +947,5 @@ real Stroke::local_average_density(float sigma , int iCombination ) const
return density_edge_function<Stroke>(*this, iCombination);
}
#endif
} /* namespace Freestyle */

View File

@@ -39,6 +39,7 @@
#include "../system/FreestyleConfig.h"
#include "../system/StringUtils.h"
namespace Freestyle {
//
// StrokeAttribute
@@ -812,4 +813,6 @@ Stroke::Stroke(InputVertexIterator iBegin, InputVertexIterator iEnd)
_id = 0;
}
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_H__

View File

@@ -31,6 +31,8 @@
#include "Stroke.h"
namespace Freestyle {
namespace StrokeInternal {
class vertex_const_traits : public Const_traits<StrokeVertex*>
@@ -181,4 +183,6 @@ public:
} // end of namespace StrokeInternal
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_ADVANCED_ITERATORS_H__

View File

@@ -29,6 +29,8 @@
#include "StrokeIO.h"
namespace Freestyle {
ostream& operator<<(ostream& out, const StrokeAttribute& iStrokeAttribute)
{
out << " StrokeAttribute" << endl;
@@ -68,3 +70,5 @@ ostream& operator<<(ostream& out, const Stroke& iStroke)
}
return out;
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
LIB_STROKE_EXPORT
ostream& operator<<(ostream& out, const StrokeAttribute& iStrokeAttribute);
@@ -43,4 +45,6 @@ ostream& operator<<(ostream& out, const StrokeVertex& iStrokeVertex);
LIB_STROKE_EXPORT
ostream& operator<<(ostream& out, const Stroke& iStroke);
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_IO_H__

View File

@@ -30,6 +30,8 @@
#include "Stroke.h"
namespace Freestyle {
namespace StrokeInternal {
//
@@ -219,4 +221,6 @@ private:
} // end of namespace StrokeInternal
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_ITERATORS_H__

View File

@@ -29,6 +29,8 @@
#include "Stroke.h"
#include "StrokeLayer.h"
namespace Freestyle {
StrokeLayer::~StrokeLayer()
{
clear();
@@ -61,3 +63,5 @@ void StrokeLayer::clear()
delete *s;
_strokes.clear();
}
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include <deque>
namespace Freestyle {
class Stroke;
class StrokeRenderer;
class StrokeLayer
@@ -96,4 +98,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_LAYER_H__

View File

@@ -31,6 +31,8 @@
using namespace std;
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -129,3 +131,5 @@ string TextureManager::Options::getBrushesPath()
{
return _brushes_path;
}
} /* namespace Freestyle */

View File

@@ -38,6 +38,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -135,4 +137,6 @@ public:
static TextureManager *_textureManager;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_RENDERER_H__

View File

@@ -33,6 +33,8 @@
using namespace std;
namespace Freestyle {
//
// STROKE VERTEX REP
/////////////////////////////////////
@@ -780,3 +782,5 @@ void StrokeRep::Render(const StrokeRenderer *iRenderer)
{
iRenderer->RenderStrokeRep(this);
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../geometry/Geom.h"
namespace Freestyle {
using namespace Geometry;
#if 0
@@ -207,4 +209,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_REP_H__

View File

@@ -34,6 +34,8 @@
#include "../python/Director.h"
namespace Freestyle {
//
// StrokeShader base class
//
@@ -97,4 +99,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_SHADERS_H__

View File

@@ -32,6 +32,8 @@
#include "../scene_graph/NodeGroup.h"
#include "../scene_graph/NodeShape.h"
namespace Freestyle {
LineRep *StrokeTesselator::Tesselate(Stroke *iStroke)
{
if (0 == iStroke)
@@ -85,3 +87,5 @@ NodeGroup *StrokeTesselator::Tesselate(StrokeVertexIterator begin, StrokeVertexI
return group;
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../scene_graph/LineRep.h"
namespace Freestyle {
class StrokeTesselator
{
public:
@@ -68,4 +70,6 @@ private:
bool _overloadFrsMaterial;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STROKE_TESSELATOR_H__

View File

@@ -41,6 +41,8 @@
using namespace std;
namespace Freestyle {
class StyleModule
{
public:
@@ -174,4 +176,6 @@ protected:
Interpreter *_inter;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STYLE_MODULE_H__

View File

@@ -23,6 +23,8 @@
# include "Canvas.h"
# include "StrokeIterators.h"
namespace Freestyle {
TextStrokeRenderer::TextStrokeRenderer(const char *iFileName)
:StrokeRenderer()
{
@@ -77,3 +79,4 @@ void TextStrokeRenderer::Close()
_ofstream.close();
}
} /* namespace Freestyle */

View File

@@ -39,6 +39,8 @@
# include "../system/FreestyleConfig.h"
# include <fstream>
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -64,5 +66,6 @@ protected:
mutable ofstream _ofstream;
};
#endif // TEXTSTROKERENDERER_H
} /* namespace Freestyle */
#endif // TEXTSTROKERENDERER_H

View File

@@ -30,6 +30,8 @@
#include <iterator>
namespace Freestyle {
// use for iterators defintions
template <class Element>
class Nonconst_traits;
@@ -87,4 +89,6 @@ protected:
IteratorBase() {}
};
} /* namespace Freestyle */
#endif // BASEITERATOR_H

View File

@@ -31,6 +31,8 @@
#include "FreestyleConfig.h"
namespace Freestyle {
class LIB_SYSTEM_EXPORT BaseObject
{
public:
@@ -67,4 +69,6 @@ private:
unsigned _ref_counter;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_BASE_OBJECT_H__

View File

@@ -28,6 +28,8 @@
* \date 01/07/2003
*/
namespace Freestyle {
namespace Cast
{
template <class T, class U>
@@ -39,4 +41,6 @@ namespace Cast
}
} // end of namespace Cast
} /* namespace Freestyle */
#endif // __FREESTYLE_CAST_H__

View File

@@ -27,4 +27,8 @@
#include "Exception.h"
namespace Freestyle {
Exception::exception_type Exception::_exception = Exception::NO_EXCEPTION;
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "FreestyleConfig.h"
namespace Freestyle {
class LIB_SYSTEM_EXPORT Exception
{
public:
@@ -60,4 +62,6 @@ private:
static exception_type _exception;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_EXCEPTION_H__

View File

@@ -34,6 +34,8 @@
using namespace std;
namespace Freestyle {
namespace Config {
// Directory separators
@@ -86,4 +88,6 @@ namespace Config {
} // end of namespace Config
} /* namespace Freestyle */
#endif // __FREESTYLE_CONFIG_H__

View File

@@ -28,6 +28,8 @@
* \date 01/07/2003
*/
namespace Freestyle {
/*! Class used to tag any object by an id.
* It is made of two unsigned integers.
*/
@@ -132,4 +134,6 @@ inline std::ostream& operator<<(std::ostream& s, const Id& id)
return s;
}
} /* namespace Freestyle */
# endif // __FREESTYLE_ID_H__

View File

@@ -32,6 +32,8 @@
using namespace std;
namespace Freestyle {
class LIB_SYSTEM_EXPORT Interpreter
{
public:
@@ -55,4 +57,6 @@ protected:
string _language;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_INTERPRETER_H__

View File

@@ -30,6 +30,8 @@
using namespace std;
namespace Freestyle {
class Iterator
{
public:
@@ -65,4 +67,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_ITERATOR_H__

View File

@@ -61,6 +61,8 @@
#include <algorithm>
namespace Freestyle {
template <typename C, typename T>
class PointerSequence : public C
{
@@ -86,4 +88,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_POINTER_SEQUENCE_H__

View File

@@ -28,10 +28,14 @@
* \date 30/07/2002
*/
namespace Freestyle {
typedef double real;
#ifndef SWIG
static const real M_EPSILON = 0.00000001;
#endif // SWIG
} /* namespace Freestyle */
#endif // __FREESTYLE_PRECISION_H__

View File

@@ -32,6 +32,8 @@
using namespace std;
namespace Freestyle {
class ProgressBar
{
public:
@@ -86,4 +88,6 @@ protected:
string _label;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_PROGRESS_BAR_H__

View File

@@ -30,6 +30,8 @@
#include "PseudoNoise.h"
#include "RandGen.h"
namespace Freestyle {
static const unsigned NB_VALUE_NOISE = 512;
real *PseudoNoise::_values;
@@ -107,3 +109,5 @@ real PseudoNoise::turbulenceLinear(real x, unsigned nbOctave)
}
return y;
}
} /* namespace Freestyle */

View File

@@ -31,6 +31,8 @@
#include "FreestyleConfig.h"
#include "Precision.h"
namespace Freestyle {
class LIB_SYSTEM_EXPORT PseudoNoise
{
public:
@@ -50,4 +52,6 @@ protected:
static real *_values;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_PSEUDO_NOISE_H__

View File

@@ -27,5 +27,9 @@
#include "PythonInterpreter.h"
namespace Freestyle {
string PythonInterpreter::_path = "";
bool PythonInterpreter::_initialized = false;
} /* namespace Freestyle */

View File

@@ -36,7 +36,6 @@
//soc
extern "C" {
#include "MEM_guardedalloc.h"
#include "DNA_text_types.h"
@@ -49,9 +48,10 @@ extern "C" {
#include "BKE_text.h"
#include "BPY_extern.h"
}
namespace Freestyle {
class LIB_SYSTEM_EXPORT PythonInterpreter : public Interpreter
{
public:
@@ -188,4 +188,6 @@ private:
static string _path;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_PYTHON_INTERPRETER_H__

View File

@@ -27,6 +27,8 @@
#include "RandGen.h"
namespace Freestyle {
//
// Macro definitions
//
@@ -129,3 +131,5 @@ void RandGen::next()
x[1] = LOW(p[1] + r[0]);
x[0] = LOW(p[0]);
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../system/Precision.h"
namespace Freestyle {
class LIB_SYSTEM_EXPORT RandGen
{
public:
@@ -44,4 +46,6 @@ private:
static void next();
};
} /* namespace Freestyle */
#endif // __FREESTYLE_RAND_GEN_H__

View File

@@ -29,11 +29,11 @@
*/
extern "C" {
#include "render_types.h"
}
namespace Freestyle {
class RenderMonitor
{
public:
@@ -53,4 +53,6 @@ protected:
Render *_re;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_RENDER_MONITOR_H__

View File

@@ -30,6 +30,8 @@
#include "FreestyleConfig.h"
#include "StringUtils.h"
namespace Freestyle {
namespace StringUtils {
void getPathName(const string& path, const string& base, vector<string>& pathnames)
@@ -80,3 +82,5 @@ const char *toAscii(const char *str)
}
} // end of namespace StringUtils
} /* namespace Freestyle */

View File

@@ -47,6 +47,8 @@ extern "C" {
using namespace std;
namespace Freestyle {
namespace StringUtils {
LIB_SYSTEM_EXPORT
@@ -65,4 +67,6 @@ struct ltstr
} // end of namespace StringUtils
} /* namespace Freestyle */
#endif // __FREESTYLE_STRING_UTILS_H__

View File

@@ -27,5 +27,9 @@
#include "TimeStamp.h"
namespace Freestyle {
LIB_SYSTEM_EXPORT
TimeStamp *TimeStamp::_instance = 0;
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "FreestyleConfig.h"
namespace Freestyle {
class LIB_SYSTEM_EXPORT TimeStamp
{
public:
@@ -68,4 +70,6 @@ private:
unsigned _time_stamp;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_TIME_STAMP_H__

View File

@@ -32,6 +32,8 @@
#include "FreestyleConfig.h"
namespace Freestyle {
class Chronometer
{
public:
@@ -54,4 +56,6 @@ private:
clock_t _start;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_TIME_UTILS_H__

View File

@@ -29,6 +29,8 @@
#include "BKE_global.h"
namespace Freestyle {
ArbitraryGridDensityProvider::ArbitraryGridDensityProvider(OccluderSource& source, const real proscenium[4],
unsigned numCells)
: GridDensityProvider(source), numCells(numCells)
@@ -115,3 +117,5 @@ auto_ptr<GridDensityProvider> ArbitraryGridDensityProviderFactory::newGridDensit
{
return auto_ptr<GridDensityProvider>(new ArbitraryGridDensityProvider(source, numCells));
}
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "GridDensityProvider.h"
namespace Freestyle {
class ArbitraryGridDensityProvider : public GridDensityProvider
{
// Disallow copying and assignment
@@ -65,4 +67,6 @@ protected:
unsigned numCells;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_ARBITRARY_GRID_DENSITY_PROVIDER_H__

View File

@@ -29,6 +29,8 @@
#include "BKE_global.h"
namespace Freestyle {
AverageAreaGridDensityProvider::AverageAreaGridDensityProvider(OccluderSource& source, const real proscenium[4],
real sizeFactor)
: GridDensityProvider(source)
@@ -129,3 +131,5 @@ auto_ptr<GridDensityProvider> AverageAreaGridDensityProviderFactory::newGridDens
{
return auto_ptr<GridDensityProvider>(new AverageAreaGridDensityProvider(source, sizeFactor));
}
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "GridDensityProvider.h"
namespace Freestyle {
class AverageAreaGridDensityProvider : public GridDensityProvider
{
// Disallow copying and assignment
@@ -62,4 +64,6 @@ protected:
real sizeFactor;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_AVERAGE_AREA_GRID_DENSITY_PROVIDER_H__

View File

@@ -34,6 +34,8 @@
using namespace std;
namespace Freestyle {
// Helper Classes
// OccluderData
@@ -232,3 +234,5 @@ Vec3r BoxGrid::Transform::operator()(const Vec3r& point) const
{
return Vec3r(point[0], point[1], -point[2]);
}
} /* namespace Freestyle */

View File

@@ -50,6 +50,8 @@
#include "BKE_global.h"
namespace Freestyle {
class BoxGrid
{
public:
@@ -407,4 +409,6 @@ inline bool BoxGrid::insertOccluder(OccluderSource& source, OccluderData*& occlu
return occluder != NULL;
}
} /* namespace Freestyle */
#endif // __FREESTYLE_BOX_GRID_H__

View File

@@ -33,6 +33,8 @@
#include "BKE_global.h"
namespace Freestyle {
CulledOccluderSource::CulledOccluderSource(const GridHelpers::Transform& t, WingedEdge& we, ViewMap& viewMap,
bool extensiveFEdgeSearch)
: OccluderSource(t, we), rejected(0), gridSpaceOccluderProsceniumInitialized(false)
@@ -278,3 +280,5 @@ void CulledOccluderSource::expandGridSpaceOccluderProscenium(FEdge *fe)
gridSpaceOccluderProsceniumInitialized = true;
}
}
} /* namespace Freestyle */

View File

@@ -31,6 +31,8 @@
#include "OccluderSource.h"
#include "ViewMap.h"
namespace Freestyle {
class CulledOccluderSource : public OccluderSource
{
// Disallow copying and assignment
@@ -59,4 +61,6 @@ private:
bool gridSpaceOccluderProsceniumInitialized;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_CULLED_OCCLUDER_SOURCE_H__

View File

@@ -35,6 +35,8 @@
#include "BKE_global.h"
namespace Freestyle {
void FEdgeXDetector::processShapes(WingedEdge& we)
{
bool progressBarDisplay = false;
@@ -753,3 +755,5 @@ void FEdgeXDetector::buildSmoothEdges(WXShape *iShape)
_meanKr /= (real)(_nPoints);
}
}
} /* namespace Freestyle */

View File

@@ -39,6 +39,8 @@
#include "../winged_edge/Curvature.h"
#include "../winged_edge/WXEdge.h"
namespace Freestyle {
using namespace Geometry;
/*! This class takes as input a WXEdge structure and fills it */
@@ -231,4 +233,6 @@ protected:
RenderMonitor *_pRenderMonitor;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_FEDGE_X_DETECTOR_H__

View File

@@ -33,6 +33,8 @@
using namespace std;
namespace Freestyle {
namespace Functions0D {
// Internal function
@@ -367,3 +369,5 @@ int GetOccludeeF0D::operator()(Interface0DIterator& iter)
}
} // end of namespace Functions0D
} /* namespace Freestyle */

View File

@@ -43,6 +43,8 @@
#include "../system/Exception.h"
#include "../system/Precision.h"
namespace Freestyle {
class FEdge;
class ViewEdge;
class SShape;
@@ -522,4 +524,6 @@ ViewShape *getOccludeeF0D(Interface0DIterator& it);
} // end of namespace Functions0D
} /* namespace Freestyle */
#endif // __FREESTYLE_FUNCTIONS_0D_H__

View File

@@ -30,6 +30,8 @@
using namespace std;
namespace Freestyle {
namespace Functions1D {
int GetXF1D::operator()(Interface1D& inter)
@@ -262,3 +264,5 @@ void getShapeF1D(Interface1D& inter, set<ViewShape*>& oShapes)
}
} // end of namespace Functions1D
} /* namespace Freestyle */

View File

@@ -39,6 +39,8 @@
#include "../python/Director.h"
namespace Freestyle {
//
// UnaryFunction1D (base class for functions in 1D)
//
@@ -617,4 +619,6 @@ void getShapeF1D(Interface1D& inter, set<ViewShape*>& oShapes);
} // end of namespace Functions1D
} /* namespace Freestyle */
#endif // __FREESTYLE_FUNCTIONS_1D_H__

View File

@@ -37,6 +37,8 @@
#include "BKE_global.h"
namespace Freestyle {
class GridDensityProvider
{
// Disallow copying and assignment
@@ -142,4 +144,6 @@ public:
virtual ~GridDensityProviderFactory () {}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_GRID_DENSITY_PROVIDER_H__

View File

@@ -27,6 +27,8 @@
#include "HeuristicGridDensityProviderFactory.h"
namespace Freestyle {
HeuristicGridDensityProviderFactory::HeuristicGridDensityProviderFactory(real sizeFactor, unsigned numFaces)
: sizeFactor(sizeFactor), numFaces(numFaces)
{
@@ -75,3 +77,5 @@ auto_ptr<GridDensityProvider> HeuristicGridDensityProviderFactory::newGridDensit
return (auto_ptr<GridDensityProvider>) avg;
}
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
//#include "GridDensityProvider.h" // provided by *GridDensityProvider.h below
#include "Pow23GridDensityProvider.h"
namespace Freestyle {
class HeuristicGridDensityProviderFactory : public GridDensityProviderFactory
{
public:
@@ -50,4 +52,6 @@ protected:
unsigned numFaces;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_HEURISTIC_GRID_DENSITY_PROVIDER_FACTORY_H__

View File

@@ -42,6 +42,8 @@
using namespace std;
namespace Freestyle {
//
// Interface0D
//
@@ -380,4 +382,6 @@ protected:
Interface0DIteratorNested *_iterator;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_INTERFACE_0D_H__

View File

@@ -42,6 +42,8 @@
using namespace std;
namespace Freestyle {
// Integration method
/*! The different integration methods that can be invoked to integrate into a single value the set of values obtained
* from each 0D element of a 1D element.
@@ -220,4 +222,6 @@ protected:
unsigned _timeStamp;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_INTERFACE_1D_H__

View File

@@ -31,6 +31,8 @@
#include "BKE_global.h"
namespace Freestyle {
OccluderSource::OccluderSource(const GridHelpers::Transform& t, WingedEdge& we)
: wingedEdge(we), valid(false), transform(t)
{
@@ -142,3 +144,5 @@ real OccluderSource::averageOccluderArea()
area /= numFaces;
return area;
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "../winged_edge/WEdge.h"
namespace Freestyle {
class OccluderSource
{
// Disallow copying and assignment
@@ -66,4 +68,6 @@ protected:
void buildCachedPolygon();
};
} /* namespace Freestyle */
#endif // __FREESTYLE_OCCLUDER_SOURCE_H__

View File

@@ -29,6 +29,8 @@
#include "BKE_global.h"
namespace Freestyle {
Pow23GridDensityProvider::Pow23GridDensityProvider(OccluderSource& source, const real proscenium[4], unsigned numFaces)
: GridDensityProvider(source), numFaces(numFaces)
{
@@ -114,3 +116,5 @@ auto_ptr<GridDensityProvider> Pow23GridDensityProviderFactory::newGridDensityPro
{
return auto_ptr<GridDensityProvider>(new Pow23GridDensityProvider(source, numFaces));
}
} /* namespace Freestyle */

View File

@@ -30,6 +30,8 @@
#include "GridDensityProvider.h"
namespace Freestyle {
class Pow23GridDensityProvider : public GridDensityProvider
{
// Disallow copying and assignment
@@ -65,4 +67,6 @@ protected:
unsigned numFaces;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_POW_23_GRID_DENSITY_PROVIDER_H__

View File

@@ -28,6 +28,8 @@
#include "Silhouette.h"
#include "ViewMap.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -411,3 +413,5 @@ const FrsMaterial& FEdgeSmooth::frs_material() const
{
return _VertexA->shape()->frs_material(_FrsMaterialIndex);
}
} /* namespace Freestyle */

View File

@@ -49,6 +49,9 @@
#include "../winged_edge/Curvature.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
class ViewShape;
@@ -1866,4 +1869,6 @@ public:
}
};
} /* namespace Freestyle */
#endif // __FREESTYLE_SILHOUETTE_H__

View File

@@ -35,6 +35,8 @@
using namespace std;
namespace Freestyle {
Vec3r SilhouetteGeomEngine::_Viewpoint = Vec3r(0, 0, 0);
real SilhouetteGeomEngine::_translation[3] = {0, 0, 0};
real SilhouetteGeomEngine::_modelViewMatrix[4][4] = {
@@ -313,3 +315,5 @@ Vec3r SilhouetteGeomEngine::WorldToImage(const Vec3r& M)
newPoint[2] = (-newPoint[2] - _znear) * fac; // normalize Z between 0 and 1
return newPoint;
}
} /* namespace Freestyle */

View File

@@ -35,6 +35,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
using namespace Geometry;
class SVertex;
@@ -126,4 +128,6 @@ public:
static Vec3r WorldToImage(const Vec3r& M);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_SILHOUETTE_GEOM_ENGINE_H__

View File

@@ -34,6 +34,8 @@
using namespace std;
namespace Freestyle {
// Helper Classes
// OccluderData
@@ -240,3 +242,5 @@ Vec3r SphericalGrid::Transform::sphericalProjection(const Vec3r& M)
return newPoint;
}
} /* namespace Freestyle */

View File

@@ -49,6 +49,8 @@
#include "BKE_global.h"
namespace Freestyle {
class SphericalGrid
{
public:
@@ -413,4 +415,6 @@ inline bool SphericalGrid::insertOccluder(OccluderSource& source, OccluderData*&
return occluder != NULL;
}
} /* namespace Freestyle */
#endif // __FREESTYLE_SPHERICAL_GRID_H__

View File

@@ -45,6 +45,8 @@ extern "C" {
#include "IMB_imbuf_types.h"
}
namespace Freestyle {
using namespace Geometry;
SteerableViewMap::SteerableViewMap(unsigned int nbOrientations)
@@ -293,3 +295,5 @@ void SteerableViewMap::saveSteerableViewMap() const
#endif
}
}
} /* namespace Freestyle */

View File

@@ -34,10 +34,12 @@
#include "../system/FreestyleConfig.h"
using namespace Geometry;
using namespace std;
namespace Freestyle {
using namespace Geometry;
class FEdge;
class ImagePyramid;
class GrayImage;
@@ -144,4 +146,6 @@ protected:
void Build();
};
} /* namespace Freestyle */
#endif // __FREESTYLE_STEERABLE_VIEW_MAP_H__

View File

@@ -35,6 +35,8 @@
using namespace std;
namespace Freestyle {
void ViewEdgeXBuilder::Init(ViewShape *oVShape)
{
if (0 == oVShape)
@@ -744,3 +746,5 @@ ViewVertex *ViewEdgeXBuilder::MakeViewVertex(SVertex *iSVertex)
_pCurrentVShape->AddVertex(vva);
return vva;
}
} /* namespace Freestyle */

View File

@@ -47,9 +47,12 @@
#include "../system/FreestyleConfig.h"
using namespace Geometry;
using namespace std;
namespace Freestyle {
using namespace Geometry;
class SVertex;
/*! Defines a hash table used for searching the SVertex */
@@ -278,4 +281,6 @@ protected:
ViewShape *_pCurrentVShape;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_EDGE_X_BUILDER_H__

View File

@@ -33,6 +33,8 @@
#include "../geometry/GeomUtils.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -745,3 +747,5 @@ void ViewEdge::UpdateFEdges()
// last one
_FEdgeB->setViewEdge(this);
}
} /* namespace Freestyle */

View File

@@ -39,6 +39,8 @@
#include "../system/BaseIterator.h"
#include "../system/FreestyleConfig.h"
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -1769,4 +1771,6 @@ inline real ViewEdge::curvature2d_as_angle(int iCombination) const
}
#endif
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_MAP_H__

View File

@@ -33,6 +33,8 @@
#include "../system/Iterator.h" //soc
namespace Freestyle {
/**********************************/
/* */
/* */
@@ -779,4 +781,6 @@ protected:
} // end of namespace ViewEdgeInternal
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_MAP_ADVANCED_ITERATORS_H__

View File

@@ -45,6 +45,8 @@
#include "BKE_global.h"
namespace Freestyle {
// XXX Grmll... G is used as template's typename parameter :/
const Global &_global = G;
@@ -2382,3 +2384,5 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
}
}
}
} /* namespace Freestyle */

View File

@@ -52,6 +52,8 @@
#include "../winged_edge/WEdge.h"
#include "../winged_edge/WXEdge.h"
namespace Freestyle {
using namespace Geometry;
class LIB_VIEW_MAP_EXPORT ViewMapBuilder
@@ -247,4 +249,6 @@ protected:
Vec3r& u, Vec3r& A, Vec3r& origin, Vec3r& edge, vector<WVertex*>& faceVertices);
};
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_MAP_BUILDER_H__

View File

@@ -52,6 +52,8 @@
(ptr) = NULL; \
} (void)0
namespace Freestyle {
namespace ViewMapIO {
namespace Internal {
@@ -1249,3 +1251,5 @@ string getModelsPath()
} // End of namepace Options
} // End of namespace ViewMapIO
} /* namespace Freestyle */

View File

@@ -36,6 +36,8 @@
#include "../system/FreestyleConfig.h"
#include "../system/ProgressBar.h"
namespace Freestyle {
namespace ViewMapIO {
static const unsigned ZERO = UINT_MAX;
@@ -119,4 +121,6 @@ istream& read<0>(istream& in, char *)
} // End of namespace ViewMapIO
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_MAP_IO_H__

View File

@@ -32,6 +32,7 @@
#include "../system/Iterator.h" //soc
namespace Freestyle {
/**********************************/
/* */
@@ -564,4 +565,6 @@ protected:
} // end of namespace ViewEdgeInternal
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_MAP_ITERATORS_H__

View File

@@ -27,6 +27,8 @@
#include "ViewMapTesselator.h"
namespace Freestyle {
NodeGroup *ViewMapTesselator::Tesselate(ViewMap *iViewMap)
{
if (0 == iViewMap->ViewEdges().size())
@@ -40,3 +42,5 @@ NodeGroup *ViewMapTesselator::Tesselate(WShape *)
{
return NULL;
}
} /* namespace Freestyle */

View File

@@ -39,6 +39,8 @@
#include "../winged_edge/WEdge.h"
namespace Freestyle {
class NodeShape;
class NodeGroup;
class SShape;
@@ -201,4 +203,6 @@ NodeGroup *ViewMapTesselator::Tesselate(ViewEdgesIterator begin, ViewEdgesIterat
return group;
}
} /* namespace Freestyle */
#endif // __FREESTYLE_VIEW_MAP_TESSELATOR_H__

View File

@@ -56,6 +56,8 @@
#include "../system/FreestyleConfig.h"
namespace Freestyle {
static bool angle_obtuse(WVertex *v, WFace *f)
{
WOEdge *e;
@@ -637,3 +639,5 @@ void compute_curvature_tensor_one_ring(WVertex *start, NormalCycle& nc)
}
} // OGF namespace
} /* namespace Freestyle */

View File

@@ -51,6 +51,8 @@
#include "../system/FreestyleConfig.h"
#include "../system/Precision.h"
namespace Freestyle {
using namespace Geometry;
class WVertex;
@@ -137,4 +139,6 @@ void LIB_WINGED_EDGE_EXPORT compute_curvature_tensor_one_ring(WVertex *start, No
} // OGF namespace
} /* namespace Freestyle */
#endif /* __FREESTYLE_CURVATURE_H__ */

View File

@@ -28,6 +28,8 @@
* \date 01/07/2003
*/
namespace Freestyle {
/*! Namespace gathering the different possible natures of 0D and 1D elements of the ViewMap */
namespace Nature {
@@ -69,4 +71,6 @@ static const EdgeNature EDGE_MARK = (1 << 7); // 128
} // end of namespace Nature
} /* namespace Freestyle */
#endif // __FREESTYLE_NATURE_H__

View File

@@ -29,6 +29,8 @@
#include "WEdge.h"
namespace Freestyle {
/*! Temporary structures */
class vertexdata
{
@@ -704,4 +706,6 @@ WFace *WShape::MakeFace(vector<WVertex *>& iVertexList, vector<bool>& iFaceEdgeM
AddFace(face);
return face;
}
}
} /* namespace Freestyle */

View File

@@ -39,6 +39,9 @@
#include "../system/FreestyleConfig.h"
using namespace std;
namespace Freestyle {
using namespace Geometry;
@@ -1334,4 +1337,6 @@ inline void WOEdge::setVecAndAngle()
}
}
#endif // __FREESTYLE_W_EDGE_H__
} /* namespace Freestyle */
#endif // __FREESTYLE_W_EDGE_H__

View File

@@ -29,6 +29,8 @@
#include "WEdge.h"
#include "WFillGrid.h"
namespace Freestyle {
void WFillGrid::fillGrid()
{
if (!_winged_edge || !_grid)
@@ -58,4 +60,6 @@ void WFillGrid::fillGrid()
}
faces.clear();
}
}
}
} /* namespace Freestyle */

View File

@@ -34,6 +34,8 @@
#include "../geometry/Grid.h"
#include "../geometry/Polygon.h"
namespace Freestyle {
class LIB_WINGED_EDGE_EXPORT WFillGrid
{
public:
@@ -78,4 +80,6 @@ private:
unsigned _polygon_id;
};
#endif // __FREESTYLE_W_FILL_GRID_H__
} /* namespace Freestyle */
#endif // __FREESTYLE_W_FILL_GRID_H__

View File

@@ -28,6 +28,8 @@
#include "WEdge.h"
#include "WSFillGrid.h"
namespace Freestyle {
void WSFillGrid::fillGrid()
{
if (!_winged_edge || !_grid)
@@ -57,4 +59,6 @@ void WSFillGrid::fillGrid()
}
faces.clear();
}
}
}
} /* namespace Freestyle */

View File

@@ -33,6 +33,8 @@
#include "../geometry/Grid.h"
#include "../geometry/Polygon.h"
namespace Freestyle {
class LIB_WINGED_EDGE_EXPORT WSFillGrid
{
public:
@@ -77,4 +79,6 @@ private:
unsigned _polygon_id;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_WS_FILL_GRID_H__

View File

@@ -28,6 +28,8 @@
#include "WXEdge.h"
#include "BKE_global.h"
namespace Freestyle {
/**********************************
* *
* *
@@ -291,4 +293,6 @@ WFace *WXShape::MakeFace(vector<WVertex *>& iVertexList, vector<Vec3r>& iNormals
#endif
return face;
}
}
} /* namespace Freestyle */

View File

@@ -32,6 +32,8 @@
#include "Nature.h"
#include "WEdge.h"
namespace Freestyle {
typedef Nature::EdgeNature WXNature;
/**********************************
@@ -799,4 +801,6 @@ bool WXVertex::isFeature()
return false;
}
#endif // __FREESTYLE_WX_EDGE_H__
} /* namespace Freestyle */
#endif // __FREESTYLE_WX_EDGE_H__

View File

@@ -29,6 +29,8 @@
#include "WXEdge.h"
#include "WXEdgeBuilder.h"
namespace Freestyle {
void WXEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet& ifs)
{
if (_pRenderMonitor && _pRenderMonitor->testBreak())
@@ -48,4 +50,6 @@ void WXEdgeBuilder::buildWVertices(WShape& shape, const real *vertices, unsigned
vertex->setId(i / 3);
shape.AddVertex(vertex);
}
}
}
} /* namespace Freestyle */

View File

@@ -33,6 +33,8 @@
#include "../scene_graph/IndexedFaceSet.h"
namespace Freestyle {
class LIB_WINGED_EDGE_EXPORT WXEdgeBuilder : public WingedEdgeBuilder
{
public:
@@ -44,4 +46,6 @@ protected:
virtual void buildWVertices(WShape& shape, const real *vertices, unsigned vsize);
};
#endif // __FREESTYLE_WX_EDGE_BUILDER_H__
} /* namespace Freestyle */
#endif // __FREESTYLE_WX_EDGE_BUILDER_H__

View File

@@ -36,6 +36,8 @@
using namespace std;
namespace Freestyle {
void WingedEdgeBuilder::visitIndexedFaceSet(IndexedFaceSet& ifs)
{
if (_pRenderMonitor && _pRenderMonitor->testBreak())
@@ -363,4 +365,6 @@ void WingedEdgeBuilder::transformNormals(const real *normals, unsigned nsize, co
n += 3;
pn += 3;
}
}
}
} /* namespace Freestyle */

View File

@@ -38,6 +38,8 @@
#include "../system/FreestyleConfig.h"
#include "../system/RenderMonitor.h"
namespace Freestyle {
class LIB_WINGED_EDGE_EXPORT WingedEdgeBuilder : public SceneVisitor
{
public:
@@ -147,4 +149,6 @@ private:
vector<Matrix44r *> _matrices_stack;
};
} /* namespace Freestyle */
#endif // __FREESTYLE_WINGED_EDGE_BUILDER_H__

View File

@@ -30,6 +30,10 @@
#include "DNA_listBase.h"
#ifdef __cplusplus
extern "C" {
#endif
struct FreestyleLineStyle;
struct Group;
struct Text;
@@ -127,4 +131,8 @@ typedef struct FreestyleConfig {
ListBase linesets;
} FreestyleConfig;
#ifdef __cplusplus
}
#endif
#endif /* __DNA_FREESTYLE_TYPES_H__ */