MeshLib C++ Docs
Loading...
Searching...
No Matches

this class is responsible for iterative construction of distance map along the surface More...

#include <MRMesh/MRSurfaceDistanceBuilder.h>

Public Member Functions

 SurfaceDistanceBuilder (const Mesh &mesh, const VertBitSet *region)
 SurfaceDistanceBuilder (const Mesh &mesh, const Vector3f &target, const VertBitSet *region)
void addStartRegion (const VertBitSet &region, float startDistance)
 initiates distance construction from given vertices with known start distance in all of them (region vertices will NOT be returned by growOne)
void addStartVertices (const HashMap< VertId, float > &startVertices)
 initiates distance construction from given start vertices with values in them (these vertices will NOT be returned by growOne if values in them are not decreased)
void addStart (const MeshTriPoint &start)
 initiates distance construction from triangle vertices surrounding given start point (they all will be returned by growOne)
void setMaxVertUpdates (int v)
VertId growOne ()
 processes one more candidate vertex, which is returned
VertScalars takeDistanceMap ()
 takes ownership over constructed distance map
bool done () const
 returns true if further growth is impossible
float doneDistance () const
 returns path length till the next candidate vertex or maximum float value if all vertices have been reached

Detailed Description

this class is responsible for iterative construction of distance map along the surface

Constructor & Destructor Documentation

◆ SurfaceDistanceBuilder() [1/2]

MR::SurfaceDistanceBuilder::SurfaceDistanceBuilder ( const Mesh & mesh,
const VertBitSet * region )

◆ SurfaceDistanceBuilder() [2/2]

MR::SurfaceDistanceBuilder::SurfaceDistanceBuilder ( const Mesh & mesh,
const Vector3f & target,
const VertBitSet * region )
inline

Member Function Documentation

◆ addStart()

void MR::SurfaceDistanceBuilder::addStart ( const MeshTriPoint & start)

initiates distance construction from triangle vertices surrounding given start point (they all will be returned by growOne)

◆ addStartRegion()

void MR::SurfaceDistanceBuilder::addStartRegion ( const VertBitSet & region,
float startDistance )

initiates distance construction from given vertices with known start distance in all of them (region vertices will NOT be returned by growOne)

◆ addStartVertices()

void MR::SurfaceDistanceBuilder::addStartVertices ( const HashMap< VertId, float > & startVertices)

initiates distance construction from given start vertices with values in them (these vertices will NOT be returned by growOne if values in them are not decreased)

◆ done()

bool MR::SurfaceDistanceBuilder::done ( ) const
inline

returns true if further growth is impossible

◆ doneDistance()

float MR::SurfaceDistanceBuilder::doneDistance ( ) const
inline

returns path length till the next candidate vertex or maximum float value if all vertices have been reached

◆ growOne()

VertId MR::SurfaceDistanceBuilder::growOne ( )

processes one more candidate vertex, which is returned

◆ setMaxVertUpdates()

void MR::SurfaceDistanceBuilder::setMaxVertUpdates ( int v)

the maximum amount of times vertex distance can be updated in [1,255], 3 by default; the more the better obtuse triangles are handled

◆ takeDistanceMap()

VertScalars MR::SurfaceDistanceBuilder::takeDistanceMap ( )
inline

takes ownership over constructed distance map


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