GUI_3DScene.xsp 924 B

12345678910111213141516171819202122232425262728
  1. %module{Slic3r::XS};
  2. #include <xsinit.h>
  3. #include "slic3r/GUI/3DScene.hpp"
  4. %name{Slic3r::GUI::_3DScene::GLVertexArray} class GLVertexArray {
  5. GLVertexArray();
  6. ~GLVertexArray();
  7. void load_mesh(TriangleMesh* mesh) const
  8. %code%{ THIS->load_mesh(*mesh); %};
  9. size_t size() const
  10. %code%{ RETVAL = THIS->verts.size(); %};
  11. void* verts_ptr() const
  12. %code%{ RETVAL = THIS->verts.empty() ? 0 : &THIS->verts.front(); %};
  13. void* norms_ptr() const
  14. %code%{ RETVAL = THIS->verts.empty() ? 0 : &THIS->norms.front(); %};
  15. };
  16. %package{Slic3r::GUI::_3DScene};
  17. %{
  18. void
  19. _extrusionentity_to_verts_do(Lines lines, std::vector<double> widths, std::vector<double> heights, bool closed, double top_z, Point* copy, GLVertexArray* qverts, GLVertexArray* tverts)
  20. CODE:
  21. _3DScene::_extrusionentity_to_verts_do(lines, widths, heights, closed,
  22. top_z, *copy, qverts, tverts);
  23. %}