Ported some Model methods to XS

This commit is contained in:
Alessandro Ranellucci 2014-08-03 20:33:16 +02:00
parent f06566dd3a
commit b10917806a
7 changed files with 52 additions and 44 deletions

View file

@ -107,6 +107,8 @@ ModelMaterial::attributes()
%code%{ RETVAL = &THIS->instances; %};
void invalidate_bounding_box();
TriangleMesh* raw_mesh()
%code%{ RETVAL = new TriangleMesh(); THIS->raw_mesh(RETVAL); %};
Ref<BoundingBoxf3> _bounding_box(BoundingBoxf3* new_bbox = NULL)
%code{%
@ -186,6 +188,8 @@ ModelMaterial::attributes()
%code%{ RETVAL = THIS->modifier; %};
void set_modifier(bool modifier)
%code%{ THIS->modifier = modifier; %};
ModelMaterial* assign_unique_material();
};
@ -206,4 +210,7 @@ ModelMaterial::attributes()
%code%{ THIS->scaling_factor = val; %};
void set_offset(Pointf *offset)
%code%{ THIS->offset = *offset; %};
void transform_mesh(TriangleMesh* mesh, bool dont_translate = false) const;
void transform_polygon(Polygon* polygon) const;
};

View file

@ -29,7 +29,8 @@
void align_to_origin();
void rotate(double angle, Point* center);
TriangleMeshPtrs split();
void merge(TriangleMesh* mesh);
void merge(TriangleMesh* mesh)
%code{% THIS->merge(*mesh); %};
ExPolygons horizontal_projection()
%code{% THIS->horizontal_projection(RETVAL); %};
BoundingBoxf3* bounding_box()