API Documentation
Loading...
Searching...
No Matches
CSF.h
Go to the documentation of this file.
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: NDEVR
28File: NDEVRPCH
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
36#include "NDEVRSurfacing/Headers/GeometrySurfacing.h"
37namespace NDEVR
38{
39 class Cloth;
40 struct Params
41 {
42 // refer to the website:http://ramm.bnu.edu.cn/projects/CSF/ for the setting of these parameters
51 ProgressInfo* log = nullptr;
52 bool use_colors = false;
53 bool allow_steep_slopes = false;
54 bool fill_holes = false;
55 };
56
57 class CSFFilter final : public GeometryFilter, public GeometrySurfacing
58 {
59 public:
61 CSF_API bool runFilter(GeometryFilterParameters& parameters) override;
62 CSF_API bool runSurfacing(GeometrySurfacingParameters& parameters) override;
63 CSF_API bool runSurfacing(const Params& parms, GeometrySurfacingParameters& parameters);
66 CSF_API static void ComputeNormals(GeometrySurfacingParameters& parameters, bool use_default_params = true);
67 protected:
68 Cloth runClothOperations(const Params& params, const Bounds<3, fltp04>& bounds);
69 void setupParameters(Params& param, const GenericOptionGroup& parameters);
70 void setupOptions(GenericOptionGroup& parameters, const Params& params);
71 Cloth createCloth(const Params& params, const Bounds<3, fltp04>& bounds) const;
72 };
73 class TwoSidedCSFFilter final : public GeometrySurfacing
74 {
75 public:
77 CSF_API bool runSurfacing(GeometrySurfacingParameters& parameters) override;
79 };
80}
#define CSF_API
Definition DLLInfo.h:67
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition CSF.h:58
CSF_API bool runSurfacing(GeometrySurfacingParameters &parameters) override
Definition CSF.cpp:47
CSF_API Buffer< SurfacingDescription > defaultSurfacingArguments() override
Definition CSF.cpp:109
CSF_API Buffer< FilterDescription > defaultFilterArguments() override
Definition CSF.cpp:100
void setupOptions(GenericOptionGroup &parameters, const Params &params)
Definition CSF.cpp:154
static CSF_API void ComputeNormals(GeometrySurfacingParameters &parameters, bool use_default_params=true)
Definition CSF.cpp:189
CSF_API CSFFilter()
Definition CSF.cpp:27
void setupParameters(Params &param, const GenericOptionGroup &parameters)
Definition CSF.cpp:259
CSF_API bool runFilter(GeometryFilterParameters &parameters) override
Definition CSF.cpp:33
Cloth createCloth(const Params &params, const Bounds< 3, fltp04 > &bounds) const
Definition CSF.cpp:270
Cloth runClothOperations(const Params &params, const Bounds< 3, fltp04 > &bounds)
Definition CSF.cpp:122
Definition Cloth.h:67
Definition GenericOptions.h:145
Definition GeometryFilter.h:29
Definition ProgressInfo.hpp:43
Definition CSF.h:74
CSF_API bool runSurfacing(GeometrySurfacingParameters &parameters) override
Definition CSF.cpp:293
CSF_API TwoSidedCSFFilter()
Definition CSF.cpp:289
CSF_API Buffer< SurfacingDescription > defaultSurfacingArguments() override
Definition CSF.cpp:302
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
Definition GeometryFilter.h:19
Definition CSF.h:41
ProgressInfo * log
Definition CSF.h:51
fltp04 time_step
Definition CSF.h:46
fltp04 max_height_dev
Definition CSF.h:47
Buffer< bool > filtered
Definition CSF.h:45
bool fill_holes
Definition CSF.h:54
uint04 iterations
Definition CSF.h:50
fltp04 cloth_resolution
Definition CSF.h:48
uint04 rigidness
Definition CSF.h:49
Buffer< RGBColor > colors
Definition CSF.h:44
Buffer< Vertex< 3, fltp04 > > positions
Definition CSF.h:43
bool allow_steep_slopes
Definition CSF.h:53
bool use_colors
Definition CSF.h:52