mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
1st installment of ModelInstance 3D rotation components
This commit is contained in:
@@ -651,6 +651,13 @@ register_on_gizmo_rotate_callback(canvas, callback)
|
||||
CODE:
|
||||
_3DScene::register_on_gizmo_rotate_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_on_gizmo_rotate_3D_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
_3DScene::register_on_gizmo_rotate_3D_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_on_gizmo_flatten_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
@@ -658,6 +665,13 @@ register_on_gizmo_flatten_callback(canvas, callback)
|
||||
CODE:
|
||||
_3DScene::register_on_gizmo_flatten_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_on_gizmo_flatten_3D_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
SV *callback;
|
||||
CODE:
|
||||
_3DScene::register_on_gizmo_flatten_3D_callback((wxGLCanvas*)wxPli_sv_2_object(aTHX_ canvas, "Wx::GLCanvas"), (void*)callback);
|
||||
|
||||
void
|
||||
register_on_update_geometry_info_callback(canvas, callback)
|
||||
SV *canvas;
|
||||
|
||||
@@ -364,8 +364,13 @@ ModelMaterial::attributes()
|
||||
Ref<ModelObject> object()
|
||||
%code%{ RETVAL = THIS->get_object(); %};
|
||||
|
||||
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
double rotation()
|
||||
%code%{ RETVAL = THIS->get_rotation(Z); %};
|
||||
#else
|
||||
double rotation()
|
||||
%code%{ RETVAL = THIS->rotation; %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
double scaling_factor()
|
||||
%code%{ RETVAL = THIS->scaling_factor; %};
|
||||
#if ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
@@ -376,8 +381,17 @@ ModelMaterial::attributes()
|
||||
%code%{ RETVAL = &THIS->offset; %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
|
||||
#if ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
void set_rotation(double val)
|
||||
%code%{ THIS->set_rotation(Z, val); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
|
||||
void set_rotations(Vec3d *rotation)
|
||||
%code%{ THIS->set_rotation(*rotation); THIS->get_object()->invalidate_bounding_box(); %};
|
||||
|
||||
#else
|
||||
void set_rotation(double val)
|
||||
%code%{ THIS->rotation = val; THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
|
||||
void set_scaling_factor(double val)
|
||||
%code%{ THIS->scaling_factor = val; THIS->get_object()->invalidate_bounding_box(); %};
|
||||
#if ENABLE_MODELINSTANCE_3D_OFFSET
|
||||
|
||||
Reference in New Issue
Block a user