MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::MeshDiff Class Reference

#include <MRMeshDiff.h>

Public Member Functions

 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
 
size_t heapBytes () const
 returns the amount of memory this object occupies on heap
 

Detailed Description

this object stores a difference between two meshes: both in coordinates and in topology

if the meshes are similar then this object is small, if the meshes are very distinct then this object will be even larger than one mesh itself

Constructor & Destructor Documentation

◆ MeshDiff() [1/2]

MR::MeshDiff::MeshDiff ( )
default

constructs minimal difference, where applyAndSwap( m ) will produce empty mesh

◆ MeshDiff() [2/2]

MRMESH_API MR::MeshDiff::MeshDiff ( const Mesh & from,
const Mesh & to )

computes the difference, that can be applied to mesh-from in order to get mesh-to

Member Function Documentation

◆ any()

bool MR::MeshDiff::any ( ) const
inlinenodiscard

returns true if this object does contain some difference in point coordinates or in topology; if (from) mesh has just more points or more topology elements than (to) and the common elements are the same, then the method will return false since nothing is stored here

◆ applyAndSwap()

MRMESH_API void MR::MeshDiff::applyAndSwap ( Mesh & m)

given mesh-from on input converts it in mesh-to, this object is updated to become the reverse difference from original mesh-to to original mesh-from

◆ heapBytes()

size_t MR::MeshDiff::heapBytes ( ) const
inlinenodiscard

returns the amount of memory this object occupies on heap


The documentation for this class was generated from the following file: