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:
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "../application/Controller.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Freestyle;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "GaussianFilter.h"
|
||||
|
||||
namespace Freestyle {
|
||||
|
||||
GaussianFilter::GaussianFilter(float iSigma)
|
||||
{
|
||||
_sigma = iSigma;
|
||||
@@ -103,3 +105,5 @@ void GaussianFilter::computeMask()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace Freestyle */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Predicates0D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Predicates1D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "../stroke/ContextFunctions.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../scene_graph/FrsMaterial.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../geometry/Noise.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -27,10 +27,13 @@
|
||||
|
||||
#include <Python.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "../system/Id.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/Interface1D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/Interface0D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/Interface1D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../system/Iterator.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Stroke.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../winged_edge/Nature.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Operators.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/Silhouette.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Stroke.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,8 @@ using namespace std;
|
||||
|
||||
#include "../stroke/StrokeShader.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/Functions0D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/Functions1D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Predicates0D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../stroke/Predicates1D.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/ViewMap.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include "../view_map/ViewMap.h"
|
||||
|
||||
using namespace Freestyle;
|
||||
|
||||
#include "BPy_SShape.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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__
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user