MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::NormalsToPoints Struct Reference
Inheritance diagram for meshlib::NormalsToPoints:

Public Member Functions

auto assign_from_another (_other:meshlib::Owned< meshlib::NormalsToPoints >) -> &mut meshlib::NormalsToPoints
void prepare (topology:&meshlib::MeshTopology, guideWeight:Option< f32 >, region:Option<&meshlib::VertBitSet >)
void run_3 (guide:&meshlib::VertCoords, normals:&meshlib::FaceNormals, points:&mut meshlib::VertCoords)
void run_4 (guide:&meshlib::VertCoords, normals:&meshlib::FaceNormals, points:&mut meshlib::VertCoords, maxInitialDistSq:f32)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::NormalsToPoints >
static auto construct_from_another (_other:meshlib::Owned< meshlib::NormalsToPoints >) -> meshlib::Owned< meshlib::NormalsToPoints >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)

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" Generated from class MR::NormalsToPoints.

Generated from class MR::NormalsToPoints. Heap-allocated instances are held in Owned<NormalsToPoints>.

Member Function Documentation

◆ assign_from_another()

auto meshlib::NormalsToPoints::assign_from_another ( _other:meshlib::Owned< meshlib::NormalsToPoints > ) -> &mut meshlib::NormalsToPoints

Generated from method MR::NormalsToPoints::operator=.

Calls MR_NormalsToPoints_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.

◆ construct_from_another()

auto meshlib::NormalsToPoints::construct_from_another ( _other:meshlib::Owned< meshlib::NormalsToPoints > ) -> meshlib::Owned< meshlib::NormalsToPoints >
static

Generated from constructor MR::NormalsToPoints::NormalsToPoints.

Calls MR_NormalsToPoints_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ new()

auto meshlib::NormalsToPoints::new ( ) -> meshlib::Owned< meshlib::NormalsToPoints >
static

Constructs an empty (default-constructed) instance.

Calls MR_NormalsToPoints_DefaultConstruct().

◆ prepare()

void meshlib::NormalsToPoints::prepare ( topology:&meshlib::MeshTopology ,
guideWeight:Option< f32 > ,
region:Option<&meshlib::VertBitSet >  )

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
regionif given, then only these vertices are moved by run(), and all other vertices are fixed Generated from method MR::NormalsToPoints::prepare.

Calls MR_NormalsToPoints_prepare().

◆ run_3()

void meshlib::NormalsToPoints::run_3 ( guide:&meshlib::VertCoords ,
normals:&meshlib::FaceNormals ,
points:&mut meshlib::VertCoords  )

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 maxInitialDistSq the maximum squared distance between a point and its position in (guide) Generated from method MR::NormalsToPoints::run.

Calls MR_NormalsToPoints_run_3().

◆ run_4()

void meshlib::NormalsToPoints::run_4 ( guide:&meshlib::VertCoords ,
normals:&meshlib::FaceNormals ,
points:&mut meshlib::VertCoords ,
maxInitialDistSq:f32  )

Generated from method MR::NormalsToPoints::run.

Calls MR_NormalsToPoints_run_4().


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