%module{Slic3r::XS}; %{ #include #include "TriangleMesh.hpp" %} %name{Slic3r::TriangleMesh::XS} class TriangleMesh { TriangleMesh(); ~TriangleMesh(); void ReadSTLFile(char* input_file); void ReadFromPerl(SV* vertices, SV* facets); void Repair(); void WriteOBJFile(char* output_file); AV* ToPerl(); }; %package{Slic3r::TriangleMesh::XS}; %{ PROTOTYPES: DISABLE std::string hello_world() CODE: RETVAL = "Hello world!"; OUTPUT: RETVAL %}