MeshLib C++ Docs
Loading...
Searching...
No Matches
MRVertCoordsDiff.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRphmap.h"
4
5namespace MR
6{
7
12{
13public:
15 VertCoordsDiff() = default;
16
18 MRMESH_API VertCoordsDiff( const VertCoords & from, const VertCoords & to );
19
22 MRMESH_API void applyAndSwap( VertCoords & m );
23
27 [[nodiscard]] bool any() const { return !changedPoints_.empty(); }
28
30 [[nodiscard]] MRMESH_API size_t heapBytes() const;
31
32private:
33 size_t toPointsSize_ = 0;
34 HashMap<VertId, Vector3f> changedPoints_;
35};
36
37} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:68
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
MRMESH_API VertCoordsDiff(const VertCoords &from, const VertCoords &to)
computes the difference, that can be applied to vector-from in order to get vector-to
MRMESH_API void applyAndSwap(VertCoords &m)
VertCoordsDiff()=default
constructs minimal difference, where applyAndSwap( v ) will produce empty vector
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:482