Measuring: Added Measure gizmo imgui dialog + removed tech ENABLE_MEASURE_GIZMO_DEBUG + locking of features by pressing CTRL key
This commit is contained in:
parent
6c0aff0d23
commit
ed287215db
9 changed files with 311 additions and 162 deletions
|
@ -408,12 +408,10 @@ Measuring::Measuring(const indexed_triangle_set& its)
|
|||
Measuring::~Measuring() {}
|
||||
|
||||
|
||||
#if ENABLE_MEASURE_GIZMO_DEBUG
|
||||
std::vector<SurfaceFeature> Measuring::get_all_features() const
|
||||
{
|
||||
return priv->get_all_features();
|
||||
}
|
||||
#endif // ENABLE_MEASURE_GIZMO_DEBUG
|
||||
|
||||
|
||||
std::optional<SurfaceFeature> Measuring::get_feature(size_t face_idx, const Vec3d& point) const
|
||||
|
|
|
@ -59,6 +59,10 @@ public:
|
|||
return this->m_value == other.m_value;
|
||||
}
|
||||
|
||||
bool operator != (const SurfaceFeature& other) const {
|
||||
return !operator == (other);
|
||||
}
|
||||
|
||||
private:
|
||||
SurfaceFeatureType m_type = SurfaceFeatureType::Undef;
|
||||
Vec3d m_pt1;
|
||||
|
@ -79,11 +83,9 @@ public:
|
|||
explicit Measuring(const indexed_triangle_set& its);
|
||||
~Measuring();
|
||||
|
||||
#if ENABLE_MEASURE_GIZMO_DEBUG
|
||||
// Return a reference to a list of all features identified on the its.
|
||||
// Use only for debugging. Expensive, do not call often.
|
||||
std::vector<SurfaceFeature> get_all_features() const;
|
||||
#endif // ENABLE_MEASURE_GIZMO_DEBUG
|
||||
|
||||
// Given a face_idx where the mouse cursor points, return a feature that
|
||||
// should be highlighted (if any).
|
||||
|
|
|
@ -68,8 +68,6 @@
|
|||
#define ENABLE_RAYCAST_PICKING_DEBUG (0 && ENABLE_RAYCAST_PICKING)
|
||||
// Enable Measure Gizmo
|
||||
#define ENABLE_MEASURE_GIZMO (1 && ENABLE_RAYCAST_PICKING)
|
||||
// Enable debug code for Measure Gizmo
|
||||
#define ENABLE_MEASURE_GIZMO_DEBUG (0 && ENABLE_MEASURE_GIZMO)
|
||||
|
||||
|
||||
#endif // _prusaslicer_technologies_h_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue