MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMeshDiff.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRVertCoordsDiff.h"
5
6namespace MR
7{
8
13{
14public:
16 MeshDiff() = default;
17
19 MRMESH_API MeshDiff( const Mesh & from, const Mesh & to );
20
24
28 [[nodiscard]] bool any() const { return pointsDiff_.any() || topologyDiff_.any(); }
29
31 [[nodiscard]] size_t heapBytes() const { return pointsDiff_.heapBytes() + topologyDiff_.heapBytes(); }
32
33private:
34 VertCoordsDiff pointsDiff_;
35 MeshTopologyDiff topologyDiff_;
36};
37
38} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:68
Definition MRMeshDiff.h:13
MeshDiff()=default
constructs minimal difference, where applyAndSwap( m ) will produce empty mesh
MRMESH_API MeshDiff(const Mesh &from, const Mesh &to)
computes the difference, that can be applied to mesh-from in order to get mesh-to
MRMESH_API void applyAndSwap(Mesh &m)
bool any() const
Definition MRMeshDiff.h:28
size_t heapBytes() const
returns the amount of memory this object occupies on heap
Definition MRMeshDiff.h:31
Definition MRMeshTopologyDiff.h:13
MRMESH_API size_t heapBytes() const
returns the amount of memory this object occupies on heap
bool any() const
Definition MRMeshTopologyDiff.h:28
Definition MRVertCoordsDiff.h:12
bool any() const
Definition MRVertCoordsDiff.h:27
MRMESH_API size_t heapBytes() const
returns the amount of memory this object occupies on heap
Definition MRMesh/MRMesh.h:23