diff options
Diffstat (limited to 'source/blender/freestyle/intern/geometry')
10 files changed, 123 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/geometry/BBox.h b/source/blender/freestyle/intern/geometry/BBox.h index 8220bc6c65b..04fe6118815 100644 --- a/source/blender/freestyle/intern/geometry/BBox.h +++ b/source/blender/freestyle/intern/geometry/BBox.h @@ -28,6 +28,10 @@ * \date 22/05/2003 */ +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { template <class Point> @@ -130,6 +134,11 @@ private: Point _min; Point _max; bool _empty; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BBox") +#endif }; template <class Point> diff --git a/source/blender/freestyle/intern/geometry/Bezier.h b/source/blender/freestyle/intern/geometry/Bezier.h index 4bd8dc8df4b..34af31d0ba8 100644 --- a/source/blender/freestyle/intern/geometry/Bezier.h +++ b/source/blender/freestyle/intern/geometry/Bezier.h @@ -34,6 +34,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -60,8 +64,11 @@ public: { return _Vertices; } -}; +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BezierCurveSegment") +#endif +}; class LIB_GEOMETRY_EXPORT BezierCurve { @@ -86,6 +93,10 @@ public: { return _Segments; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:BezierCurve") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/GeomCleaner.h b/source/blender/freestyle/intern/geometry/GeomCleaner.h index 46ee6337ecc..0b97614f6ea 100644 --- a/source/blender/freestyle/intern/geometry/GeomCleaner.h +++ b/source/blender/freestyle/intern/geometry/GeomCleaner.h @@ -32,6 +32,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -128,6 +132,10 @@ public: */ static void CleanIndexedVertexArray(const float *iVertices, unsigned iVSize, const unsigned *iIndices, unsigned iISize, real **oVertices, unsigned *oVSize, unsigned **oIndices); + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GeomCleaner") +#endif }; @@ -210,6 +218,10 @@ public: { return (_Vector == v._Vector); } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:IndexedVertex") +#endif }; #if 0 diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index 8ba74f9ba2c..08b614faa95 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -45,6 +45,10 @@ extern "C" { #include "BLI_utildefines.h" } +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -83,6 +87,11 @@ public: private: Vec3r _orig; OccludersSet _occluders; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Cell") +#endif }; @@ -100,6 +109,10 @@ public: virtual bool stop() { return false; } + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridVisitor") +#endif }; /*! Gathers all the occluders belonging to the cells traversed by the ray */ @@ -357,6 +370,11 @@ protected: //OccludersSet _ray_occluders; // Set storing the occluders contained in the cells traversed by a ray OccludersSet _occluders; // List of all occluders inserted in the grid + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Grid") +#endif }; // @@ -375,6 +393,11 @@ private: Polygon3r *firstOccluderFromNextCell(); Grid& grid; OccludersSet::iterator it, end; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VirtualOccludersSet") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/GridHelpers.h b/source/blender/freestyle/intern/geometry/GridHelpers.h index 57b56ca2ff4..22efdcf1d11 100644 --- a/source/blender/freestyle/intern/geometry/GridHelpers.h +++ b/source/blender/freestyle/intern/geometry/GridHelpers.h @@ -37,6 +37,10 @@ #include "../winged_edge/WEdge.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { namespace GridHelpers { @@ -121,6 +125,10 @@ class Transform public: virtual ~Transform () = 0; virtual Vec3r operator()(const Vec3r& point) const = 0; + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:GridHelpers:Transform") +#endif }; inline bool insideProscenium (const real proscenium[4], const Polygon3r& polygon) diff --git a/source/blender/freestyle/intern/geometry/Noise.h b/source/blender/freestyle/intern/geometry/Noise.h index bed46ab1b01..cd1be53a5aa 100644 --- a/source/blender/freestyle/intern/geometry/Noise.h +++ b/source/blender/freestyle/intern/geometry/Noise.h @@ -32,6 +32,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -75,6 +79,11 @@ private: float g1[_NOISE_B + _NOISE_B + 2]; /* UNUSED */ // int start; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Noise") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/Polygon.h b/source/blender/freestyle/intern/geometry/Polygon.h index 8f7ab8e440c..cfeae8fd632 100644 --- a/source/blender/freestyle/intern/geometry/Polygon.h +++ b/source/blender/freestyle/intern/geometry/Polygon.h @@ -33,6 +33,10 @@ #include "Geom.h" #include "GeomUtils.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + using namespace std; namespace Freestyle { @@ -165,6 +169,11 @@ protected: Point _min; Point _max; unsigned _id; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Geometry:Polygon") +#endif }; diff --git a/source/blender/freestyle/intern/geometry/SweepLine.h b/source/blender/freestyle/intern/geometry/SweepLine.h index 8777dd0ba51..86058a434bf 100644 --- a/source/blender/freestyle/intern/geometry/SweepLine.h +++ b/source/blender/freestyle/intern/geometry/SweepLine.h @@ -31,6 +31,10 @@ #include <list> #include <vector> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { /*! Class to define the intersection berween two segments*/ @@ -74,6 +78,10 @@ public: Edge *EdgeB; // second segment real tA; // parameter defining the intersection point with respect to the segment EdgeA. real tB; // parameter defining the intersection point with respect to the segment EdgeB. + +#ifdef WITH_CXX_GUARDEDALLOC + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Intersection") +#endif }; #ifdef _MSC_VER @@ -180,6 +188,11 @@ private: Point B; std::vector<Intersection<Segment<T, Point> >*> _Intersections; // list of intersections parameters bool _order; // true if A and B are in the same order than _edge.A and _edge.B. false otherwise. + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Segment") +#endif }; #ifdef _MSC_VER @@ -322,6 +335,11 @@ private: std::list<Segment<T, Point> *> _set; // set of active edges for a given position of the sweep line std::vector<Segment<T, Point> *> _IntersectedEdges; // the list of intersected edges std::vector<Intersection<Segment<T, Point> > *> _Intersections; // the list of all intersections. + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SweepLine") +#endif }; } /* namespace Freestyle */ diff --git a/source/blender/freestyle/intern/geometry/VecMat.h b/source/blender/freestyle/intern/geometry/VecMat.h index 5319bbc0feb..1948dadb207 100644 --- a/source/blender/freestyle/intern/geometry/VecMat.h +++ b/source/blender/freestyle/intern/geometry/VecMat.h @@ -34,6 +34,10 @@ #include <math.h> #include <vector> +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { namespace VecMat { @@ -272,6 +276,11 @@ protected: enum { _dim = N, }; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VecMat:Vec") +#endif }; @@ -755,6 +764,11 @@ public: protected: value_type _coord[_SIZE]; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:VecMat:Matrix") +#endif }; #undef _SIZE diff --git a/source/blender/freestyle/intern/geometry/normal_cycle.h b/source/blender/freestyle/intern/geometry/normal_cycle.h index 86e3ed0f2f5..441fca7ac5f 100644 --- a/source/blender/freestyle/intern/geometry/normal_cycle.h +++ b/source/blender/freestyle/intern/geometry/normal_cycle.h @@ -43,6 +43,10 @@ #include "../system/FreestyleConfig.h" +#ifdef WITH_CXX_GUARDEDALLOC +#include "MEM_guardedalloc.h" +#endif + namespace Freestyle { using namespace Geometry; @@ -123,6 +127,11 @@ private: real eigen_value_[3]; real M_[6]; int i_[3]; + +#ifdef WITH_CXX_GUARDEDALLOC +public: + MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:OGF:NormalCycle") +#endif }; inline void NormalCycle::accumulate_dihedral_angle(const Vec3r& edge, const double beta, double neigh_area) |