Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-04-09 04:46:49 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-04-09 04:46:49 +0400
commit800f86c8454ced85c29d1dcb04dcb163689a89d3 (patch)
tree4598a2ea78a1d1cf6a4c0a9e7030de4c826a006d /source/blender/freestyle/intern/view_map
parente6bd510dde6289efcead80e3d21cb21876282a56 (diff)
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.
Diffstat (limited to 'source/blender/freestyle/intern/view_map')
-rw-r--r--source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h4
-rw-r--r--source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h4
-rw-r--r--source/blender/freestyle/intern/view_map/BoxGrid.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/BoxGrid.h4
-rw-r--r--source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/CulledOccluderSource.h4
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/Functions0D.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/Functions1D.h4
-rw-r--r--source/blender/freestyle/intern/view_map/GridDensityProvider.h4
-rw-r--r--source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Interface0D.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Interface1D.h4
-rw-r--r--source/blender/freestyle/intern/view_map/OccluderSource.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/OccluderSource.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h4
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/Silhouette.h5
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h4
-rw-r--r--source/blender/freestyle/intern/view_map/SphericalGrid.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/SphericalGrid.h4
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.h8
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h7
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.h4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapBuilder.h4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIO.h4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapIterators.h3
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp4
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapTesselator.h4
43 files changed, 176 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp b/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp
index 881177f3b5c..ed9932c3eef 100644
--- a/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp
+++ b/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h b/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
index 31592afbfec..652cb9b34b0 100644
--- a/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/ArbitraryGridDensityProvider.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
index d7d47ddb154..2d8d3b30f84 100644
--- a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
+++ b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
index c0d9b435c07..d63557f5cda 100644
--- a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.cpp b/source/blender/freestyle/intern/view_map/BoxGrid.cpp
index ad15a193ac7..2e702813fb8 100644
--- a/source/blender/freestyle/intern/view_map/BoxGrid.cpp
+++ b/source/blender/freestyle/intern/view_map/BoxGrid.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h
index 9a5f8f27c03..5ceb84761bf 100644
--- a/source/blender/freestyle/intern/view_map/BoxGrid.h
+++ b/source/blender/freestyle/intern/view_map/BoxGrid.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
index 62d451f5023..2a1388c939b 100644
--- a/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
+++ b/source/blender/freestyle/intern/view_map/CulledOccluderSource.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/CulledOccluderSource.h b/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
index 56493f89fa9..4bc3c490727 100644
--- a/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
+++ b/source/blender/freestyle/intern/view_map/CulledOccluderSource.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
index b521f496c5f..2da82f175ed 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
index ab4dc52fec8..fb0702278ba 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.cpp b/source/blender/freestyle/intern/view_map/Functions0D.cpp
index bb2e21db238..f95690e6ff6 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions0D.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/Functions0D.h b/source/blender/freestyle/intern/view_map/Functions0D.h
index ede82fd9c7f..5036433e586 100644
--- a/source/blender/freestyle/intern/view_map/Functions0D.h
+++ b/source/blender/freestyle/intern/view_map/Functions0D.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.cpp b/source/blender/freestyle/intern/view_map/Functions1D.cpp
index a0c15adf329..5d12c5bb251 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.cpp
+++ b/source/blender/freestyle/intern/view_map/Functions1D.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/Functions1D.h b/source/blender/freestyle/intern/view_map/Functions1D.h
index 9de31ff0cea..b6f914cd43b 100644
--- a/source/blender/freestyle/intern/view_map/Functions1D.h
+++ b/source/blender/freestyle/intern/view_map/Functions1D.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/GridDensityProvider.h b/source/blender/freestyle/intern/view_map/GridDensityProvider.h
index 168f519dff7..a39f17753d4 100644
--- a/source/blender/freestyle/intern/view_map/GridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/GridDensityProvider.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
index 6e687f0492a..00f5cc90cc4 100644
--- a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
+++ b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
index 23a4e55c6a6..65f2af6df2f 100644
--- a/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
+++ b/source/blender/freestyle/intern/view_map/HeuristicGridDensityProviderFactory.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h
index 14fd5848ef5..770929b21f9 100644
--- a/source/blender/freestyle/intern/view_map/Interface0D.h
+++ b/source/blender/freestyle/intern/view_map/Interface0D.h
@@ -42,6 +42,8 @@
using namespace std;
+namespace Freestyle {
+
//
// Interface0D
//
@@ -380,4 +382,6 @@ protected:
Interface0DIteratorNested *_iterator;
};
+} /* namespace Freestyle */
+
#endif // __FREESTYLE_INTERFACE_0D_H__
diff --git a/source/blender/freestyle/intern/view_map/Interface1D.h b/source/blender/freestyle/intern/view_map/Interface1D.h
index 524ef2a0207..02c9468554f 100644
--- a/source/blender/freestyle/intern/view_map/Interface1D.h
+++ b/source/blender/freestyle/intern/view_map/Interface1D.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.cpp b/source/blender/freestyle/intern/view_map/OccluderSource.cpp
index 647e31c0205..dbc271cc57b 100644
--- a/source/blender/freestyle/intern/view_map/OccluderSource.cpp
+++ b/source/blender/freestyle/intern/view_map/OccluderSource.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/OccluderSource.h b/source/blender/freestyle/intern/view_map/OccluderSource.h
index a740a3dca31..1f9209d8445 100644
--- a/source/blender/freestyle/intern/view_map/OccluderSource.h
+++ b/source/blender/freestyle/intern/view_map/OccluderSource.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp b/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp
index d962bd3aa29..40a3c9f298d 100644
--- a/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp
+++ b/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h b/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
index a8406669d99..7f646790ab6 100644
--- a/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
+++ b/source/blender/freestyle/intern/view_map/Pow23GridDensityProvider.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.cpp b/source/blender/freestyle/intern/view_map/Silhouette.cpp
index e16d6db5702..8c428746e34 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.cpp
+++ b/source/blender/freestyle/intern/view_map/Silhouette.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h
index 4eb27d3849e..c4221069a66 100644
--- a/source/blender/freestyle/intern/view_map/Silhouette.h
+++ b/source/blender/freestyle/intern/view_map/Silhouette.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
index 1eacedd54da..8b8f42f3922 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
index bb84c414fe1..0a1e86a1449 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.cpp b/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
index 00e11e28651..1621bd85000 100644
--- a/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
+++ b/source/blender/freestyle/intern/view_map/SphericalGrid.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h
index 6691042b850..9551a0a3e95 100644
--- a/source/blender/freestyle/intern/view_map/SphericalGrid.h
+++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
index 247c94c58e2..7693afdce07 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.h b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
index 8ea20b3e63d..c70edcc9af2 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.h
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
index 0edf6863c79..91d077278fb 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
index 91a2b41d89b..c1b228c13c6 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp
index 44a26501e21..102581bf70f 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp
@@ -33,6 +33,8 @@
#include "../geometry/GeomUtils.h"
+namespace Freestyle {
+
/**********************************/
/* */
/* */
@@ -745,3 +747,5 @@ void ViewEdge::UpdateFEdges()
// last one
_FEdgeB->setViewEdge(this);
}
+
+} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index 576e2f7a0ac..cd3dd7aafa2 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
index 3b8a409812d..01e93ba77c7 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
index 1193b3407df..914a06eb27f 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
index 45aa28943cb..2fb98934ea9 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
index 8ca16ddd152..5df3e4e0d8f 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIO.h b/source/blender/freestyle/intern/view_map/ViewMapIO.h
index 145c80a62da..e2223cd5734 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIO.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapIO.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapIterators.h b/source/blender/freestyle/intern/view_map/ViewMapIterators.h
index 49a411a1ee7..72d439da8bd 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapIterators.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapIterators.h
@@ -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__
diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp b/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
index 622449575ef..74716a927fc 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
@@ -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 */
diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
index 7c689db0d78..7ba8c77a452 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
@@ -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__