mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Model's volume transform set as default
This commit is contained in:
parent
4b04e4e552
commit
611d9aa0d8
15 changed files with 6 additions and 792 deletions
|
@ -367,14 +367,8 @@ public:
|
|||
|
||||
enum EMode : unsigned char
|
||||
{
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
Volume,
|
||||
Instance
|
||||
#else
|
||||
Volume,
|
||||
Instance,
|
||||
Object
|
||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||
};
|
||||
|
||||
enum EType : unsigned char
|
||||
|
@ -397,7 +391,6 @@ public:
|
|||
struct VolumeCache
|
||||
{
|
||||
private:
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
struct TransformCache
|
||||
{
|
||||
Vec3d position;
|
||||
|
@ -414,24 +407,11 @@ public:
|
|||
|
||||
TransformCache m_volume;
|
||||
TransformCache m_instance;
|
||||
#else
|
||||
Vec3d m_position;
|
||||
Vec3d m_rotation;
|
||||
Vec3d m_scaling_factor;
|
||||
Transform3d m_rotation_matrix;
|
||||
Transform3d m_scale_matrix;
|
||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||
|
||||
public:
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
VolumeCache() {}
|
||||
VolumeCache(const Geometry::Transformation& volume_transform, const Geometry::Transformation& instance_transform);
|
||||
#else
|
||||
VolumeCache();
|
||||
VolumeCache(const Vec3d& position, const Vec3d& rotation, const Vec3d& scaling_factor);
|
||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
const Vec3d& get_volume_position() const { return m_volume.position; }
|
||||
const Vec3d& get_volume_rotation() const { return m_volume.rotation; }
|
||||
const Vec3d& get_volume_scaling_factor() const { return m_volume.scaling_factor; }
|
||||
|
@ -447,13 +427,6 @@ public:
|
|||
const Transform3d& get_instance_rotation_matrix() const { return m_instance.rotation_matrix; }
|
||||
const Transform3d& get_instance_scale_matrix() const { return m_instance.scale_matrix; }
|
||||
const Transform3d& get_instance_mirror_matrix() const { return m_instance.mirror_matrix; }
|
||||
#else
|
||||
const Vec3d& get_position() const { return m_position; }
|
||||
const Vec3d& get_rotation() const { return m_rotation; }
|
||||
const Vec3d& get_scaling_factor() const { return m_scaling_factor; }
|
||||
const Transform3d& get_rotation_matrix() const { return m_rotation_matrix; }
|
||||
const Transform3d& get_scale_matrix() const { return m_scale_matrix; }
|
||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||
};
|
||||
|
||||
typedef std::map<unsigned int, VolumeCache> VolumesCache;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue