| |
|
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef POINTS_POINTPROPERTIES_H
|
| | #define POINTS_POINTPROPERTIES_H
|
| |
|
| | #include <vector>
|
| |
|
| | #include <App/PropertyStandard.h>
|
| | #include <Base/Matrix.h>
|
| | #include <Base/Reader.h>
|
| | #include <Base/Writer.h>
|
| |
|
| | #include "Points.h"
|
| |
|
| |
|
| | namespace Points
|
| | {
|
| |
|
| | |
| |
|
| | class PointsExport PropertyGreyValue: public App::PropertyFloat
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | PropertyGreyValue() = default;
|
| | };
|
| |
|
| | class PointsExport PropertyGreyValueList: public App::PropertyLists
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | PropertyGreyValueList();
|
| |
|
| | void setSize(int newSize) override;
|
| | int getSize() const override;
|
| |
|
| | |
| |
|
| | void setValue(float);
|
| |
|
| |
|
| | float operator[](const int idx) const
|
| | {
|
| | return _lValueList[idx];
|
| | }
|
| |
|
| | void set1Value(const int idx, float value)
|
| | {
|
| | _lValueList[idx] = value;
|
| | }
|
| | void setValues(const std::vector<float>& values);
|
| |
|
| | const std::vector<float>& getValues() const
|
| | {
|
| | return _lValueList;
|
| | }
|
| |
|
| | PyObject* getPyObject() override;
|
| | void setPyObject(PyObject*) override;
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| | App::Property* Copy() const override;
|
| | void Paste(const App::Property& from) override;
|
| | unsigned int getMemSize() const override;
|
| |
|
| |
|
| |
|
| | void removeIndices(const std::vector<unsigned long>&);
|
| |
|
| |
|
| | private:
|
| | std::vector<float> _lValueList;
|
| | };
|
| |
|
| | class PointsExport PropertyNormalList: public App::PropertyLists
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | PropertyNormalList();
|
| |
|
| | void setSize(int newSize) override;
|
| | int getSize() const override;
|
| |
|
| | void setValue(const Base::Vector3f&);
|
| | void setValue(float x, float y, float z);
|
| |
|
| | const Base::Vector3f& operator[](const int idx) const
|
| | {
|
| | return _lValueList[idx];
|
| | }
|
| |
|
| | void set1Value(const int idx, const Base::Vector3f& value)
|
| | {
|
| | _lValueList[idx] = value;
|
| | }
|
| |
|
| | void setValues(const std::vector<Base::Vector3f>& values);
|
| |
|
| | const std::vector<Base::Vector3f>& getValues() const
|
| | {
|
| | return _lValueList;
|
| | }
|
| |
|
| | PyObject* getPyObject() override;
|
| | void setPyObject(PyObject*) override;
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| | App::Property* Copy() const override;
|
| | void Paste(const App::Property& from) override;
|
| |
|
| | unsigned int getMemSize() const override;
|
| |
|
| |
|
| |
|
| | void transformGeometry(const Base::Matrix4D& rclMat);
|
| | void removeIndices(const std::vector<unsigned long>&);
|
| |
|
| |
|
| | private:
|
| | std::vector<Base::Vector3f> _lValueList;
|
| | };
|
| |
|
| |
|
| | struct PointsExport CurvatureInfo
|
| | {
|
| | float fMaxCurvature {}, fMinCurvature {};
|
| | Base::Vector3f cMaxCurvDir, cMinCurvDir;
|
| | };
|
| |
|
| | |
| |
|
| | class PointsExport PropertyCurvatureList: public App::PropertyLists
|
| | {
|
| | TYPESYSTEM_HEADER_WITH_OVERRIDE();
|
| |
|
| | public:
|
| | enum
|
| | {
|
| | MeanCurvature = 0,
|
| | GaussCurvature = 1,
|
| | MaxCurvature = 2,
|
| | MinCurvature = 3,
|
| | AbsCurvature = 4
|
| | };
|
| |
|
| | public:
|
| | PropertyCurvatureList();
|
| |
|
| | void setSize(int newSize) override
|
| | {
|
| | _lValueList.resize(newSize);
|
| | }
|
| | int getSize() const override
|
| | {
|
| | return _lValueList.size();
|
| | }
|
| | void setValue(const CurvatureInfo&);
|
| | void setValues(const std::vector<CurvatureInfo>&);
|
| | std::vector<float> getCurvature(int tMode) const;
|
| |
|
| |
|
| | const CurvatureInfo& operator[](const int idx) const
|
| | {
|
| | return _lValueList[idx];
|
| | }
|
| | void set1Value(const int idx, const CurvatureInfo& value)
|
| | {
|
| | _lValueList[idx] = value;
|
| | }
|
| | const std::vector<CurvatureInfo>& getValues() const
|
| | {
|
| | return _lValueList;
|
| | }
|
| |
|
| | PyObject* getPyObject() override;
|
| | void setPyObject(PyObject*) override;
|
| |
|
| |
|
| |
|
| | void Save(Base::Writer& writer) const override;
|
| | void Restore(Base::XMLReader& reader) override;
|
| |
|
| | void SaveDocFile(Base::Writer& writer) const override;
|
| | void RestoreDocFile(Base::Reader& reader) override;
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | App::Property* Copy() const override;
|
| |
|
| | void Paste(const App::Property& from) override;
|
| | unsigned int getMemSize() const override;
|
| |
|
| |
|
| |
|
| |
|
| | void transformGeometry(const Base::Matrix4D& rclMat);
|
| | void removeIndices(const std::vector<unsigned long>&);
|
| |
|
| |
|
| | private:
|
| | std::vector<CurvatureInfo> _lValueList;
|
| | };
|
| |
|
| | }
|
| |
|
| |
|
| | #endif
|
| |
|