MeshLib C Docs
Loading...
Searching...
No Matches
MRNormalsToPoints.h File Reference
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stddef.h>

Go to the source code of this file.

Typedefs

typedef struct MR_FaceNormals MR_FaceNormals
 
typedef struct MR_MeshTopology MR_MeshTopology
 
typedef struct MR_VertCoords MR_VertCoords
 
typedef struct MR_NormalsToPoints MR_NormalsToPoints
 
typedef struct MR_NormalsToPoints_ISolver MR_NormalsToPoints_ISolver
 Generated from class MR::NormalsToPoints::ISolver.
 

Functions

MRC_API MR_NormalsToPointsMR_NormalsToPoints_DefaultConstruct (void)
 
MRC_API MR_NormalsToPointsMR_NormalsToPoints_DefaultConstructArray (size_t num_elems)
 
MRC_API const MR_NormalsToPointsMR_NormalsToPoints_OffsetPtr (const MR_NormalsToPoints *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_NormalsToPointsMR_NormalsToPoints_OffsetMutablePtr (MR_NormalsToPoints *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_NormalsToPointsMR_NormalsToPoints_ConstructFromAnother (MR_PassBy _other_pass_by, MR_NormalsToPoints *_other)
 
MRC_API void MR_NormalsToPoints_Destroy (const MR_NormalsToPoints *_this)
 Destroys a heap-allocated instance of MR_NormalsToPoints. Does nothing if the pointer is null.
 
MRC_API void MR_NormalsToPoints_DestroyArray (const MR_NormalsToPoints *_this)
 Destroys a heap-allocated array of MR_NormalsToPoints. Does nothing if the pointer is null.
 
MRC_API MR_NormalsToPointsMR_NormalsToPoints_AssignFromAnother (MR_NormalsToPoints *_this, MR_PassBy _other_pass_by, MR_NormalsToPoints *_other)
 
MRC_API void MR_NormalsToPoints_prepare (MR_NormalsToPoints *_this, const MR_MeshTopology *topology, const float *guideWeight)
 
MRC_API void MR_NormalsToPoints_run_3 (MR_NormalsToPoints *_this, const MR_VertCoords *guide, const MR_FaceNormals *normals, MR_VertCoords *points)
 
MRC_API void MR_NormalsToPoints_run_4 (MR_NormalsToPoints *_this, const MR_VertCoords *guide, const MR_FaceNormals *normals, MR_VertCoords *points, float maxInitialDistSq)
 
MRC_API void MR_NormalsToPoints_ISolver_Destroy (const MR_NormalsToPoints_ISolver *_this)
 Destroys a heap-allocated instance of MR_NormalsToPoints_ISolver. Does nothing if the pointer is null.
 
MRC_API void MR_NormalsToPoints_ISolver_DestroyArray (const MR_NormalsToPoints_ISolver *_this)
 Destroys a heap-allocated array of MR_NormalsToPoints_ISolver. Does nothing if the pointer is null.
 
MRC_API void MR_NormalsToPoints_ISolver_prepare (MR_NormalsToPoints_ISolver *_this, const MR_MeshTopology *topology, float guideWeight)
 
MRC_API void MR_NormalsToPoints_ISolver_run (MR_NormalsToPoints_ISolver *_this, const MR_VertCoords *guide, const MR_FaceNormals *normals, MR_VertCoords *points, float maxInitialDistSq)
 
MRC_API const MR_NormalsToPoints_ISolverMR_NormalsToPoints_ISolver_OffsetPtr (const MR_NormalsToPoints_ISolver *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 
MRC_API MR_NormalsToPoints_ISolverMR_NormalsToPoints_ISolver_OffsetMutablePtr (MR_NormalsToPoints_ISolver *ptr, ptrdiff_t i)
 Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.
 

Typedef Documentation

◆ MR_FaceNormals

◆ MR_MeshTopology

◆ MR_NormalsToPoints

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.

◆ MR_NormalsToPoints_ISolver

◆ MR_VertCoords

typedef struct MR_VertCoords MR_VertCoords

Function Documentation

◆ MR_NormalsToPoints_AssignFromAnother()

MRC_API MR_NormalsToPoints * MR_NormalsToPoints_AssignFromAnother ( MR_NormalsToPoints * _this,
MR_PassBy _other_pass_by,
MR_NormalsToPoints * _other )

Generated from a method of class MR::NormalsToPoints named operator=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_NormalsToPoints_ConstructFromAnother()

MRC_API MR_NormalsToPoints * MR_NormalsToPoints_ConstructFromAnother ( MR_PassBy _other_pass_by,
MR_NormalsToPoints * _other )

Generated from a constructor of class MR::NormalsToPoints. Never returns null. Returns an instance allocated on the heap! Must call MR_NormalsToPoints_Destroy() to free it when you're done using it.

◆ MR_NormalsToPoints_DefaultConstruct()

MRC_API MR_NormalsToPoints * MR_NormalsToPoints_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance. Never returns null. Returns an instance allocated on the heap! Must call MR_NormalsToPoints_Destroy() to free it when you're done using it.

◆ MR_NormalsToPoints_DefaultConstructArray()

MRC_API MR_NormalsToPoints * MR_NormalsToPoints_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_NormalsToPoints_DestroyArray(). Use MR_NormalsToPoints_OffsetMutablePtr() and MR_NormalsToPoints_OffsetPtr() to access the array elements.

◆ MR_NormalsToPoints_Destroy()

MRC_API void MR_NormalsToPoints_Destroy ( const MR_NormalsToPoints * _this)

Destroys a heap-allocated instance of MR_NormalsToPoints. Does nothing if the pointer is null.

◆ MR_NormalsToPoints_DestroyArray()

MRC_API void MR_NormalsToPoints_DestroyArray ( const MR_NormalsToPoints * _this)

Destroys a heap-allocated array of MR_NormalsToPoints. Does nothing if the pointer is null.

◆ MR_NormalsToPoints_ISolver_Destroy()

MRC_API void MR_NormalsToPoints_ISolver_Destroy ( const MR_NormalsToPoints_ISolver * _this)

Destroys a heap-allocated instance of MR_NormalsToPoints_ISolver. Does nothing if the pointer is null.

◆ MR_NormalsToPoints_ISolver_DestroyArray()

MRC_API void MR_NormalsToPoints_ISolver_DestroyArray ( const MR_NormalsToPoints_ISolver * _this)

Destroys a heap-allocated array of MR_NormalsToPoints_ISolver. Does nothing if the pointer is null.

◆ MR_NormalsToPoints_ISolver_OffsetMutablePtr()

MRC_API MR_NormalsToPoints_ISolver * MR_NormalsToPoints_ISolver_OffsetMutablePtr ( MR_NormalsToPoints_ISolver * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_NormalsToPoints_ISolver_OffsetPtr()

MRC_API const MR_NormalsToPoints_ISolver * MR_NormalsToPoints_ISolver_OffsetPtr ( const MR_NormalsToPoints_ISolver * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_NormalsToPoints_ISolver_prepare()

MRC_API void MR_NormalsToPoints_ISolver_prepare ( MR_NormalsToPoints_ISolver * _this,
const MR_MeshTopology * topology,
float guideWeight )

Generated from a method of class MR::NormalsToPoints::ISolver named prepare. Parameter _this can not be null. It is a single object. Parameter topology can not be null. It is a single object.

◆ MR_NormalsToPoints_ISolver_run()

MRC_API void MR_NormalsToPoints_ISolver_run ( MR_NormalsToPoints_ISolver * _this,
const MR_VertCoords * guide,
const MR_FaceNormals * normals,
MR_VertCoords * points,
float maxInitialDistSq )

Generated from a method of class MR::NormalsToPoints::ISolver named run. Parameter _this can not be null. It is a single object. Parameter guide can not be null. It is a single object. Parameter normals can not be null. It is a single object. Parameter points can not be null. It is a single object.

◆ MR_NormalsToPoints_OffsetMutablePtr()

MRC_API MR_NormalsToPoints * MR_NormalsToPoints_OffsetMutablePtr ( MR_NormalsToPoints * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_NormalsToPoints_OffsetPtr()

MRC_API const MR_NormalsToPoints * MR_NormalsToPoints_OffsetPtr ( const MR_NormalsToPoints * ptr,
ptrdiff_t i )

Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the pointer points to an array element.

◆ MR_NormalsToPoints_prepare()

MRC_API void MR_NormalsToPoints_prepare ( MR_NormalsToPoints * _this,
const MR_MeshTopology * topology,
const float * guideWeight )

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 Generated from a method of class MR::NormalsToPoints named prepare. Parameter _this can not be null. It is a single object. Parameter topology can not be null. It is a single object. Parameter guideWeight has a default argument: 1, pass a null pointer to use it.

◆ MR_NormalsToPoints_run_3()

MRC_API void MR_NormalsToPoints_run_3 ( MR_NormalsToPoints * _this,
const MR_VertCoords * guide,
const MR_FaceNormals * normals,
MR_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) Generated from a method of class MR::NormalsToPoints named run. Parameter _this can not be null. It is a single object. Parameter guide can not be null. It is a single object. Parameter normals can not be null. It is a single object. Parameter points can not be null. It is a single object.

◆ MR_NormalsToPoints_run_4()

MRC_API void MR_NormalsToPoints_run_4 ( MR_NormalsToPoints * _this,
const MR_VertCoords * guide,
const MR_FaceNormals * normals,
MR_VertCoords * points,
float maxInitialDistSq )

Generated from a method of class MR::NormalsToPoints named run. Parameter _this can not be null. It is a single object. Parameter guide can not be null. It is a single object. Parameter normals can not be null. It is a single object. Parameter points can not be null. It is a single object.