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

#include <MRMeshTopologyDiff.h>

Public Member Functions

 MeshTopologyDiff ()=default
 constructs minimal difference, where applyAndSwap( t ) will produce empty topology
 
MRMESH_API MeshTopologyDiff (const MeshTopology &from, const MeshTopology &to)
 computes the difference, that can be applied to topology-from in order to get topology-to
 
MRMESH_API void applyAndSwap (MeshTopology &t)
 
bool any () const
 
MRMESH_API size_t heapBytes () const
 returns the amount of memory this object occupies on heap
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ MeshTopologyDiff() [1/2]

MR::MeshTopologyDiff::MeshTopologyDiff ( )
default

constructs minimal difference, where applyAndSwap( t ) will produce empty topology

◆ MeshTopologyDiff() [2/2]

MRMESH_API MR::MeshTopologyDiff::MeshTopologyDiff ( const MeshTopology & from,
const MeshTopology & to )

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

Member Function Documentation

◆ any()

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

returns true if this object does contain some difference in topology; if (from) has 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::MeshTopologyDiff::applyAndSwap ( MeshTopology & t)

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

◆ heapBytes()

MRMESH_API size_t MR::MeshTopologyDiff::heapBytes ( ) const
nodiscard

returns the amount of memory this object occupies on heap


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