Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-03-22 17:35:09 +0300
committerbubnikv <bubnikv@gmail.com>2017-03-22 17:35:09 +0300
commit04cd4747089e528ea88a33edb12ad83ed9f9d82f (patch)
tree7722a1369e6e3dee1d2167142d3a59d93c4f290d /xs/src/libslic3r/Layer.hpp
parent6b99cbdc02598ef54f59fa4a45af81100d49b99f (diff)
Fixed some instance of simplify_polygons() invocation.
Geometry::deg2rad() made a template. Some methods of Layer made inline. Added a helper template remove_nulls().
Diffstat (limited to 'xs/src/libslic3r/Layer.hpp')
-rw-r--r--xs/src/libslic3r/Layer.hpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/xs/src/libslic3r/Layer.hpp b/xs/src/libslic3r/Layer.hpp
index 6339434c7..dd0f0143a 100644
--- a/xs/src/libslic3r/Layer.hpp
+++ b/xs/src/libslic3r/Layer.hpp
@@ -15,13 +15,12 @@ class Layer;
class PrintRegion;
class PrintObject;
-
// TODO: make stuff private
class LayerRegion
{
friend class Layer;
- public:
+public:
Layer* layer() { return this->_layer; }
const Layer* layer() const { return this->_layer; }
PrintRegion* region() { return this->_region; }
@@ -88,10 +87,10 @@ class Layer {
friend class PrintObject;
public:
- size_t id() const;
- void set_id(size_t id);
- PrintObject* object();
- const PrintObject* object() const;
+ size_t id() const { return this->_id; }
+ void set_id(size_t id) { this->_id = id; }
+ PrintObject* object() { return this->_object; }
+ const PrintObject* object() const { return this->_object; }
Layer *upper_layer;
Layer *lower_layer;
@@ -107,7 +106,7 @@ public:
// order will be recovered by the G-code generator.
ExPolygonCollection slices;
- size_t region_count() const;
+ size_t region_count() const { return this->regions.size(); }
const LayerRegion* get_region(int idx) const { return this->regions.at(idx); }
LayerRegion* get_region(int idx) { return this->regions.at(idx); }
LayerRegion* add_region(PrintRegion* print_region);
@@ -129,7 +128,6 @@ protected:
size_t _id; // sequential number of layer, 0-based
PrintObject *_object;
-
Layer(size_t id, PrintObject *object, coordf_t height, coordf_t print_z,
coordf_t slice_z);
virtual ~Layer();