MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / FieldConfig

Class FieldConfig

openpgl/include/openpgl/cpp/FieldConfig.h:22–75  ·  view source on GitHub ↗

* @brief The configuration for used to initialize the guiding Field. * * This class contains and defines all parameters needed to initialize a guiding Field object. * These parameters contain the spatial structure or directional distribution types and the parameters * to set up their building (i.e, sub-division behavior) and training. */

Source from the content-addressed store, hash-verified

20 * to set up their building (i.e, sub-division behavior) and training.
21 */
22struct FieldConfig
23{
24 FieldConfig() = default;
25
26 ~FieldConfig() = default;
27
28 FieldConfig(const FieldConfig &) = delete;
29
30 /**
31 * @brief Initializes the field configurations by setting all default parameters for a given combination
32 * of spatial structure and directional distribution type and some additional parameters.
33 *
34 * @param spatialType The spatial structure type.
35 * @param directionalType The directional distribution type.
36 * @param deterministic If the training/updating of the field should be deterministic (default = true).
37 * @param maxSamplesPerLeaf The maximum number of samples per tree node (default = 32K).
38 */
39 void Init(const PGL_SPATIAL_STRUCTURE_TYPE spatialType, const PGL_DIRECTIONAL_DISTRIBUTION_TYPE directionalType, const bool deterministic = true,
40 const size_t maxSamplesPerLeaf = 32000);
41
42 /**
43 * @brief Sets the maximum depth of the tree structure (e.g., 16).
44 *
45 * @param maxDepth The maximum depth of the tree structure.
46 */
47 void SetSpatialStructureArgMaxDepth(const size_t maxDepth);
48
49 /**
50 * @brief Enables or disables K-nearest neighbor lookup when querying a guiding cache.
51 *
52 * @param useKnnLookup if KNN lookup should be used
53 */
54 void SetUseKnnLookup(const bool useKnnLookup);
55
56 /**
57 * @brief Enables or disables if selected neighbor from the KNN-lookup is imporatnce sampled based on the distance (i.e., using a Gaussian kernel).
58 *
59 * @param useKnnIsLookup if distance based importance sampling of the neighbors should be used
60 */
61 void SetUseKnnIsLookup(const bool useKnnIsLookup);
62
63 /**
64 * @brief For debugging and benchmarking the update of the spatial structure this function can disable
65 * the training of the directional distribution during the update iterations.
66 *
67 * @param fitRegions If the directional distributions should be trained during an update iteration.
68 */
69 void SetDebugArgFitRegions(const bool fitRegions);
70
71 friend struct openpgl::cpp::Field;
72
73 private:
74 PGLFieldArguments m_args;
75};
76
77////////////////////////////////////////////////////////////
78/// Implementation

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected