NDEVR
API Documentation
Smoothing.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Design
28File: Smoothing
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/Geometry.h>
34namespace NDEVR
35{
36 class InfoPipe;
37
47 {
48 public:
54 static void ClearSmoothing(Geometry& geo, const Geometry::SmoothingParameters& smoothing_parameters);
55
64 static void LaplacianSmoothing(Geometry& geo, const Geometry::SmoothingParameters& smoothing_parameters);
65
74 static void CotangentLaplacianSmoothing(Geometry& geo, const Geometry::SmoothingParameters& smoothing_parameters);
75
84 static void NormalSmoothing(Geometry& geo, NormalMode normal_mode, const Angle<fltp08>& max_smooth_angle, const void* lock, LogPtr log);
85 protected:
97 static void RestoreGeo(Geometry& geo, const Buffer<Vector<3, fltp08>>& verts, GeometryPositionModRestore& restore, const void* lock, LogPtr log);
98 };
99}
100
101
102
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Class to easily restore calculated data in a Geometry after a location altering process.
Definition Geometry.h:2851
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:143
A light-weight base class for Log that allows processes to update, without the need for additional in...
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
Forward declaration of InfoPipe for progress/logging support.
Definition Smoothing.h:47
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 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 ClearSmoothing(Geometry &geo, const Geometry::SmoothingParameters &smoothing_parameters)
Removes any previously applied smoothing from a geometry, restoring original vertex positions.
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.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
NormalMode
Describes how surface normals are computed or stored for a Geometry object.
@ normal_mode
Normal calculation mode (smooth, no normal, or hard).
Definition Geometry.h:70
Parameters controlling mesh smoothing operations.
Definition Geometry.h:401