MeshLib Documentation
Loading...
Searching...
No Matches
MR::NormalsToPoints Class Reference

#include <MRNormalsToPoints.h>

Classes

class  ISolver
 

Public Member Functions

MRMESH_API void prepare (const MeshTopology &topology, float guideWeight=1)
 
MRMESH_API void run (const VertCoords &guide, const FaceNormals &normals, VertCoords &points)
 
MRMESH_API void run (const VertCoords &guide, const FaceNormals &normals, VertCoords &points, float maxInitialDistSq)
 

Detailed Description

The purpose of this class is to update vertex positions given target triangle normals; see the article "Static/Dynamic Filtering for Mesh Geometry"

Member Function Documentation

◆ prepare()

MRMESH_API void MR::NormalsToPoints::prepare ( const MeshTopology & topology,
float guideWeight = 1 )

builds linear system and prepares a solver for it; please call it only once for mesh, and then run as many times as you like

Parameters
guideWeighthow much resulting points must be attracted to initial points, must be > 0

◆ run() [1/2]

MRMESH_API void MR::NormalsToPoints::run ( const VertCoords & guide,
const FaceNormals & normals,
VertCoords & points )

performs one iteration consisting of projection of all triangles on planes with given normals and finding best points from them

Parameters
guidetarget vertex positions to avoid under-determined system
normalstarget face normals
pointsinitial approximation on input, updated approximation on output
maxInitialDistSqthe maximum squared distance between a point and its position in (guide)

◆ run() [2/2]

MRMESH_API void MR::NormalsToPoints::run ( const VertCoords & guide,
const FaceNormals & normals,
VertCoords & points,
float maxInitialDistSq )

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