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-05-14 02:58:27 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-05-14 02:58:27 +0400
commit6ea2dec330a0d460deb1396f258c461be34fa3c8 (patch)
tree567536490f059ab57592b5352b60f253b7e3ea1c /source/blender/freestyle/intern/winged_edge
parent1a91af691e984714204aa55326245c79a0b06fb8 (diff)
Added support for WITH_CXX_GUARDEDALLOC build option to the Freestyle module.
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge')
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.h12
-rw-r--r--source/blender/freestyle/intern/winged_edge/WEdge.h40
-rw-r--r--source/blender/freestyle/intern/winged_edge/WFillGrid.h9
-rw-r--r--source/blender/freestyle/intern/winged_edge/WXEdge.h12
4 files changed, 73 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.h b/source/blender/freestyle/intern/winged_edge/Curvature.h
index 204610f1f10..5977f12d870 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.h
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.h
@@ -51,6 +51,10 @@
#include "../system/FreestyleConfig.h"
#include "../system/Precision.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
using namespace Geometry;
@@ -100,6 +104,10 @@ public:
real Kr; // radial curvature
real dKr; // radial curvature
Vec3r er; // radial curvature direction
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:CurvatureInfo")
+#endif
};
class Face_Curvature_Info
@@ -119,6 +127,10 @@ public:
}
vector<CurvatureInfo *> vec_curvature_info;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Face_Curvature_Info")
+#endif
};
bool LIB_WINGED_EDGE_EXPORT gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &n);
diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h
index 6f105afa864..e5020f2a7fa 100644
--- a/source/blender/freestyle/intern/winged_edge/WEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WEdge.h
@@ -38,6 +38,10 @@
#include "../system/FreestyleConfig.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
using namespace std;
namespace Freestyle {
@@ -239,6 +243,11 @@ public:
//virtual WOEdge **operator->();
protected:
virtual void increment();
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WVertex:incoming_edge_iterator")
+#endif
};
/*! Iterator to iterate over a vertex faces in the CCW order */
@@ -319,6 +328,11 @@ public:
{
++_edge_it;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WVertex:face_iterator")
+#endif
};
public:
@@ -335,6 +349,10 @@ public:
{
return face_iterator(incoming_edges_end());
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WVertex")
+#endif
};
@@ -517,6 +535,10 @@ public:
{
userdata = NULL;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WOEdge")
+#endif
};
@@ -700,6 +722,10 @@ public:
{
userdata = NULL;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WEdge")
+#endif
};
@@ -979,6 +1005,10 @@ public:
{
userdata = NULL;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WFace")
+#endif
};
@@ -1250,6 +1280,11 @@ protected:
*/
virtual WFace *MakeFace(vector<WVertex *>& iVertexList, vector<bool>& iFaceEdgeMarksList, unsigned iMaterialIndex,
WFace *face);
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WShape")
+#endif
};
@@ -1290,6 +1325,11 @@ public:
private:
vector<WShape *> _wshapes;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WingedEdge")
+#endif
};
diff --git a/source/blender/freestyle/intern/winged_edge/WFillGrid.h b/source/blender/freestyle/intern/winged_edge/WFillGrid.h
index a1b4ef25249..ca52f75847c 100644
--- a/source/blender/freestyle/intern/winged_edge/WFillGrid.h
+++ b/source/blender/freestyle/intern/winged_edge/WFillGrid.h
@@ -34,6 +34,10 @@
#include "../geometry/Grid.h"
#include "../geometry/Polygon.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
class LIB_WINGED_EDGE_EXPORT WFillGrid
@@ -78,6 +82,11 @@ private:
Grid *_grid;
WingedEdge *_winged_edge;
unsigned _polygon_id;
+
+#ifdef WITH_CXX_GUARDEDALLOC
+public:
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WFillGrid")
+#endif
};
} /* namespace Freestyle */
diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h
index 1ed47b53b3d..f696e279ad0 100644
--- a/source/blender/freestyle/intern/winged_edge/WXEdge.h
+++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h
@@ -32,6 +32,10 @@
#include "Nature.h"
#include "WEdge.h"
+#ifdef WITH_CXX_GUARDEDALLOC
+#include "MEM_guardedalloc.h"
+#endif
+
namespace Freestyle {
typedef Nature::EdgeNature WXNature;
@@ -302,6 +306,10 @@ public:
{
_config = iConf;
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WXSmoothEdge")
+#endif
};
/* Class to store a value per vertex and a smooth edge.
@@ -471,6 +479,10 @@ public:
++_nNullDotP;
}
}
+
+#ifdef WITH_CXX_GUARDEDALLOC
+ MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:WXFaceLayer")
+#endif
};
class WXFace : public WFace