yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12077
[Branch ~yade-pkg/yade/git-trunk] Rev 3673: Added Facet.setVertices function to prevent memory leaks (see bug 1041084, #8)
------------------------------------------------------------
revno: 3673
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Sat 2015-06-06 14:45:58 +0200
message:
Added Facet.setVertices function to prevent memory leaks (see bug 1041084, #8)
modified:
pkg/common/Facet.hpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/common/Facet.hpp'
--- pkg/common/Facet.hpp 2014-10-15 06:44:01 +0000
+++ pkg/common/Facet.hpp 2015-06-06 12:45:58 +0000
@@ -35,6 +35,8 @@
void postLoad(Facet&);
+ void setVertices(const Vector3r& v0, const Vector3r& v1, const Vector3r& v2) { vertices[0]=v0; vertices[1]=v1; vertices[2]=v2; postLoad(*this); }
+
YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Facet,Shape,"Facet (triangular particle) geometry.",
((vector<Vector3r>,vertices,vector<Vector3r>(3,Vector3r(NaN,NaN,NaN)),(Attr::triggerPostLoad | Attr::noResize),"Vertex positions in local coordinates."))
((Vector3r,normal,Vector3r(NaN,NaN,NaN),(Attr::readonly | Attr::noSave),"Facet's normal (in local coordinate system)"))
@@ -45,6 +47,7 @@
#endif
,
/* ctor */ createIndex();,
+ .def("setVertices",&Facet::setVertices,"TODO")
);
DECLARE_LOGGER;
REGISTER_CLASS_INDEX(Facet,Shape);