33 constexpr static const
char* StaticTypeName() noexcept
37 virtual const char* typeName()
const override
39 return StaticTypeName();
44 virtual bool hasVisualRepresentation()
const override {
return true; }
47 MRSYMBOLMESH_API virtual std::shared_ptr<Object> shallowClone()
const override;
52 float getFontHeight()
const {
return fontHeight_; }
56 const PositionedText& getLabel()
const {
return label_; }
59 MRSYMBOLMESH_API void setFontPath(
const std::filesystem::path& pathToFont );
60 const std::filesystem::path& getFontPath()
const {
return pathToFont_; }
70 const Vector2f& getPivotPoint()
const {
return pivotPoint_; }
73 const Vector2f& getPivotShift()
const {
return pivotShift_; }
78 float getLeaderLineWidth()
const {
return leaderLineWidth_; }
82 float getSourcePointSize()
const {
return sourcePointSize_; }
86 float getBackgroundPadding()
const {
return backgroundPadding_; }
89 MRSYMBOLMESH_API virtual void setSourcePointColor(
const Color& color, ViewportId
id = {} );
91 const Color& getSourcePointColor( ViewportId
id = {} )
const
93 return sourcePointColor_.get(
id );
96 MRSYMBOLMESH_API virtual void setLeaderLineColor(
const Color& color, ViewportId
id = {} );
98 const Color& getLeaderLineColor( ViewportId
id = {} )
const
100 return leaderLineColor_.get(
id );
103 MRSYMBOLMESH_API void setContourColor(
const Color& color, ViewportId
id = {} );
105 const Color& getContourColor( ViewportId
id = {} )
const
107 return contourColor_.get(
id );
110 MRSYMBOLMESH_API const ViewportProperty<Color>& getSourcePointColorsForAllViewports()
const;
111 MRSYMBOLMESH_API virtual void setSourcePointColorsForAllViewports( ViewportProperty<Color> val );
113 MRSYMBOLMESH_API const ViewportProperty<Color>& getLeaderLineColorsForAllViewports()
const;
114 MRSYMBOLMESH_API virtual void setLeaderLineColorsForAllViewports( ViewportProperty<Color> val );
116 MRSYMBOLMESH_API const ViewportProperty<Color>& getContourColorsForAllViewports()
const;
117 MRSYMBOLMESH_API virtual void setContourColorsForAllViewports( ViewportProperty<Color> val );
120 ObjectLabel( ProtectedStruct,
const ObjectLabel& obj ) : ObjectLabel( obj )
125 MRSYMBOLMESH_API virtual Box3f getWorldBox( ViewportId = {} )
const override;
129 const std::shared_ptr<Mesh>& labelRepresentingMesh()
const {
return mesh_; }
137 MRSYMBOLMESH_API const ViewportMask& getVisualizePropertyMask( AnyVisualizeMaskEnum type )
const override;
144 PositionedText label_;
145 std::filesystem::path pathToFont_;
146 Vector2f pivotPoint_;
149 float fontHeight_{ 25.0f };
151 float leaderLineWidth_{ 1.0f };
153 float sourcePointSize_{ 5.f };
155 float backgroundPadding_{ 8.f };
157 ViewportMask sourcePoint_;
158 ViewportMask background_;
159 ViewportMask contour_;
160 ViewportMask leaderLine_;
162 ViewportProperty<Color> sourcePointColor_;
163 ViewportProperty<Color> leaderLineColor_;
164 ViewportProperty<Color> contourColor_;
166 ObjectLabel(
const ObjectLabel& other ) =
default;
173 MRSYMBOLMESH_API virtual void serializeFields_( Json::Value& root )
const override;
175 MRSYMBOLMESH_API virtual void deserializeFields_(
const Json::Value& root )
override;
180 MRSYMBOLMESH_API void setAllVisualizeProperties_(
const AllVisualizeProperties& properties, std::size_t& pos )
override;
184 void setDefaultColors_();
187 void setDefaultSceneProperties_();
189 void updatePivotShift_()
const;
191 mutable bool needRebuild_{
true };
192 mutable Vector2f pivotShift_;
193 mutable std::shared_ptr<Mesh> mesh_;
194 mutable Box3f meshBox_;
_count
Definition MRFeatureObject.h:87
Contour
Definition MRObjectLabel.h:17
Background
Definition MRObjectLabel.h:16
SourcePoint
Definition MRObjectLabel.h:14
LeaderLine
Definition MRObjectLabel.h:15
#define MRSYMBOLMESH_API
Definition MRSymbolMeshFwd.h:12
#define MRSYMBOLMESH_CLASS
Definition MRSymbolMeshFwd.h:16
Definition MRObjectLabel.h:26
Definition MRVisualObject.h:119
Definition MRCameraOrientationPlugin.h:8
int heapBytes(FloatGrid grid)
Definition MRVisualObject.h:32