NDEVR
API Documentation

Forward declaration of InfoPipe for progress/logging support. More...

Static Public Member Functions

static void ClearSmoothing (Geometry &geo, const Geometry::SmoothingParameters &smoothing_parameters)
 Removes any previously applied smoothing from a geometry, restoring original vertex positions.
static void CotangentLaplacianSmoothing (Geometry &geo, const Geometry::SmoothingParameters &smoothing_parameters)
 Applies cotangent-weighted Laplacian smoothing to a geometry mesh.
static void LaplacianSmoothing (Geometry &geo, const Geometry::SmoothingParameters &smoothing_parameters)
 Applies Laplacian smoothing to a geometry mesh.
static void NormalSmoothing (Geometry &geo, NormalMode normal_mode, const Angle< fltp08 > &max_smooth_angle, const void *lock, LogPtr log)
 Recalculates and smooths the surface normals of a geometry.

Static Protected Member Functions

static void RestoreGeo (Geometry &geo, const Buffer< Vector< 3, fltp08 > > &verts, GeometryPositionModRestore &restore, const void *lock, LogPtr log)
 Restores geometry vertex positions and associated cached data after a smoothing operation.

Detailed Description

Forward declaration of InfoPipe for progress/logging support.


Contains static methods for smoothing 3D geometry meshes.

Provides several smoothing algorithms including uniform Laplacian, cotangent-weighted Laplacian, and normal smoothing. Also supports clearing previously applied smoothing operations.

See also
Geometry, GeometryFilter

Definition at line 46 of file Smoothing.h.

Member Function Documentation

◆ ClearSmoothing()

void Smoothing::ClearSmoothing ( Geometry & geo,
const Geometry::SmoothingParameters & smoothing_parameters )
static

Removes any previously applied smoothing from a geometry, restoring original vertex positions.


Parameters
[in]geoThe geometry to clear smoothing from.
[in]smoothing_parametersParameters controlling the smoothing operation (property, iterations, lock, log, etc.).

◆ CotangentLaplacianSmoothing()

void Smoothing::CotangentLaplacianSmoothing ( Geometry & geo,
const Geometry::SmoothingParameters & smoothing_parameters )
static

Applies cotangent-weighted Laplacian smoothing to a geometry mesh.


Unlike uniform Laplacian smoothing, this variant uses cotangent weights derived from triangle angles, which better preserves geometric features while reducing noise.

Parameters
[in]geoThe geometry to smooth.
[in]smoothing_parametersParameters controlling the smoothing operation (iterations, shrink/grow rates, etc.).

◆ LaplacianSmoothing()

void Smoothing::LaplacianSmoothing ( Geometry & geo,
const Geometry::SmoothingParameters & smoothing_parameters )
static

Applies Laplacian smoothing to a geometry mesh.


Laplacian smoothing iteratively moves each vertex toward the average position of its neighbors, using shrink and grow rates from the smoothing parameters to reduce mesh shrinkage (Taubin smoothing).

Parameters
[in]geoThe geometry to smooth.
[in]smoothing_parametersParameters controlling the smoothing operation (iterations, shrink/grow rates, etc.).

◆ NormalSmoothing()

void Smoothing::NormalSmoothing ( Geometry & geo,
NormalMode normal_mode,
const Angle< fltp08 > & max_smooth_angle,
const void * lock,
LogPtr log )
static

Recalculates and smooths the surface normals of a geometry.


Parameters
[in]geoThe geometry whose normals will be recalculated.
[in]normal_modeThe mode used for normal computation (e.g., smooth, flat, or none).
[in]max_smooth_angleThe maximum angle between face normals for which smoothing will be applied.
[in]lockAn optional mutex or lock pointer used for thread-safe geometry access.
[in]logAn optional log for reporting progress or diagnostics.

◆ RestoreGeo()

void Smoothing::RestoreGeo ( Geometry & geo,
const Buffer< Vector< 3, fltp08 > > & verts,
GeometryPositionModRestore & restore,
const void * lock,
LogPtr log )
staticprotected

Restores geometry vertex positions and associated cached data after a smoothing operation.


Writes the provided vertex buffer back into the geometry and uses the restore object to recalculate any dependent data (e.g., bounds, normals) that was invalidated by position changes.

Parameters
[in]geoThe geometry to restore positions into.
[in]vertsThe buffer of vertex positions to write back.
[in]restoreThe restore object that tracks and recalculates position-dependent data.
[in]lockAn optional mutex or lock pointer used for thread-safe geometry access.
[in]logAn optional log for reporting progress or diagnostics.

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