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

#include <MRVertCoordsDiff.h>

Public Member Functions

 VertCoordsDiff ()=default
 constructs minimal difference, where applyAndSwap( v ) will produce empty vector
 
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)
 
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 vectors with 3D coordinates

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

Constructor & Destructor Documentation

◆ VertCoordsDiff() [1/2]

MR::VertCoordsDiff::VertCoordsDiff ( )
default

constructs minimal difference, where applyAndSwap( v ) will produce empty vector

◆ VertCoordsDiff() [2/2]

MRMESH_API MR::VertCoordsDiff::VertCoordsDiff ( const VertCoords & from,
const VertCoords & to )

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

Member Function Documentation

◆ any()

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

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

◆ applyAndSwap()

MRMESH_API void MR::VertCoordsDiff::applyAndSwap ( VertCoords & m)

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

◆ heapBytes()

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

returns the amount of memory this object occupies on heap


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