API Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
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"
37namespace NDEVR
38{
39 class Cloth;
40 /**--------------------------------------------------------------------------------------------------
41 \brief Contains parameters for performing a Cloth surfacing operation.
42 **/
43 struct CSFParams
44 {
45 // refer to the website:http://ramm.bnu.edu.cn/projects/CSF/ for the setting of these parameters
54 ProgressInfo* log = nullptr;
55 bool use_colors = false;
56 bool allow_steep_slopes = false;
57 bool fill_holes = false;
58 };
59 /**--------------------------------------------------------------------------------------------------
60 \brief Filters using the CSF logic for determining bare-earth.
61 **/
62 class CSFFilter final : public GeometryFilter, public GeometrySurfacing
63 {
64 public:
66 CSF_API bool runFilter(GeometryFilterParameters& parameters) override;
67 CSF_API bool runSurfacing(GeometrySurfacingParameters& parameters) override;
68 CSF_API bool runSurfacing(const CSFParams& parms, GeometrySurfacingParameters& parameters);
71 CSF_API static void ComputeNormals(GeometrySurfacingParameters& parameters, bool use_default_params = true);
72 protected:
73 Cloth runClothOperations(const CSFParams& params, const Bounds<3, fltp04>& bounds);
74 void setupParameters(CSFParams& param, const GenericOptionGroup& parameters);
75 void setupOptions(GenericOptionGroup& parameters, const CSFParams& params);
76 Cloth createCloth(const CSFParams& params, const Bounds<3, fltp04>& bounds) const;
77 };
78 /**--------------------------------------------------------------------------------------------------
79 \brief Filters data into a top and bottom half based on the CSF surfacing logic.
80 **/
81 class TwoSidedCSFFilter final : public GeometrySurfacing
82 {
83 public:
85 CSF_API bool runSurfacing(GeometrySurfacingParameters& parameters) override;
87 };
88}
#define CSF_API
Definition DLLInfo.h:50
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:52
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Filters using the CSF logic for determining bare-earth.
Definition CSF.h:63
bool runSurfacing(GeometrySurfacingParameters &parameters) override
bool runSurfacing(const CSFParams &parms, GeometrySurfacingParameters &parameters)
Buffer< SurfacingDescription > defaultSurfacingArguments() override
Buffer< FilterDescription > defaultFilterArguments() override
void setupParameters(CSFParams &param, const GenericOptionGroup &parameters)
void setupOptions(GenericOptionGroup &parameters, const CSFParams &params)
bool runFilter(GeometryFilterParameters &parameters) override
Cloth createCloth(const CSFParams &params, const Bounds< 3, fltp04 > &bounds) const
static void ComputeNormals(GeometrySurfacingParameters &parameters, bool use_default_params=true)
Cloth runClothOperations(const CSFParams &params, const Bounds< 3, fltp04 > &bounds)
The data and operations for performing bare earth using Cloth simulation.
Definition Cloth.h:69
Stores a groups of GenericOptions that can be used to group them.
Definition GenericOptions.h:151
A service that contains registered algorithms for removing vertices or shapes from a group of vertice...
Definition GeometryFilter.h:41
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Filters data into a top and bottom half based on the CSF surfacing logic.
Definition CSF.h:82
bool runSurfacing(GeometrySurfacingParameters &parameters) override
Buffer< SurfacingDescription > defaultSurfacingArguments() override
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Contains parameters for performing a Cloth surfacing operation.
Definition CSF.h:44
ProgressInfo * log
Definition CSF.h:54
fltp04 time_step
Definition CSF.h:49
fltp04 max_height_dev
Definition CSF.h:50
Buffer< bool > filtered
Definition CSF.h:48
bool fill_holes
Definition CSF.h:57
uint04 iterations
Definition CSF.h:53
fltp04 cloth_resolution
Definition CSF.h:51
uint04 rigidness
Definition CSF.h:52
Buffer< RGBColor > colors
Definition CSF.h:47
Buffer< Vertex< 3, fltp04 > > positions
Definition CSF.h:46
bool allow_steep_slopes
Definition CSF.h:56
bool use_colors
Definition CSF.h:55
Stores a groups of options for performing GeometryFilter operations.
Definition GeometryFilter.h:27