| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef INSPECTIOGUI_VIEWPROVIDERINSPECTION_H
|
| | #define INSPECTIOGUI_VIEWPROVIDERINSPECTION_H
|
| |
|
| | #include <limits>
|
| |
|
| | #include <App/ComplexGeoData.h>
|
| | #include <Base/Observer.h>
|
| | #include <Gui/ViewProviderDocumentObject.h>
|
| | #include <Gui/ViewProviderDocumentObjectGroup.h>
|
| |
|
| |
|
| | class SoGroup;
|
| | class SoMaterial;
|
| | class SoMaterialBinding;
|
| | class SoDrawStyle;
|
| | class SoSeparator;
|
| | class SoCoordinate3;
|
| |
|
| | namespace Gui
|
| | {
|
| | class SoFCColorBar;
|
| | class View3DInventorViewer;
|
| | }
|
| |
|
| | namespace InspectionGui
|
| | {
|
| |
|
| | |
| | |
| |
|
| | class ViewProviderInspection: public Gui::ViewProviderDocumentObject, public Base::Observer<int>
|
| | {
|
| | using inherited = ViewProviderDocumentObject;
|
| |
|
| | PROPERTY_HEADER_WITH_OVERRIDE(InspectionGui::ViewProviderInspection);
|
| |
|
| | public:
|
| | ViewProviderInspection();
|
| | ~ViewProviderInspection() override;
|
| |
|
| | App::PropertyBool OutsideGrayed;
|
| | App::PropertyFloatConstraint PointSize;
|
| |
|
| | void attach(App::DocumentObject* pcFeat) override;
|
| |
|
| | void setDisplayMode(const char* ModeName) override;
|
| |
|
| | std::vector<std::string> getDisplayModes() const override;
|
| |
|
| | void updateData(const App::Property*) override;
|
| |
|
| |
|
| | void OnChange(Base::Subject<int>& rCaller, int rcReason) override;
|
| | QIcon getIcon() const override;
|
| |
|
| | SoSeparator* getFrontRoot() const override;
|
| |
|
| | void hide() override;
|
| |
|
| | void show() override;
|
| |
|
| | static void inspectCallback(void* ud, SoEventCallback* n);
|
| |
|
| | protected:
|
| | void onChanged(const App::Property* prop) override;
|
| | void setDistances();
|
| | QString inspectDistance(const SoPickedPoint* pp) const;
|
| |
|
| | private:
|
| | bool setupFaces(const Data::ComplexGeoData*);
|
| | bool setupLines(const Data::ComplexGeoData*);
|
| | bool setupPoints(const Data::ComplexGeoData*, App::PropertyContainer* container);
|
| | void setupCoords(const std::vector<Base::Vector3d>&);
|
| | void setupNormals(const std::vector<Base::Vector3f>&);
|
| | void setupLineIndexes(const std::vector<Data::ComplexGeoData::Line>&);
|
| | void setupFaceIndexes(const std::vector<Data::ComplexGeoData::Facet>&);
|
| | void deleteColorBar();
|
| |
|
| | private:
|
| | SoMaterial* pcColorMat;
|
| | SoMaterialBinding* pcMatBinding;
|
| | SoGroup* pcLinkRoot;
|
| | Gui::SoFCColorBar* pcColorBar;
|
| | SoDrawStyle* pcColorStyle;
|
| | SoDrawStyle* pcPointStyle;
|
| | SoSeparator* pcColorRoot;
|
| | SoCoordinate3* pcCoords;
|
| |
|
| | private:
|
| | float search_radius {std::numeric_limits<float>::max()};
|
| | static bool addflag;
|
| | static App::PropertyFloatConstraint::Constraints floatRange;
|
| | };
|
| |
|
| | class ViewProviderInspectionGroup: public Gui::ViewProviderDocumentObjectGroup
|
| | {
|
| | PROPERTY_HEADER_WITH_OVERRIDE(InspectionGui::ViewProviderInspectionGroup);
|
| |
|
| | public:
|
| |
|
| | ViewProviderInspectionGroup();
|
| |
|
| | ~ViewProviderInspectionGroup() override;
|
| | QIcon getIcon() const override;
|
| | };
|
| |
|
| | }
|
| |
|
| |
|
| | #endif
|
| |
|