diff options
author | bubnikv <bubnikv@gmail.com> | 2018-08-21 18:43:05 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-08-21 18:43:05 +0300 |
commit | cb138a20b861a288ba448666049e0df45fb71c5d (patch) | |
tree | 223c45b75f7391a733598b797c4206fbb1e09a11 /xs/src/libslic3r/Model.hpp | |
parent | c5256bdd2ccebd43333a14fdd31b810cd2b57e12 (diff) |
Completely replaced the homebrew Pointf3 class with Eigen Vec3d.
Replaced the unscale macro with a template, implemented templates
for unscaling Eigen vectors.
Diffstat (limited to 'xs/src/libslic3r/Model.hpp')
-rw-r--r-- | xs/src/libslic3r/Model.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 8dcfff024..dfe391b0e 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -84,7 +84,7 @@ public: center_around_origin() method. Callers might want to apply the same translation to new volumes before adding them to this object in order to preserve alignment when user expects that. */ - Pointf3 origin_translation; + Vec3d origin_translation; Model* get_model() const { return m_model; }; @@ -120,9 +120,9 @@ public: // A snug bounding box around the transformed non-modifier object volumes. BoundingBoxf3 instance_bounding_box(size_t instance_idx, bool dont_translate = false) const; void center_around_origin(); - void translate(const Vectorf3 &vector) { this->translate(vector(0), vector(1), vector(2)); } + void translate(const Vec3d &vector) { this->translate(vector(0), vector(1), vector(2)); } void translate(coordf_t x, coordf_t y, coordf_t z); - void scale(const Pointf3 &versor); + void scale(const Vec3d &versor); void rotate(float angle, const Axis &axis); void transform(const float* matrix3x4); void mirror(const Axis &axis); @@ -138,7 +138,7 @@ public: void print_info() const; private: - ModelObject(Model *model) : layer_height_profile_valid(false), m_model(model), m_bounding_box_valid(false) {} + ModelObject(Model *model) : layer_height_profile_valid(false), m_model(model), origin_translation(Vec3d::Zero()), m_bounding_box_valid(false) {} ModelObject(Model *model, const ModelObject &other, bool copy_volumes = true); ModelObject& operator= (ModelObject other); void swap(ModelObject &other); |