GUI_3DScene.xsp 963 B

1234567891011121314151617181920212223242526272829
  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. Clone< Pointf3 > get_point(int i);
  16. };
  17. %package{Slic3r::GUI::_3DScene};
  18. %{
  19. void
  20. _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)
  21. CODE:
  22. _3DScene::_extrusionentity_to_verts_do(lines, widths, heights, closed,
  23. top_z, *copy, qverts, tverts);
  24. %}