mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
SLA slices preview - improved performances
This commit is contained in:
parent
7913060869
commit
ef1d43c711
2 changed files with 107 additions and 100 deletions
|
@ -677,6 +677,16 @@ private:
|
|||
GLGizmoBase* _get_current() const;
|
||||
};
|
||||
|
||||
struct SlaCap
|
||||
{
|
||||
double z;
|
||||
Pointf3s triangles;
|
||||
|
||||
SlaCap() { reset(); }
|
||||
void reset() { z = DBL_MAX; triangles.clear(); }
|
||||
bool matches(double z) const { return this->z == z; }
|
||||
};
|
||||
|
||||
class WarningTexture : public GUI::GLTexture
|
||||
{
|
||||
static const unsigned char Background_Color[3];
|
||||
|
@ -731,6 +741,7 @@ private:
|
|||
mutable GLToolbar m_toolbar;
|
||||
ClippingPlane m_clipping_planes[2];
|
||||
bool m_use_clipping_planes;
|
||||
mutable SlaCap m_sla_caps[2];
|
||||
|
||||
mutable GLVolumeCollection m_volumes;
|
||||
Selection m_selection;
|
||||
|
@ -809,7 +820,10 @@ public:
|
|||
void set_clipping_plane(unsigned int id, const ClippingPlane& plane)
|
||||
{
|
||||
if (id < 2)
|
||||
{
|
||||
m_clipping_planes[id] = plane;
|
||||
m_sla_caps[id].reset();
|
||||
}
|
||||
}
|
||||
void set_use_clipping_planes(bool use) { m_use_clipping_planes = use; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue