@@ -95,7 +95,7 @@ void moduleAddDrawTool(py::module &m)
9595 dt.def (" drawPoints" , [](DrawTool *self, py::array_t <double > points, float size, sofa::type::RGBAColor& color)
9696 {
9797 self->drawPoints (getPoints (points), size, color);
98- });
98+ }, sofapython3::doc::drawtool::drawPoints );
9999 dt.def (" drawPoints" , [](DrawTool *self, BaseData* dpositions, float size, sofa::type::RGBAColor& color){
100100 auto positions = dynamic_cast <Data<sofa::type::vector<sofa::type::Vec3>>*>(dpositions);
101101 if (!positions)
@@ -107,7 +107,7 @@ void moduleAddDrawTool(py::module &m)
107107 // / Draw lines
108108 dt.def (" drawLines" , [](DrawTool *self, const py::array_t <double >& positions, const float size, sofa::type::RGBAColor& color){
109109 self->drawLines (getPoints (positions), size, color);
110- });
110+ }, sofapython3::doc::drawtool::drawLines );
111111 dt.def (" drawLines" , [](DrawTool *self, BaseData* dpositions, const float size, sofa::type::RGBAColor& color){
112112 auto positions = dynamic_cast <Data<sofa::type::vector<sofa::type::Vec3>>*>(dpositions);
113113 if (!positions)
@@ -127,7 +127,7 @@ void moduleAddDrawTool(py::module &m)
127127 // Draw mesh
128128 dt.def (" drawTriangles" , [](DrawTool *self, py::array_t <double >& positions, sofa::type::RGBAColor& color){
129129 self->drawTriangles (getPoints (positions), color);
130- });
130+ }, sofapython3::doc::drawtool::drawTriangles );
131131 dt.def (" drawTriangles" , [](DrawTool *self, BaseData* dpositions, BaseData* dtriangles, sofa::type::RGBAColor& color){
132132 auto positions = dynamic_cast <Data<sofa::type::vector<sofa::type::Vec3d>>*>(dpositions);
133133 if (!positions)
@@ -156,7 +156,7 @@ void moduleAddDrawTool(py::module &m)
156156 // Draw mesh
157157 dt.def (" drawQuads" , [](DrawTool *self, py::array_t <double >& positions, sofa::type::RGBAColor& color){
158158 self->drawQuads (getPoints (positions), color);
159- });
159+ }, sofapython3::doc::drawtool::drawQuads );
160160 dt.def (" drawQuads" , [](DrawTool *self, BaseData* dpositions, BaseData* dquads, sofa::type::RGBAColor& color){
161161 auto positions = dynamic_cast <Data<sofa::type::vector<sofa::type::Vec3d>>*>(dpositions);
162162 if (!positions)
@@ -187,7 +187,7 @@ void moduleAddDrawTool(py::module &m)
187187 // Draw spheres
188188 dt.def (" drawSpheres" , [](DrawTool *self, const py::array_t <double >& positions, const std::vector<float >& radius, sofa::type::RGBAColor& color){
189189 self->drawSpheres (getPoints (positions), radius, color);
190- });
190+ }, sofapython3::doc::drawtool::drawSpheres );
191191 dt.def (" drawSpheres" , [](DrawTool *self, BaseData* dpositions, const float radius, sofa::type::RGBAColor& color){
192192 auto positions = dynamic_cast <Data<sofa::type::vector<sofa::type::Vec3>>*>(dpositions);
193193 if (!positions)
@@ -196,11 +196,11 @@ void moduleAddDrawTool(py::module &m)
196196 });
197197
198198 // Draw boundingBox
199- dt.def (" boundingBox " , [](DrawTool *self, const std::array<double ,4 >& min, const std::array<double , 4 >& max, double width){
199+ dt.def (" drawBoundingBox " , [](DrawTool *self, const std::array<double ,4 >& min, const std::array<double , 4 >& max, double width){
200200 sofa::type::Vec3d cmin { min[0 ], min[1 ], min[2 ] };
201201 sofa::type::Vec3d cmax { max[0 ], max[1 ], max[2 ] };
202202 self->drawBoundingBox ( cmin, cmax, width);
203- });
203+ }, sofapython3::doc::drawtool::drawBoundingBox );
204204
205205 // Draw frames
206206 dt.def (" drawFrames" , [](DrawTool* self,
@@ -214,7 +214,7 @@ void moduleAddDrawTool(py::module &m)
214214 {
215215 self->drawFrame (cpoints[i], corientations[i], csize);
216216 }
217- });
217+ }, sofapython3::doc::drawtool::drawFrames );
218218 dt.def (" drawFrames" , [](DrawTool* self, BaseData* dpositions, std::array<double , 3 >& size ){
219219 using sofa::defaulttype::Rigid3Types;
220220 using Coord = sofa::defaulttype::Rigid3Types::Coord;
@@ -241,15 +241,13 @@ void moduleAddDrawTool(py::module &m)
241241 const sofa::type::RGBAColor& color)
242242 {
243243 self->draw3DText (point, size, color, text.c_str ());
244- });
244+ }, sofapython3::doc::drawtool::drawText );
245245
246246 // Draw overlay text
247247 dt.def (" drawOverlayText" , [](DrawTool* self, const std::array<double ,2 >& point,
248248 int fontSize, char * text, sofa::type::RGBAColor& color){
249249 self->writeOverlayText (point[0 ],point[1 ], fontSize, color, text);
250- });
251-
252-
250+ }, sofapython3::doc::drawtool::drawOverlayText);
253251
254252}
255253
0 commit comments