NDEVR
API Documentation
DesignParameter.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: DesignParameter
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Model.h>
35#include <NDEVR/Geometry.h>
36#include <NDEVR/String.h>
37#include <NDEVR/Unit.h>
38#include <NDEVR/Material.h>
39namespace NDEVR
40{
41 struct Unit;
48 class NDEVR_DESIGN_API DesignParameter
49 {
50 public:
81 public:
85 uint04 dim_a = Constant<uint04>::Invalid;
86 uint04 dim_b = Constant<uint04>::Invalid;
89
92
96 explicit DesignParameter(NDPO property, uint04 sub_section = Constant<uint04>::Invalid);
97
101 explicit DesignParameter(NDPG property, uint04 sub_section = Constant<uint04>::Invalid);
102
106 explicit DesignParameter(NDPM property, uint04 sub_section = Constant<uint04>::Invalid);
107
111 explicit DesignParameter(NDPN property, uint04 sub_section = Constant<uint04>::Invalid);
112
116 explicit DesignParameter(VertexProperty property, uint04 sub_section = Constant<uint04>::Invalid);
117
121 explicit DesignParameter(SpecialParameter property, uint04 sub_section = Constant<uint04>::Invalid);
122
126 DesignParameter(SpecialParameter property, const StringView& data_label);
127
132 DesignParameter(SpecialParameter property, const StringView& data_label, uint04 sub_section);
133
137
140 explicit DesignParameter(const StringView& name);
141
146 DesignParameter(const StringView& column_name, uint04 vertex_index_a, uint04 vertex_index_b);
147
151
155
159
163
167
171 bool operator!=(const DesignParameter& params) const;
172
176 bool operator==(const DesignParameter& params) const;
177
181 bool operator<(const DesignParameter& params) const;
182
186 bool operator>(const DesignParameter& params) const;
187
190 bool isIgnored() const;
191 protected:
195 };
196
201 template<>
203 {
204
205 };
206}
207
208
209
210
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition Pointer.hpp:276
A definition of data that is logically stored in the Model hierarchy.
bool operator==(const DesignParameter &params) const
Equality comparison operator.
ConstPointer< Unit > defaultUnit() const
Returns the default unit of measurement for this parameter.
DesignParameter(NDPG property, uint04 sub_section=Constant< uint04 >::Invalid)
Constructs a parameter from a geometry property.
uint04 dim_a
First dimension index (e.g., component or sub-section). Invalid if unused.
TypeInfo defaultType() const
Returns the default type information for the data represented by this parameter.
DesignParameter(SpecialParameter property, const StringView &data_label)
Constructs a parameter from a special parameter type with a data label.
DesignParameter(NDPN property, uint04 sub_section=Constant< uint04 >::Invalid)
Constructs a parameter from a model property.
TranslatedString custom_display_name
An optional user-facing display name override.
bool operator>(const DesignParameter &params) const
Greater-than comparison operator for ordering.
TranslatedString displayName() const
Returns the user-facing display name for this parameter.
DesignParameter(NDPM property, uint04 sub_section=Constant< uint04 >::Invalid)
Constructs a parameter from a material property.
bool operator<(const DesignParameter &params) const
Less-than comparison operator for ordering.
DesignParameter(NDPO property, uint04 sub_section=Constant< uint04 >::Invalid)
Constructs a parameter from a design object property.
void setCustomDisplayName(const TranslatedString &custom_display_name)
Sets a custom user-facing display name for this parameter.
SpecialParameter type
The special parameter type classification.
bool isIgnored() const
Checks whether this parameter should be ignored during processing.
StringAllocatingView stringID() const
Returns a string identifier that uniquely represents this parameter.
DesignParameter()
Default constructor.
StringAllocatingView column_name
The column or property name used to identify this parameter in storage.
DesignParameter(Material::UVMode mode)
Constructs a parameter representing a UV texture mapping mode.
DesignParameter(VertexProperty property, uint04 sub_section=Constant< uint04 >::Invalid)
Constructs a parameter from a vertex property.
DesignParameter(const StringView &column_name, uint04 vertex_index_a, uint04 vertex_index_b)
Constructs a parameter referencing vertex data by column name and two vertex indices.
DesignParameter(SpecialParameter property, uint04 sub_section=Constant< uint04 >::Invalid)
Constructs a parameter from a special parameter type.
ConstPointer< Unit > unit
The unit of measurement associated with this parameter.
String default_value
The default value for this parameter as a string.
uint04 dim_b
Second dimension index. Invalid if unused.
void autoSetSpecialParameter()
Automatically determines and sets the SpecialParameter type based on the current column name and dime...
bool operator!=(const DesignParameter &params) const
Inequality comparison operator.
SpecialParameter
Enumerates special built-in parameter types that have predefined semantics within the design hierarch...
@ e_surface_area
Computed surface area.
@ e_volume
Computed volume.
@ e_undefined
No specific parameter type assigned.
@ e_transformed_vertex_metadata
Vertex metadata that has been transformed into world space.
@ e_rotation
Rotation of a model.
@ e_offset
Spatial offset (translation) of a model.
@ e_v_length
Computed vertical length component.
@ e_scale
Scale factor of a model.
@ e_geometry_property
A property belonging to a Geometry object.
@ e_parent_path
Path string describing the parent chain.
@ e_metadata
Arbitrary metadata attached to an object.
@ e_vertex_property
A property belonging to a Vertex.
@ e_model_property
A property belonging to a Model object.
@ e_model_index
Index of the model within the hierarchy.
@ e_vertex_index
Index of a vertex within geometry.
@ e_deployment_bottom
Bottom elevation of a deployment.
@ e_h_length
Computed horizontal length component.
@ e_geo_orientation
Geographic orientation of a model.
@ e_uv_mode
UV texture mapping mode.
@ e_length
Computed total length.
@ e_design_property
A generic design-level property.
@ e_material_property
A property belonging to a Material.
@ e_grade
Computed grade (slope ratio).
DesignParameter(const StringView &name)
Constructs a parameter from a raw column name string.
DesignParameter(SpecialParameter property, const StringView &data_label, uint04 sub_section)
Constructs a parameter from a special parameter type with a data label and sub-section.
UVMode
Defines UV mapping modes that control how texture colors are determined for surfaces.
Definition Material.h:185
This class is like a string view, but may optionally store the data internally Useful if the return t...
Definition String.h:1278
Logic for reading or writing to a string or a user friendly, TranslatedString.
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Stores information about a type, relevant for certain templated functions.
Definition TypeInfo.h:43
The primary namespace for the NDEVR SDK.
NDPM
NDPM - NDEVR Design Property Material: Values stored in the material database.
Definition Material.h:53
NDPN
NDPN - NDEVR Design Property Node: Values stored in the model database.
Definition Model.h:57
VertexProperty
Per-vertex data channels that can be stored in the vertex table to be used by Geometry.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
NDPO
NDPO - NDEVR Design Property Object: Values stored in the property database.
NDPG
Forward declaration for Geometry design object.
Definition Geometry.h:56
Defines a unit of measurement for converting and displaying data values.
Definition Unit.h:39