MeshLib Documentation
Loading...
Searching...
No Matches
MRObjectLines.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace MR
6{
7
11{
12public:
13 ObjectLines() = default;
14 ObjectLines( ObjectLines&& ) = default;
16
17 constexpr static const char* TypeName() noexcept { return "ObjectLines"; }
18 virtual const char* typeName() const override { return TypeName(); }
19
20 MRMESH_API virtual std::shared_ptr<Object> clone() const override;
21 MRMESH_API virtual std::shared_ptr<Object> shallowClone() const override;
22
23 MRMESH_API virtual void setPolyline( const std::shared_ptr<Polyline3>& polyline );
25 MRMESH_API virtual std::shared_ptr< Polyline3 > updatePolyline( std::shared_ptr< Polyline3 > polyline );
26
27 virtual const std::shared_ptr<Polyline3>& varPolyline() { return polyline_; }
28
29 MRMESH_API virtual void setDirtyFlags( uint32_t mask, bool invalidateCaches = true ) override;
30
33
34 MRMESH_API virtual std::vector<std::string> getInfoLines() const override;
35 virtual std::string getClassName() const override { return "Lines"; }
36
38 using LinesChangedSignal = Signal<void( uint32_t mask )>;
40
41protected:
42 ObjectLines( const ObjectLines& other ) = default;
43
45 MRMESH_API virtual void swapBase_( Object& other ) override;
48 MRMESH_API virtual void swapSignals_( Object& other ) override;
49
50 MRMESH_API virtual void serializeFields_( Json::Value& root ) const override;
51};
52
54[[nodiscard]] MRMESH_API std::shared_ptr<ObjectLines> merge( const std::vector<std::shared_ptr<ObjectLines>>& objsLines );
55
56} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
Definition MRObjectLinesHolder.h:19
Definition MRObjectLines.h:11
virtual const char * typeName() const override
Definition MRObjectLines.h:18
virtual MRMESH_API std::shared_ptr< Polyline3 > updatePolyline(std::shared_ptr< Polyline3 > polyline)
sets given polyline to this, and returns back previous polyline of this;
virtual MRMESH_API void swapSignals_(Object &other) override
ObjectLines()=default
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
virtual MRMESH_API void setPolyline(const std::shared_ptr< Polyline3 > &polyline)
ObjectLines(ProtectedStruct, const ObjectLines &obj)
Definition MRObjectLines.h:32
static constexpr const char * TypeName() noexcept
Definition MRObjectLines.h:17
virtual const std::shared_ptr< Polyline3 > & varPolyline()
Definition MRObjectLines.h:27
LinesChangedSignal linesChangedSignal
Definition MRObjectLines.h:39
virtual MRMESH_API void setDirtyFlags(uint32_t mask, bool invalidateCaches=true) override
virtual std::string getClassName() const override
return human readable name of subclass
Definition MRObjectLines.h:35
ObjectLines(ObjectLines &&)=default
virtual MRMESH_API std::shared_ptr< Object > clone() const override
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
serializeFields_: serializeBaseFields_ plus polyline serialization
ObjectLines & operator=(ObjectLines &&)=default
virtual MRMESH_API std::vector< std::string > getInfoLines() const override
return several info lines that can better describe the object in the UI
ObjectLines(const ObjectLines &other)=default
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
named object in the data model
Definition MRObject.h:60
Definition MRCameraOrientationPlugin.h:8
MRMESH_API std::shared_ptr< ObjectLines > merge(const std::vector< std::shared_ptr< ObjectLines > > &objsLines)
constructs new ObjectLines containing the union of valid data from all input objects
Definition MRObject.h:246