MeshLib Documentation
Loading...
Searching...
No Matches
MRObjectMeshHolder.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRVisualObject.h"
4#include "MRXfBasedCache.h"
5#include "MRMeshPart.h"
6
7namespace MR
8{
9
10enum class MRMESH_CLASS MeshVisualizePropertyType
11{
22 PolygonOffsetFromCamera, // recommended for drawing edges on top of mesh
23 _count [[maybe_unused]],
24};
25template <> struct IsVisualizeMaskEnum<MeshVisualizePropertyType> : std::true_type {};
26
30{
31public:
33
34 ObjectMeshHolder( ObjectMeshHolder&& ) noexcept = default;
35 ObjectMeshHolder& operator = ( ObjectMeshHolder&& ) noexcept = default;
36
37 constexpr static const char* TypeName() noexcept { return "MeshHolder"; }
38 virtual const char* typeName() const override { return TypeName(); }
39
40 MRMESH_API virtual void applyScale( float scaleFactor ) override;
41
43 MRMESH_API virtual bool hasVisualRepresentation() const override;
44
45 [[nodiscard]] virtual bool hasModel() const override { return bool( mesh_ ); }
46
47 const std::shared_ptr< const Mesh >& mesh() const
48 { return reinterpret_cast< const std::shared_ptr<const Mesh>& >( mesh_ ); } // reinterpret_cast to avoid making a copy of shared_ptr
49
51 MeshPart meshPart() const { return selectedTriangles_.any() ? MeshPart{ *mesh_, &selectedTriangles_ } : *mesh_; }
52
53 MRMESH_API virtual std::shared_ptr<Object> clone() const override;
54 MRMESH_API virtual std::shared_ptr<Object> shallowClone() const override;
55
56 MRMESH_API virtual void setDirtyFlags( uint32_t mask, bool invalidateCaches = true ) override;
57
58 const FaceBitSet& getSelectedFaces() const { return selectedTriangles_; }
59 MRMESH_API virtual void selectFaces( FaceBitSet newSelection );
63 MRMESH_API virtual void setSelectedFacesColor( const Color& color, ViewportId id = {} );
64
65 const UndirectedEdgeBitSet& getSelectedEdges() const { return selectedEdges_; }
66 MRMESH_API virtual void selectEdges( UndirectedEdgeBitSet newSelection );
70 MRMESH_API virtual void setSelectedEdgesColor( const Color& color, ViewportId id = {} );
71
74
77
80
83
85 const UndirectedEdgeBitSet& creases() const { return creases_; }
86 MRMESH_API virtual void setCreases( UndirectedEdgeBitSet creases );
87
89 void setFlatShading( bool on )
90 { return setVisualizeProperty( on, MeshVisualizePropertyType::FlatShading, ViewportMask::all() ); }
91 bool flatShading() const
92 { return getVisualizeProperty( MeshVisualizePropertyType::FlatShading, ViewportMask::any() ); }
93
94 [[nodiscard]] MRMESH_API bool supportsVisualizeProperty( AnyVisualizeMaskEnum type ) const override;
95
100
101 const FaceColors& getFacesColorMap() const { return facesColorMap_; }
102 virtual void setFacesColorMap( FaceColors facesColorMap )
103 { facesColorMap_ = std::move( facesColorMap ); dirty_ |= DIRTY_PRIMITIVE_COLORMAP; }
104 virtual void updateFacesColorMap( FaceColors& updated )
105 { std::swap( facesColorMap_, updated ); dirty_ |= DIRTY_PRIMITIVE_COLORMAP; }
106
107 MRMESH_API virtual void setEdgeWidth( float edgeWidth );
108 float getEdgeWidth() const { return edgeWidth_; }
109 MRMESH_API virtual void setPointSize( float size );
110 virtual float getPointSize() const { return pointSize_; }
111
112 const Color& getEdgesColor( ViewportId id = {} ) const { return edgesColor_.get(id); }
113 virtual void setEdgesColor( const Color& color, ViewportId id = {} )
114 { edgesColor_.set( color, id ); needRedraw_ = true; }
115
116 const Color& getPointsColor( ViewportId id = {} ) const { return pointsColor_.get(id); }
117 virtual void setPointsColor( const Color& color, ViewportId id = {} )
118 { pointsColor_.set( color, id ); needRedraw_ = true; }
119
120 const Color& getBordersColor( ViewportId id = {} ) const { return bordersColor_.get( id ); }
121 virtual void setBordersColor( const Color& color, ViewportId id = {} )
122 { bordersColor_.set( color, id ); needRedraw_ = true; }
123
127
130 // for backward compatibility
131 [[deprecated]] MRMESH_API virtual void setTexture( MeshTexture texture );
132 [[deprecated]] MRMESH_API virtual void updateTexture( MeshTexture& updated );
133 const Vector<MeshTexture, TextureId>& getTextures() const { return textures_; }
134 virtual void setTextures( Vector<MeshTexture, TextureId> texture ) { textures_ = std::move( texture ); dirty_ |= DIRTY_TEXTURE; }
135 virtual void updateTextures( Vector<MeshTexture, TextureId>& updated ) { std::swap( textures_, updated ); dirty_ |= DIRTY_TEXTURE; }
136
139 virtual void setTexturePerFace( Vector<TextureId, FaceId> texturePerFace ) { texturePerFace_ = std::move( texturePerFace ); dirty_ |= DIRTY_TEXTURE_PER_FACE; }
140 virtual void updateTexturePerFace( Vector<TextureId, FaceId>& texturePerFace ) { std::swap( texturePerFace_, texturePerFace ); dirty_ |= DIRTY_TEXTURE_PER_FACE; }
141 virtual void addTexture( MeshTexture texture ) { textures_.emplace_back( std::move( texture ) ); dirty_ |= DIRTY_TEXTURE_PER_FACE; }
142 const TexturePerFace& getTexturePerFace() const { return texturePerFace_; }
143
144 const VertUVCoords& getUVCoords() const { return uvCoordinates_; }
145 virtual void setUVCoords( VertUVCoords uvCoordinates ) { uvCoordinates_ = std::move( uvCoordinates ); dirty_ |= DIRTY_UV; }
146 virtual void updateUVCoords( VertUVCoords& updated ) { std::swap( uvCoordinates_, updated ); dirty_ |= DIRTY_UV; }
147
149 MRMESH_API virtual void copyTextureAndColors( const ObjectMeshHolder& src, const VertMap& thisToSrc, const FaceMap& thisToSrcFaces = {} );
150
151 MRMESH_API void copyColors( const VisualObject& src, const VertMap& thisToSrc, const FaceMap& thisToSrcFaces = {} ) override;
152
153 // ancillary texture can be used to have custom features visualization without affecting real one
154 const MeshTexture& getAncillaryTexture() const { return ancillaryTexture_; }
155 virtual void setAncillaryTexture( MeshTexture texture ) { ancillaryTexture_ = std::move( texture ); dirty_ |= DIRTY_TEXTURE; }
156
157 const VertUVCoords& getAncillaryUVCoords() const { return ancillaryUVCoordinates_; }
158 virtual void setAncillaryUVCoords( VertUVCoords uvCoordinates ) { ancillaryUVCoordinates_ = std::move( uvCoordinates ); dirty_ |= DIRTY_UV; }
159 void updateAncillaryUVCoords( VertUVCoords& updated ) { std::swap( ancillaryUVCoordinates_, updated ); dirty_ |= DIRTY_UV; }
160
161 bool hasAncillaryTexture() const { return !ancillaryUVCoordinates_.empty() && !ancillaryTexture_.pixels.empty(); }
163
166
167 MRMESH_API virtual bool getRedrawFlag( ViewportMask viewportMask ) const override;
168
170 MRMESH_API virtual void resetDirtyExeptMask( uint32_t mask ) const;
171
173 [[nodiscard]] MRMESH_API bool isMeshClosed() const;
174
177 [[nodiscard]] MRMESH_API virtual Box3f getWorldBox( ViewportId = {} ) const override;
178
180 [[nodiscard]] MRMESH_API size_t numSelectedFaces() const;
181
183 [[nodiscard]] MRMESH_API size_t numSelectedEdges() const;
184
186 [[nodiscard]] MRMESH_API size_t numCreaseEdges() const;
187
189 [[nodiscard]] MRMESH_API double totalArea() const;
190
192 [[nodiscard]] MRMESH_API double selectedArea() const;
193
195 [[nodiscard]] MRMESH_API double volume() const;
196
198 [[nodiscard]] MRMESH_API float avgEdgeLen() const;
199
201 [[nodiscard]] MRMESH_API size_t numUndirectedEdges() const;
202
204 [[nodiscard]] MRMESH_API size_t numHoles() const;
205
207 [[nodiscard]] MRMESH_API size_t numComponents() const;
208
210 [[nodiscard]] MRMESH_API size_t numHandles() const;
211
213 [[nodiscard]] MRMESH_API virtual size_t heapBytes() const override;
214
216 [[nodiscard]] const char * saveMeshFormat() const { return saveMeshFormat_; }
217
219 MRMESH_API void setSaveMeshFormat( const char * newFormat );
220
226
227protected:
229 UndirectedEdgeBitSet selectedEdges_;
230 UndirectedEdgeBitSet creases_;
231
234 VertUVCoords uvCoordinates_;
235
237
240
241 mutable std::optional<size_t> numHoles_;
242 mutable std::optional<size_t> numComponents_;
243 mutable std::optional<size_t> numUndirectedEdges_;
244 mutable std::optional<size_t> numHandles_;
245 mutable std::optional<bool> meshIsClosed_;
246 mutable std::optional<size_t> numSelectedFaces_, numSelectedEdges_, numCreaseEdges_;
247 mutable std::optional<double> totalArea_, selectedArea_;
248 mutable std::optional<double> volume_;
249 mutable std::optional<float> avgEdgeLen_;
251
252 ObjectMeshHolder( const ObjectMeshHolder& other ) = default;
253
255 MRMESH_API virtual void swapBase_( Object& other ) override;
258 MRMESH_API virtual void swapSignals_( Object& other ) override;
259
260 MRMESH_API virtual Expected<std::future<Expected<void>>> serializeModel_( const std::filesystem::path& path ) const override;
261
262 MRMESH_API virtual void serializeFields_( Json::Value& root ) const override;
263
264 MRMESH_API void deserializeFields_( const Json::Value& root ) override;
265
266 MRMESH_API Expected<void> deserializeModel_( const std::filesystem::path& path, ProgressCallback progressCb = {} ) override;
267
269 MRMESH_API void setAllVisualizeProperties_( const AllVisualizeProperties& properties, std::size_t& pos ) override;
270
271 MRMESH_API virtual Box3f computeBoundingBox_() const override;
272
273 MRMESH_API virtual void setupRenderObject_() const override;
274
276 ViewportMask showFaces_ = ViewportMask::all();
279 ViewportMask showSelectedEdges_ = ViewportMask::all();
280 ViewportMask showSelectedFaces_ = ViewportMask::all();
284
285 // really it shoud be one enum Shading {None, Flat, Smooth, Crease}
286 // but for back capability it is easier to add global flag
287 ViewportMask shadingEnabled_ = ViewportMask::all();
288
290
296
297 FaceColors facesColorMap_;
298 float edgeWidth_{ 0.5f };
299 float pointSize_{ 5.f };
300
301 std::shared_ptr<Mesh> mesh_;
302
303private:
305 void setDefaultColors_();
306
308 void setDefaultSceneProperties_();
309
310 // falls back to the internal format if no CTM format support is available
311 // NOTE: CTM format support is available in the MRIOExtras library; make sure to load it if you prefer CTM
312 const char * saveMeshFormat_ = ".ctm";
313};
314
315} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
Points
Definition MRObjectLinesHolder.h:10
OnlyOddFragments
Definition MRObjectMeshHolder.h:20
Faces
Definition MRObjectMeshHolder.h:12
SelectedFaces
Definition MRObjectMeshHolder.h:16
Edges
Definition MRObjectMeshHolder.h:14
EnableShading
Definition MRObjectMeshHolder.h:18
PolygonOffsetFromCamera
Definition MRObjectMeshHolder.h:22
FlatShading
Definition MRObjectMeshHolder.h:19
SelectedEdges
Definition MRObjectMeshHolder.h:17
Texture
Definition MRObjectMeshHolder.h:13
BordersHighlight
Definition MRObjectMeshHolder.h:21
Definition MRVisualObject.h:67
Definition MRObjectMeshHolder.h:30
Vector< MeshTexture, TextureId > textures_
Texture options.
Definition MRObjectMeshHolder.h:233
virtual void updateTexturePerFace(Vector< TextureId, FaceId > &texturePerFace)
Definition MRObjectMeshHolder.h:140
MRMESH_API size_t numUndirectedEdges() const
returns cached information about the number of undirected edges in the mesh
MRMESH_API const Color & getSelectedFacesColor(ViewportId id={}) const
returns colors of selected triangles
ViewportProperty< Color > faceSelectionColor_
Definition MRObjectMeshHolder.h:295
virtual void updateTextures(Vector< MeshTexture, TextureId > &updated)
Definition MRObjectMeshHolder.h:135
MRMESH_API AllVisualizeProperties getAllVisualizeProperties() const override
get all visualize properties masks
const char * saveMeshFormat() const
returns file extension used to serialize the mesh
Definition MRObjectMeshHolder.h:216
const Color & getEdgesColor(ViewportId id={}) const
Definition MRObjectMeshHolder.h:112
virtual MRMESH_API void setupRenderObject_() const override
const FaceColors & getFacesColorMap() const
Definition MRObjectMeshHolder.h:101
virtual bool hasModel() const override
Definition MRObjectMeshHolder.h:45
SelectionChangedSignal edgeSelectionChangedSignal
Definition MRObjectMeshHolder.h:224
const VertUVCoords & getUVCoords() const
Definition MRObjectMeshHolder.h:144
virtual void setTexturePerFace(Vector< TextureId, FaceId > texturePerFace)
Definition MRObjectMeshHolder.h:139
std::shared_ptr< Mesh > mesh_
Definition MRObjectMeshHolder.h:301
virtual MRMESH_API void setEdgeWidth(float edgeWidth)
MRMESH_API void deserializeFields_(const Json::Value &root) override
std::optional< size_t > numHoles_
Definition MRObjectMeshHolder.h:241
ViewportProperty< Color > edgeSelectionColor_
Definition MRObjectMeshHolder.h:294
virtual void addTexture(MeshTexture texture)
Definition MRObjectMeshHolder.h:141
ViewportMask flatShading_
toggle per-face or per-vertex properties
Definition MRObjectMeshHolder.h:283
virtual MRMESH_API void setDirtyFlags(uint32_t mask, bool invalidateCaches=true) override
MRMESH_API uint32_t getNeededNormalsRenderDirtyValue(ViewportMask viewportMask) const
returns dirty flag of currently using normal type if they are dirty in render representation
const Vector< MeshTexture, TextureId > & getTextures() const
Definition MRObjectMeshHolder.h:133
ViewportMask showEdges_
Definition MRObjectMeshHolder.h:277
ObjectMeshHolder(ProtectedStruct, const ObjectMeshHolder &obj)
Definition MRObjectMeshHolder.h:125
const Color & getBordersColor(ViewportId id={}) const
Definition MRObjectMeshHolder.h:120
virtual MRMESH_API Box3f getWorldBox(ViewportId={}) const override
MRMESH_API double totalArea() const
returns cached summed area of mesh triangles
ViewportProperty< XfBasedCache< Box3f > > worldBox_
Definition MRObjectMeshHolder.h:250
virtual MRMESH_API void setCreases(UndirectedEdgeBitSet creases)
FaceColors facesColorMap_
Definition MRObjectMeshHolder.h:297
virtual void setEdgesColor(const Color &color, ViewportId id={})
Definition MRObjectMeshHolder.h:113
ViewportMask onlyOddFragments_
Definition MRObjectMeshHolder.h:289
VertUVCoords ancillaryUVCoordinates_
vertices coordinates in ancillary texture
Definition MRObjectMeshHolder.h:239
MRMESH_API void setAllVisualizeProperties_(const AllVisualizeProperties &properties, std::size_t &pos) override
set all visualize properties masks
MRMESH_API const ViewportProperty< Color > & getBordersColorsForAllViewports() const
virtual void updateUVCoords(VertUVCoords &updated)
Definition MRObjectMeshHolder.h:146
virtual MRMESH_API void setPointSize(float size)
SelectionChangedSignal faceSelectionChangedSignal
Definition MRObjectMeshHolder.h:223
ObjectMeshHolder(ObjectMeshHolder &&) noexcept=default
virtual MRMESH_API void setSelectedFacesColorsForAllViewports(ViewportProperty< Color > val)
ViewportMask showPoints_
Definition MRObjectMeshHolder.h:278
virtual MRMESH_API bool hasVisualRepresentation() const override
mesh object can be seen if the mesh has at least one edge
MRMESH_API const ViewportProperty< Color > & getSelectedEdgesColorsForAllViewports() const
virtual MRMESH_API void setSelectedEdgesColorsForAllViewports(ViewportProperty< Color > val)
std::optional< double > volume_
Definition MRObjectMeshHolder.h:248
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
virtual MRMESH_API size_t heapBytes() const override
returns the amount of memory this object occupies on heap
const TexturePerFace & getTexturePerFace() const
Definition MRObjectMeshHolder.h:142
MeshPart meshPart() const
Definition MRObjectMeshHolder.h:51
const MeshTexture & getAncillaryTexture() const
Definition MRObjectMeshHolder.h:154
std::optional< size_t > numHandles_
Definition MRObjectMeshHolder.h:244
MRMESH_API size_t numCreaseEdges() const
returns cached information about the number of crease undirected edges in the mesh
void updateAncillaryUVCoords(VertUVCoords &updated)
Definition MRObjectMeshHolder.h:159
Vector< TextureId, FaceId > texturePerFace_
Definition MRObjectMeshHolder.h:236
const FaceBitSet & getSelectedFaces() const
Definition MRObjectMeshHolder.h:58
bool hasAncillaryTexture() const
Definition MRObjectMeshHolder.h:161
std::optional< size_t > numUndirectedEdges_
Definition MRObjectMeshHolder.h:243
ViewportProperty< Color > pointsColor_
Definition MRObjectMeshHolder.h:292
virtual MRMESH_API void selectEdges(UndirectedEdgeBitSet newSelection)
void setFlatShading(bool on)
sets flat (true) or smooth (false) shading
Definition MRObjectMeshHolder.h:89
MRMESH_API const MeshTexture & getTexture() const
returns first texture in the vector. If there is no textures, returns empty texture
const UndirectedEdgeBitSet & getSelectedEdges() const
Definition MRObjectMeshHolder.h:65
std::optional< float > avgEdgeLen_
Definition MRObjectMeshHolder.h:249
FaceBitSet selectedTriangles_
Definition MRObjectMeshHolder.h:228
virtual void setPointsColor(const Color &color, ViewportId id={})
Definition MRObjectMeshHolder.h:117
ViewportMask showBordersHighlight_
Definition MRObjectMeshHolder.h:281
UndirectedEdgeBitSet creases_
Definition MRObjectMeshHolder.h:230
virtual const char * typeName() const override
Definition MRObjectMeshHolder.h:38
virtual MRMESH_API void resetDirtyExeptMask(uint32_t mask) const
reset dirty flags without some specific bits (useful for lazy normals update)
ObjectMeshHolder(const ObjectMeshHolder &other)=default
virtual MRMESH_API void setTexture(MeshTexture texture)
MRMESH_API double volume() const
returns cached volume of space surrounded by the mesh, which is valid only if mesh is closed
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
std::optional< size_t > numComponents_
Definition MRObjectMeshHolder.h:242
virtual MRMESH_API void setSelectedEdgesColor(const Color &color, ViewportId id={})
sets colors of selected edges
virtual MRMESH_API void updateTexture(MeshTexture &updated)
virtual MRMESH_API void selectFaces(FaceBitSet newSelection)
virtual void setTextures(Vector< MeshTexture, TextureId > texture)
Definition MRObjectMeshHolder.h:134
virtual MRMESH_API Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &path) const override
virtual MRMESH_API Box3f computeBoundingBox_() const override
virtual MRMESH_API bool getRedrawFlag(ViewportMask viewportMask) const override
returns true if the object must be redrawn (due to dirty flags) in one of specified viewports
const VertUVCoords & getAncillaryUVCoords() const
Definition MRObjectMeshHolder.h:157
virtual MRMESH_API void setBordersColorsForAllViewports(ViewportProperty< Color > val)
virtual void setAncillaryUVCoords(VertUVCoords uvCoordinates)
Definition MRObjectMeshHolder.h:158
MRMESH_API const Color & getSelectedEdgesColor(ViewportId id={}) const
returns colors of selected edges
MRMESH_API float avgEdgeLen() const
returns cached average edge length
MRMESH_API size_t numHoles() const
returns cached information about the number of holes in the mesh
MRMESH_API void setSaveMeshFormat(const char *newFormat)
sets file extension used to serialize the mesh: must be not null and must start from '....
MeshTexture ancillaryTexture_
Definition MRObjectMeshHolder.h:238
bool flatShading() const
Definition MRObjectMeshHolder.h:91
MRMESH_API void copyColors(const VisualObject &src, const VertMap &thisToSrc, const FaceMap &thisToSrcFaces={}) override
copies point colors from given source object
MRMESH_API void clearAncillaryTexture()
virtual float getPointSize() const
Definition MRObjectMeshHolder.h:110
const UndirectedEdgeBitSet & creases() const
Edges on mesh, that will have sharp visualization even with smooth shading.
Definition MRObjectMeshHolder.h:85
virtual void setUVCoords(VertUVCoords uvCoordinates)
Definition MRObjectMeshHolder.h:145
virtual void setBordersColor(const Color &color, ViewportId id={})
Definition MRObjectMeshHolder.h:121
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
ViewportProperty< Color > bordersColor_
Definition MRObjectMeshHolder.h:293
virtual MRMESH_API void setEdgesColorsForAllViewports(ViewportProperty< Color > val)
UndirectedEdgeBitSet selectedEdges_
Definition MRObjectMeshHolder.h:229
ViewportMask polygonOffset_
Definition MRObjectMeshHolder.h:282
MRMESH_API size_t numSelectedEdges() const
returns cached information about the number of selected undirected edges in the mesh
virtual MRMESH_API void swapSignals_(Object &other) override
MRMESH_API size_t numSelectedFaces() const
returns cached information about the number of selected faces in the mesh
const Color & getPointsColor(ViewportId id={}) const
Definition MRObjectMeshHolder.h:116
std::optional< double > selectedArea_
Definition MRObjectMeshHolder.h:247
MRMESH_API const ViewportMask & getVisualizePropertyMask(AnyVisualizeMaskEnum type) const override
returns mask of viewports where given property is set
MRMESH_API const ViewportProperty< Color > & getEdgesColorsForAllViewports() const
virtual MRMESH_API void copyTextureAndColors(const ObjectMeshHolder &src, const VertMap &thisToSrc, const FaceMap &thisToSrcFaces={})
copies texture, UV-coordinates and vertex colors from given source object
virtual void setFacesColorMap(FaceColors facesColorMap)
Definition MRObjectMeshHolder.h:102
float getEdgeWidth() const
Definition MRObjectMeshHolder.h:108
std::optional< bool > meshIsClosed_
Definition MRObjectMeshHolder.h:245
MRMESH_API bool isMeshClosed() const
returns cached information whether the mesh is closed
MRMESH_API const ViewportProperty< Color > & getSelectedFacesColorsForAllViewports() const
MRMESH_API size_t numHandles() const
returns cached information about the number of handles in the mesh
virtual MRMESH_API void setSelectedFacesColor(const Color &color, ViewportId id={})
sets colors of selected triangles
MRMESH_API size_t numComponents() const
returns cached information about the number of components in the mesh
virtual MRMESH_API std::shared_ptr< Object > clone() const override
MRMESH_API bool supportsVisualizeProperty(AnyVisualizeMaskEnum type) const override
Returns true if this class supports the property type. Otherwise passing it to the functions below is...
VertUVCoords uvCoordinates_
vertices coordinates in texture
Definition MRObjectMeshHolder.h:234
MRMESH_API Expected< void > deserializeModel_(const std::filesystem::path &path, ProgressCallback progressCb={}) override
Reads model from file.
std::optional< size_t > numCreaseEdges_
Definition MRObjectMeshHolder.h:246
const std::shared_ptr< const Mesh > & mesh() const
Definition MRObjectMeshHolder.h:47
ViewportMask showTexture_
Definition MRObjectMeshHolder.h:275
SelectionChangedSignal creasesChangedSignal
Definition MRObjectMeshHolder.h:225
virtual void setAncillaryTexture(MeshTexture texture)
Definition MRObjectMeshHolder.h:155
MRMESH_API double selectedArea() const
returns cached area of selected triangles
virtual void updateFacesColorMap(FaceColors &updated)
Definition MRObjectMeshHolder.h:104
ViewportProperty< Color > edgesColor_
Definition MRObjectMeshHolder.h:291
virtual MRMESH_API void applyScale(float scaleFactor) override
scale object size (all point positions)
MRMESH_API ObjectMeshHolder()
named object in the data model
Definition MRObject.h:60
std::vector<T>-like container that requires specific indexing type,
Definition MRMesh/MRVector.h:20
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
Definition MRViewportProperty.h:17
Visual Object.
Definition MRVisualObject.h:131
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
std::vector< ViewportMask > AllVisualizeProperties
Definition MRVisualObject.h:85
@ DIRTY_PRIMITIVE_COLORMAP
Definition MRVisualObject.h:101
@ DIRTY_TEXTURE
Definition MRVisualObject.h:97
@ DIRTY_TEXTURE_PER_FACE
Definition MRVisualObject.h:103
@ DIRTY_UV
Definition MRVisualObject.h:91
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
Definition MRColor.h:9
Definition MRVisualObject.h:45
Definition MRMeshTexture.h:13
Definition MRObject.h:246