mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Mirror component of transformations set as default
This commit is contained in:
parent
da37094a09
commit
00222226ed
15 changed files with 10 additions and 246 deletions
|
@ -201,9 +201,7 @@ GLVolume::GLVolume(float r, float g, float b, float a)
|
|||
: m_offset(Vec3d::Zero())
|
||||
, m_rotation(Vec3d::Zero())
|
||||
, m_scaling_factor(Vec3d::Ones())
|
||||
#if ENABLE_MIRROR
|
||||
, m_mirror(Vec3d::Ones())
|
||||
#endif // ENABLE_MIRROR
|
||||
, m_world_matrix(Transform3f::Identity())
|
||||
, m_world_matrix_dirty(true)
|
||||
, m_transformed_bounding_box_dirty(true)
|
||||
|
@ -332,7 +330,6 @@ void GLVolume::set_scaling_factor(const Vec3d& scaling_factor)
|
|||
}
|
||||
}
|
||||
|
||||
#if ENABLE_MIRROR
|
||||
const Vec3d& GLVolume::get_mirror() const
|
||||
{
|
||||
return m_mirror;
|
||||
|
@ -364,7 +361,6 @@ void GLVolume::set_mirror(Axis axis, double mirror)
|
|||
m_transformed_convex_hull_bounding_box_dirty = true;
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_MIRROR
|
||||
#endif // !ENABLE_MODELVOLUME_TRANSFORM
|
||||
|
||||
void GLVolume::set_convex_hull(const TriangleMesh& convex_hull)
|
||||
|
@ -397,11 +393,7 @@ const Transform3f& GLVolume::world_matrix() const
|
|||
{
|
||||
if (m_world_matrix_dirty)
|
||||
{
|
||||
#if ENABLE_MIRROR
|
||||
m_world_matrix = Geometry::assemble_transform(m_offset, m_rotation, m_scaling_factor, m_mirror).cast<float>();
|
||||
#else
|
||||
m_world_matrix = Geometry::assemble_transform(m_offset, m_rotation, m_scaling_factor).cast<float>();
|
||||
#endif // ENABLE_MIRROR
|
||||
m_world_matrix_dirty = false;
|
||||
}
|
||||
return m_world_matrix;
|
||||
|
@ -816,9 +808,7 @@ std::vector<int> GLVolumeCollection::load_object(
|
|||
v.set_offset(instance->get_offset());
|
||||
v.set_rotation(instance->get_rotation());
|
||||
v.set_scaling_factor(instance->get_scaling_factor());
|
||||
#if ENABLE_MIRROR
|
||||
v.set_mirror(instance->get_mirror());
|
||||
#endif // ENABLE_MIRROR
|
||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||
}
|
||||
}
|
||||
|
@ -2167,14 +2157,12 @@ int _3DScene::get_in_object_volume_id(wxGLCanvas* canvas, int scene_vol_idx)
|
|||
return s_canvas_mgr.get_in_object_volume_id(canvas, scene_vol_idx);
|
||||
}
|
||||
|
||||
#if ENABLE_MIRROR
|
||||
#if ENABLE_EXTENDED_SELECTION
|
||||
void _3DScene::mirror_selection(wxGLCanvas* canvas, Axis axis)
|
||||
{
|
||||
s_canvas_mgr.mirror_selection(canvas, axis);
|
||||
}
|
||||
#endif // ENABLE_EXTENDED_SELECTION
|
||||
#endif // ENABLE_MIRROR
|
||||
|
||||
void _3DScene::reload_scene(wxGLCanvas* canvas, bool force)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue