34#include <NDEVR/DesignParameter.h>
35#include <NDEVR/DesignObject.h>
36#include <NDEVR/ModelIterator.h>
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
The equivelent of std::vector but with a bit more control.
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
A low-level database object that can be used to access general stored properties within the NDEVR Mod...
fltp08 lower_std_dev
Standard deviation for values less than the average.
fltp08 total_value
The running sum of all accumulated values.
String default_value
Default value string used when a parameter is missing.
uint04 total_upper
Count of values greater than the average.
void clear()
Resets all accumulated statistics and collected data to their initial state.
fltp08 upper_variance
Variance for values greater than the average.
void setToDefaults(const DesignObject &object)
Initialises accumulator defaults from the given design object's properties.
uint04 min_digits
Minimum number of digits for string formatting.
uint04 min_num_of_decimals
Minimum number of decimal places for string formatting.
uint04 total_lower
Count of values less than the average.
bool is_vertex_index
Whether the parameter represents a vertex-level index property.
fltp08 lower_variance
Variance for values less than the average.
uint04 max_num_of_values
Maximum number of values to collect before stopping.
uint04 max_num_of_decimals
Maximum number of decimal places for string formatting.
void _parseAllModels() final override
Internal entry point that begins parsing all models in the hierarchy.
Buffer< StringAllocatingView > string_values
Collected string representations of parameter values (when e_get_strings is set).
Buffer< fltp08 > float_values
Collected raw floating-point values (when e_get_floats is set).
bool is_normal_prop
Whether the parameter is a standard built-in property.
void setCollectVerticesByPrimitive(PrimitiveProperty vertex_collection_primitive)
Configures vertex collection to gather vertices by the specified primitive property.
bool recursive_matrix
Whether to recursively compose parent transform matrices.
fltp08 upper_std_dev
Standard deviation for values greater than the average.
bool is_matrix_prop
Whether the parameter represents a matrix-type property.
ParseResult process(Model &model, Geometry &geo) final override
Processes a Geometry node associated with a Model during accumulation.
ParseResult process(Model &model) final override
Processes a single Model node during accumulation.
fltp08 average
The computed average value, or Invalid if not yet calculated.
bool add_commas
Whether to insert commas as thousands separators in formatted output.
uint04 total_count
Total number of values accumulated.
fltp08 max
The maximum value encountered during accumulation.
DesignObject::DesignObjectType m_design_type
The type of design object this accumulator targets.
bool use_defaults
Whether to use default_value when the parameter is absent from an object.
ParseResult process(Model &model, Material &mat) final override
Processes a Material node associated with a Model during accumulation.
void accumulate(const DesignObject &object, fltp08 known_avg=Constant< fltp08 >::Invalid)
Accumulates parameter data from a design object.
uint04 property_index
Cached column/property index for the current parameter lookup.
DesignParameterAccumulator(const DesignParameter &design_parameter, BitFlag mode=BitFlag(0))
Constructs a DesignParameterAccumulator for a specific parameter.
DesignParameter parameter
The design parameter being accumulated.
bool is_design_index
Whether the parameter represents a design-level index property.
DesignObject::DesignObjectType type()
Returns the DesignObjectType that this accumulator is targeting.
ParseResult postProcess(Model &m) final override
Post-processes a Model after its children have been visited, finalising statistics.
fltp08 total_value_c
Kahan summation compensation term for maintaining precision during accumulation.
AccumulateMode
Defines which statistical or data-collection operations to perform during accumulation.
@ e_get_average
Compute the average value.
@ e_get_strings
Collect parameter values as strings.
@ e_get_std_dev
Compute upper and lower standard deviation relative to the average.
@ e_get_total
Compute the total (sum) of all values.
@ e_get_indices
Collect the row/object indices of matched parameters.
@ e_get_variance
Compute upper and lower variance relative to the average.
@ e_get_max_min
Collect the maximum and minimum values.
@ e_get_floats
Collect raw floating-point parameter values.
fltp08 min
The minimum value encountered during accumulation.
void accumulate(fltp08 value, const uint01 &dim=X, bool to_unit=true)
Accumulates a single floating-point value into the running statistics.
StringAllocatingView string_cache
Temporary string buffer used during value formatting.
bool include_unit_symbols
Whether to append unit symbols (e.g., "m", "ft") in formatted string output.
BitFlag accumulate_mode
Bitmask of AccumulateMode flags controlling which statistics to collect.
PrimitiveProperty m_vertex_collection_primitive
The primitive property used to group vertices during collection.
bool is_special_field
Whether the parameter requires special handling (e.g., computed fields).
void addToTotal(fltp08 value)
Adds a value directly to the running total without updating other statistics.
Buffer< uint04 > indices
Collected row or object indices (when e_get_indices is set).
ConstPointer< Unit > override_unit
Optional unit override for value conversion. Null uses the parameter's default unit.
Matrix< fltp08 > transform
The current transformation matrix applied during accumulation.
Searches a model hierarchy and pulls a list of available parameters along with the count for how many...
ParseResult process(Model &model, Material &mat) final override
Processes a Material node associated with a Model during iteration.
ParseResult process(Model &model) final override
Processes a single Model node during iteration, collecting its parameters.
Dictionary< String, uint04 > parameter_count
Maps each parameter name to the number of occurrences found.
void _parseAllModels() final override
Internal entry point that begins parsing all models in the hierarchy.
ParseResult process(Model &model, Geometry &geo) final override
Processes a Geometry node associated with a Model during iteration.
Buffer< DesignParameter > parameters
The collected list of unique design parameters found.
void addParameter(const StringView ¶meter)
Manually adds a parameter by name to the finder's collection.
bool is_design_index
Whether the parameter represents a design-level index property.
DesignObject::DesignObjectType m_design_type
The type of design object this setter targets.
String default_value
Default value string used when no explicit value is provided.
fltp08 total_value_c
Kahan summation compensation term for maintaining precision.
bool is_normal_prop
Whether the parameter is a standard built-in property.
Matrix< fltp08 > transform
The current transformation matrix applied during setting.
DesignParameterSetter(const DesignParameter &design_parameter, SetMode mode)
Constructs a DesignParameterSetter for a specific parameter and set mode.
DesignParameter parameter
The design parameter being set.
ParseResult process(DesignObject &object)
Sets the parameter value on a generic DesignObject.
ParseResult process(Model &model, Material &mat) final override
Processes a Material node associated with a Model during iteration.
Buffer< uint04 > indices
Indices specifying which rows or objects to target.
bool swap_result
Whether to swap byte order of the result value.
bool is_matrix_prop
Whether the parameter represents a matrix-type property.
void setToDefaults(const DesignObject &object)
Initialises setter defaults from the given design object's properties.
SetMode
Defines the mode used when setting parameter values.
@ e_set_from_strings
Set parameter values by parsing from string representations.
Buffer< String > string_values
The string values to apply, one per object or vertex.
uint04 set_offset
Current offset into string_values or float_values during iteration.
Buffer< fltp08 > float_values
Floating-point values to apply when not using string mode.
bool is_vertex_index
Whether the parameter represents a vertex-level index property.
bool recursive
Whether to recurse into child models.
uint04 property_index
Cached column/property index for the current parameter lookup.
uint04 total_count
Total number of values that have been set so far.
bool recursive_matrix
Whether to recursively compose parent transform matrices.
bool use_defaults
Whether to apply default_value when the parameter is absent.
bool is_special_field
Whether the parameter requires special handling (e.g., computed fields).
ParseResult process(Material &mat)
Sets the parameter value on a Material.
ParseResult process(Model &model) final override
Processes a single Model node, setting its parameter value.
ParseResult process(Geometry &geo)
Sets the parameter value on a Geometry.
ParseResult process(Model &model, Geometry &geo) final override
Processes a Geometry node associated with a Model during iteration.
uint04 max_num_of_values
Maximum number of values to set before stopping.
SetMode set_mode
The current mode controlling how values are interpreted.
A definition of data that is logically stored in the Model hierarchy.
A hash-based key-value store, useful for quick associative lookups.
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Templated logic for doing matrix multiplication.
ParseResult
The result returned by process functions to control iteration flow.
ModelIterator()
Default constructor.
A core class that represents a node on model hierarchy.
This class is like a string view, but may optionally store the data internally Useful if the return t...
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
PrimitiveProperty
Describes which rendering property a primitive index buffer corresponds to.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Defines a unit of measurement for converting and displaying data values.