mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Rasterizer skeleton
This commit is contained in:
parent
d9ff63c022
commit
e1b9c13024
5 changed files with 184 additions and 49 deletions
43
xs/src/libslic3r/Rasterizer/Rasterizer.hpp
Normal file
43
xs/src/libslic3r/Rasterizer/Rasterizer.hpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#ifndef RASTERIZER_HPP
|
||||
#define RASTERIZER_HPP
|
||||
|
||||
#include <Polygon.hpp>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class Raster {
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
public:
|
||||
|
||||
struct Resolution {
|
||||
unsigned width_px;
|
||||
unsigned height_px;
|
||||
inline Resolution(unsigned w, unsigned h): width_px(w), height_px(h) {}
|
||||
};
|
||||
|
||||
struct PixelDim {
|
||||
double w_mm;
|
||||
double h_mm;
|
||||
inline PixelDim(double px_width_mm, double px_height_mm ):
|
||||
w_mm(px_width_mm), h_mm(px_height_mm) {}
|
||||
};
|
||||
|
||||
inline explicit Raster(const Resolution& r, const PixelDim& pd );
|
||||
~Raster();
|
||||
Raster(const Raster& cpy);
|
||||
Raster(Raster&& m);
|
||||
|
||||
void clear();
|
||||
|
||||
void draw(const Polygon& poly);
|
||||
|
||||
void finish();
|
||||
|
||||
private:
|
||||
Resolution resolution_;
|
||||
PixelDim pxdim_;
|
||||
};
|
||||
|
||||
}
|
||||
#endif // RASTERIZER_HPP
|
Loading…
Add table
Add a link
Reference in a new issue