![]() |
NDEVR
API Documentation
|
A low-level database object that can be used to access general stored properties within the NDEVR Model hierarchy or 3D environment. More...
Public Member Functions | |
| DesignObject ()=default | |
| Creates an "invalid" design object. | |
| DesignObject (const DesignInfo &info) | |
| Constructs a DesignObject from an existing DesignInfo, sharing the same base and indices. | |
| DesignObject (DesignObjectBase *base) | |
| Creates an new design object within the given DesignObjectBase. | |
| DesignObject (uint04 index, DesignObjectBase *base) | |
| Sets a DesignObject up to be a pointer to an existing object in the database. | |
| JSONNode | activeFilters () const |
| Retrieves the active filters applied to this design object as a JSON structure. | |
| void | appendData (const StringView &data, bool compressed) |
| Appends data to this design object's data storage. | |
| DesignObjectBase & | base () const |
| Returns a reference to the underlying DesignObjectBase database. | |
| void | clearAllMetaData () |
| Removes all metadata entries from this design object. | |
| void | clearMetaData (const StringView &index) |
| Removes a specific metadata entry by key. | |
| void | copyFrom (const DesignObject &object) |
| Copies all properties from the given design object into this one. | |
| uint04 | designIndex () const |
| Returns the design-specific index used to access type-specific properties (e.g., model, geometry, material properties). | |
| bool | doesPropertyBeginWith (NDPO property, const StringView &value, bool ignore_case) const |
| Checks whether a string property's value begins with the given substring. | |
| bool | doesPropertyContain (NDPO property, const StringView &value, bool ignore_case) const |
| Checks whether a string property's value contains the given substring. | |
| File | file () const |
| Returns the file path associated with this design object as a File object. | |
| template<auto t_property> | |
| constexpr decltype(auto) | get () const |
| Retrieves a property value using a compile-time property constant, with the type deduced from PropertySpec. | |
| template<auto t_property, class t_type> | |
| constexpr decltype(auto) | get () const |
| Retrieves a property value using a compile-time property constant, cast to the requested type. | |
| template<class t_type, class t_property_type> | |
| constexpr decltype(auto) | get (t_property_type property) const |
| Retrieves a property value from the database, cast to the requested type. | |
| DesignObject | getDesignParent () const |
| Retrieves the parent design object of this object in the model hierarchy. | |
| StringView | getIcon () const |
| Retrieves the icon identifier string associated with this design object. | |
| template<class t_type> | |
| decltype(auto) | getInheritedProperty (NDPO property) const |
| Retrieves a property value, walking up the parent hierarchy if the property is not set on this object. | |
| Scene | getScene () const |
| Retrieves the Scene that this design object belongs to. | |
| bool | hasMetaData (const StringView &index) const |
| Checks whether a metadata entry exists for the given key. | |
| template<class t_type, class t_design_type> | |
| bool | hasProperty (t_design_type property) const |
| Checks whether a property has a valid (non-default) value. | |
| uint04 | index () const |
| Returns the primary row index of this object within the DesignObjectBase property table. | |
| template<auto t_property> | |
| bool | is (const char *value) const |
| Checks whether a compile-time property matches the given C-string value. | |
| template<auto t_property> | |
| bool | is (const String &value) const |
| Checks whether a compile-time property matches the given String value. | |
| template<auto t_property> | |
| bool | is (const StringView &value) const |
| Checks whether a compile-time property matches the given StringView value. | |
| template<auto t_property, class t_type> | |
| std::enable_if<!ObjectInfo< t_type >::String, bool >::type | is (const t_type &value) const |
| Checks whether a compile-time property matches a non-string value using equality comparison. | |
| template<class t_property_type> | |
| bool | is (t_property_type property, const char *value) const |
| Checks whether a string property matches the given C-string value. | |
| template<class t_property_type> | |
| bool | is (t_property_type property, const String &value) const |
| Checks whether a string property matches the given String value. | |
| template<class t_property_type> | |
| bool | is (t_property_type property, const StringView &value) const |
| Checks whether a string property matches the given StringView value. | |
| template<class t_property_type, class t_type> | |
| std::enable_if<!ObjectInfo< t_type >::String, bool >::type | is (t_property_type property, const t_type &value) const |
| Checks whether a non-string property matches the given value using equality comparison. | |
| bool | isDesignType (DesignObjectType mode) const |
| Checks whether this object has the specified design type flag set. | |
| bool | isDesignType (uint04 mode) const |
| Checks whether this object has the specified design type flag set, using a raw integer value. | |
| bool | isValid () const |
| Checks whether this design object has a valid index into the database. | |
| const JSONNode & | metaData () const |
| Retrieves the entire metadata tree for this design object. | |
| const JSONNode & | metaData (const StringView &index) const |
| Retrieves a specific metadata entry by key. | |
| void | offsetDesign (const Vector< 3, fltp08 > &offset) |
| Translates this design object by the given offset vector. | |
| operator bool () const | |
| Bool conversion operator. | |
| bool | operator!= (const DesignObject &object) const |
| Checks inequality with another DesignObject. | |
| bool | operator< (const DesignObject &object) const |
| Less-than comparison for ordering DesignObjects (e.g., for sorted containers). | |
| bool | operator== (const DesignObject &object) const |
| Checks equality with another DesignObject by comparing base pointers and indices. | |
| bool | operator> (const DesignObject &object) const |
| Greater-than comparison for ordering DesignObjects (e.g., for sorted containers). | |
| Table & | propertyTable () |
| Returns a mutable reference to the property table that stores this object's properties. | |
| const Table & | propertyTable () const |
| Returns a const reference to the property table that stores this object's properties. | |
| void | removeMetaData (const StringView &index, const void *lock_ptr=nullptr) |
| Removes a metadata entry by key, with optional write lock support. | |
| void | scale (Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale, const Matrix< fltp08 > &transform) |
| Scales this design object's geometry by the given scale factors around a center point, applying an additional transform. | |
| void | scale (Vector< 3, fltp08 > scale, Vertex< 3, fltp08 > center_of_scale=Constant< Vertex< 3, fltp08 > >::Invalid) |
| Scales this design object's geometry and transform by the given scale factors around a center point. | |
| template<auto t_property, class t_type> | |
| void | set (const t_type &value) |
| Sets a property value in the database using a compile-time property constant. | |
| template<class t_type, class t_property_type> | |
| void | set (t_property_type property, const t_type &value) |
| Sets a property value in the database. | |
| void | setActiveFilters (const JSONNode &node) |
| Sets the active filters on this design object from a JSON structure. | |
| void | setDesignType (DesignObjectType mode, bool is_type) |
| Sets or clears a design type flag on this object. | |
| void | setMetaData (const JSONNode &node) |
| Replaces the entire metadata tree with the given JSON node. | |
| void | setMetaData (const StringView &index, const bool &data) |
| Sets a metadata entry at the given key to a boolean value. | |
| void | setMetaData (const StringView &index, const fltp08 &data) |
| Sets a metadata entry at the given key to a 64-bit floating point value. | |
| void | setMetaData (const StringView &index, const JSONNode &node) |
| Sets a metadata entry at the given key to the specified JSON node value. | |
| void | setMetaData (const StringView &index, const String &data) |
| Sets a metadata entry at the given key to a String value. | |
| void | setMetaData (const StringView &index, const StringView &data) |
| Sets a metadata entry at the given key to a StringView value. | |
| void | setMetaData (const StringView &index, const uint01 &data) |
| Sets a metadata entry at the given key to a uint01 value. | |
| void | setMetaData (const StringView &index, const uint04 &data) |
| Sets a metadata entry at the given key to a uint04 value. | |
| template<auto t_property, class t_type> | |
| bool | update (const t_type &value, const void *lock=nullptr) |
| Updates a property using a compile-time property constant, only if the new value differs. | |
| template<class t_type, class t_property_type> | |
| bool | update (t_property_type property, const t_type &value, const void *lock=nullptr) |
| Updates a property only if the new value differs from the current value. | |
| void | updateCreatedTime () |
| Sets the creation time stamp for this design object to the current system time. | |
| void | updateDesignModifiedTime (Time time=Time::SystemTime()) |
| Updates the modified time stamp for this design object. | |
| void | updateDesignTransform (const Matrix< fltp08 > &transform, const void *lock=nullptr) |
| Updates the transform of this design object if it differs from the current value. | |
| bool | updateDesignVisible (bool is_visible, const void *lock=nullptr) |
| Updates the spatial visibility of this design object if it differs from the current value. | |
| void | updateMetaData (const StringView &index, const bool &data, const void *lock_ptr=nullptr) |
| Updates a metadata entry only if the new value differs from the current value. | |
| void | updateMetaData (const StringView &index, const fltp08 &data, const void *lock_ptr=nullptr) |
| Updates a metadata entry only if the new value differs from the current value. | |
| void | updateMetaData (const StringView &index, const String &data, const void *lock_ptr=nullptr) |
| Updates a metadata entry only if the new value differs from the current value. | |
| void | updateMetaData (const StringView &index, const StringView &data, const void *lock_ptr=nullptr) |
| Updates a metadata entry only if the new value differs from the current value. | |
| bool | validateDesignObject () const |
| Validates the internal state of this design object, ensuring indices and base pointer are consistent. | |
Static Public Member Functions | |
| static constexpr StringView | FilePathDesignNameVariable () |
| Returns the placeholder variable string used in file paths to represent the design name. | |
Protected Member Functions | |
| template<class t_type> | |
| void | _setProperty (NDPO property, const t_type &value) |
| Low-level property setter that directly writes to the design properties table without triggering side effects such as transform or visibility updates. | |
| void | initDesignObject () |
| Initializes default property values for this design object after construction. | |
| Protected Member Functions inherited from DesignInfo | |
| DesignInfo (DesignObjectBase *base) | |
| Creates an new design object within the given DesignObjectBase. | |
| DesignInfo (uint04 index, DesignObjectBase *base) | |
| Sets a DesignObject up to be a pointer to an existing object in the database. | |
| void | _setDesignVisible (bool is_visible) |
| Sets the spatial visibility of this design object and propagates the change through the design hierarchy. | |
| void | _setTransform (const Matrix< fltp08 > &transform) |
| Sets the 4x4 transform matrix for this design object and propagates the change through the design hierarchy. | |
Additional Inherited Members | |
| Public Types inherited from DesignInfo | |
| enum | DesignObjectType : uint01 |
| Protected Attributes inherited from DesignInfo | |
| DesignObjectBase * | m_base = nullptr |
| Pointer to the owning DesignObjectBase property database. | |
| uint04 | m_design_index = Constant<uint04>::Invalid |
| Index of the parent design that owns this object. | |
| uint04 | m_index = Constant<uint04>::Invalid |
| Row index of this object within the property database. | |
A low-level database object that can be used to access general stored properties within the NDEVR Model hierarchy or 3D environment.
Can represent a geometry, model, material, bone, or effect. The object itself can be thought of as pointer to an entity in the database, and in general its destruction, will have no impact on the database itself.
This object stores a pointer to a DesignObjectBase object which is the database containing all properties which are retrieved via an index (for general properties) or a design index, for properties specific to models, geometries, etc
Date: 2018-03-22
Definition at line 73 of file DesignObject.h.
|
default |
Creates an "invalid" design object.
This object does not have a backing database, and all indices will be Invalid. Checking properties on this object is not permitted but you may use the '=' to set this model to a different model.
Author: Tyler Parke
Date: 2018-03-22
Referenced by Effect::Effect(), Geometry::Geometry(), Material::Material(), Effect::addTarget(), Effect::addTarget(), copyFrom(), getDesignParent(), getInheritedProperty(), Effect::getTarget(), operator!=(), operator<(), operator==(), operator>(), and Effect::setTarget().
|
explicit |
Creates an new design object within the given DesignObjectBase.
This object is appended to the end of the DesignObjectBase data structure and values are setup to defaults.
Author: Tyler Parke
Date: 2018-03-22
References base().
| DesignObject::DesignObject | ( | uint04 | index, |
| DesignObjectBase * | base ) |
Sets a DesignObject up to be a pointer to an existing object in the database.
If the index is invalid behavior is undefined.
Author: Tyler Parke
Date: 2018-03-22
| DesignObject::DesignObject | ( | const DesignInfo & | info | ) |
Constructs a DesignObject from an existing DesignInfo, sharing the same base and indices.
| [in] | info | The DesignInfo to copy base pointer and index information from. |
|
inlineprotected |
Low-level property setter that directly writes to the design properties table without triggering side effects such as transform or visibility updates.
| t_type | The type of the value to set. |
| [in] | property | The NDPO property to set. |
| [in] | value | The value to assign. |
Definition at line 730 of file DesignObject.h.
References DesignInfo::m_base, and DesignInfo::m_index.
| JSONNode DesignObject::activeFilters | ( | ) | const |
Retrieves the active filters applied to this design object as a JSON structure.
| void DesignObject::appendData | ( | const StringView & | data, |
| bool | compressed ) |
Appends data to this design object's data storage.
| [in] | data | The data string to append. |
| [in] | compressed | Whether the data should be stored in compressed form. |
|
inlinenodiscard |
Returns a reference to the underlying DesignObjectBase database.
Definition at line 682 of file DesignObject.h.
References DesignInfo::m_base.
Referenced by DesignObject(), DesignObject(), Geometry::Geometry(), Geometry::Geometry(), Model::Model(), Model::Model(), Scene::Scene(), Scene::Scene(), Scene::Scene(), Scene::Scene(), Scene::Scene(), and Model::setChildApplicationConstructed().
| void DesignObject::clearAllMetaData | ( | ) |
Removes all metadata entries from this design object.
Referenced by DesignObjectResourceCache::setModelToDefaults().
| void DesignObject::clearMetaData | ( | const StringView & | index | ) |
| void DesignObject::copyFrom | ( | const DesignObject & | object | ) |
Copies all properties from the given design object into this one.
| [in] | object | The source DesignObject to copy properties from. |
References DesignObject().
|
inline |
Returns the design-specific index used to access type-specific properties (e.g., model, geometry, material properties).
Definition at line 631 of file DesignObject.h.
References DesignInfo::m_design_index.
|
inlinenodiscard |
Checks whether a string property's value begins with the given substring.
| [in] | property | The NDPO property to check. |
| [in] | value | The prefix substring to search for. |
| [in] | ignore_case | Whether to perform a case-insensitive comparison. |
Definition at line 388 of file DesignObject.h.
References index(), and DesignInfo::m_base.
|
inlinenodiscard |
Checks whether a string property's value contains the given substring.
| [in] | property | The NDPO property to check. |
| [in] | value | The substring to search for. |
| [in] | ignore_case | Whether to perform a case-insensitive comparison. |
Definition at line 400 of file DesignObject.h.
References index(), and DesignInfo::m_base.
|
inlinenodiscard |
Returns the file path associated with this design object as a File object.
Definition at line 432 of file DesignObject.h.
Referenced by Scene::Scene(), Scene::Scene(), MadgwickSimulator::readFile(), BuildActionDefinition::readFromLogFile(), GPSSensor::requestUseFile(), and MadgwickSimulator::saveStats().
|
inlinestaticnodiscardconstexpr |
Returns the placeholder variable string used in file paths to represent the design name.
Definition at line 715 of file DesignObject.h.
|
inlinenodiscardconstexpr |
Retrieves a property value using a compile-time property constant, with the type deduced from PropertySpec.
| t_property | The compile-time property constant whose type is deduced via PropertySpec. |
Definition at line 186 of file DesignObject.h.
|
inlinenodiscardconstexpr |
Retrieves a property value using a compile-time property constant, cast to the requested type.
| t_property | The compile-time property constant. |
| t_type | The type to retrieve the property as. |
Definition at line 173 of file DesignObject.h.
Referenced by Customer::firstName(), SpeedLimit::getSpeedLimit(), StreetName::getStreet(), SurfaceType::getSurface(), SurfaceCondition::getSurfaceCondition(), CustomerJob::isActive(), Password::password(), and Customer::surname().
|
inlinenodiscardconstexpr |
Retrieves a property value from the database, cast to the requested type.
| t_type | The type to retrieve the property as. |
| t_property_type | The property enum type (e.g., NDPO, NDPOC). |
| [in] | property | The property identifier to retrieve. |
Definition at line 161 of file DesignObject.h.
Referenced by Customer::Customer(), CustomerDevice::CustomerDevice(), CustomerJob::CustomerJob(), Password::Password(), SetPropertiesCommand::add(), SetPropertiesCommand::add(), SetPropertiesCommand::add(), CheckoutCode::AddAndShow(), ModelChooserCombo::canAddModel(), BuildActionProgramLogic::createButton(), NewModelCommand::execute(), SetLayerCommand::execute(), VisibleCommand::execute(), BuildActionProgramLogic::executeMenuItems(), Extruder::ExtrudePolylineAlongGeo(), Extruder::ExtrudeRealThickness(), file(), getInheritedProperty(), hasProperty(), ModelTileTable::init(), is(), is(), DesignObjectOrientation::modelUpdatedSlot(), DesignObjectOrientation::orientationEditedSlot(), TransitIncidentManager::readCache(), MaterialPropertySlider::refreshFromMaterial(), DesignObjectComboWidget::sendCommand(), DesignObjectToggleWidget::sendCommand(), and BuildActionProgramLogic::setupUI().
|
nodiscard |
Retrieves the parent design object of this object in the model hierarchy.
References DesignObject().
Referenced by getInheritedProperty().
|
nodiscard |
Retrieves the icon identifier string associated with this design object.
Referenced by BuildActionProgramLogic::createButton().
|
inlinenodiscard |
Retrieves a property value, walking up the parent hierarchy if the property is not set on this object.
If no ancestor has the property set, returns the (invalid) value from this object.
| t_type | The type to retrieve the property as. |
| [in] | property | The NDPO property to retrieve. |
Definition at line 413 of file DesignObject.h.
References DesignObject(), get(), getDesignParent(), hasProperty(), and isValid().
|
nodiscard |
Retrieves the Scene that this design object belongs to.
Referenced by SetLayerCommand::execute().
| bool DesignObject::hasMetaData | ( | const StringView & | index | ) | const |
Checks whether a metadata entry exists for the given key.
| [in] | index | The metadata key to look up. |
References index().
Referenced by Customer::company(), Customer::email(), DesignObjectComboWidget::onObjectUpdatedSlot(), and DesignObjectToggleWidget::onObjectUpdatedSlot().
|
inlinenodiscard |
Checks whether a property has a valid (non-default) value.
| t_type | The type to retrieve the property as for validation. |
| t_design_type | The property enum type. |
| [in] | property | The property identifier to check. |
Definition at line 271 of file DesignObject.h.
References get(), and IsValid().
Referenced by getInheritedProperty().
|
inline |
Returns the primary row index of this object within the DesignObjectBase property table.
Definition at line 624 of file DesignObject.h.
References DesignInfo::m_index.
Referenced by DesignObject(), Effect::Effect(), Geometry::Geometry(), Material::Material(), Model::Model(), RealSenseScannerConnection::RealSenseScannerConnection(), Effect::addTarget(), OptechScannerPositionSensor::calculateAndRemoveSegment(), clearMetaData(), Model::copyMaterialProperties(), doesPropertyBeginWith(), doesPropertyContain(), Geometry::faceCenter(), Geometry::faceEdges(), Model::getEffect(), Model::getFamilyMember(), Geometry::getParent(), Geometry::getParents(), Model::getSceneGeometry(), Model::getSceneMaterial(), Material::hasActiveUVImage(), Model::hasEffect(), hasMetaData(), Material::hasUVColor(), Material::hasUVIntensity(), Material::hasUVLayer(), metaData(), Effect::operator!=(), Effect::operator==(), Geometry::OptimizedGetPrimitiveVec(), Geometry::OptimizedSetPrimitive(), Geometry::OptimizedSetPrimitiveVec(), Geometry::polygons(), Geometry::polylines(), Geometry::primitive(), Geometry::primitive(), Geometry::primitive(), LocationOperations::prismLocation(), PositionSensor::removeDeploymentSegment(), removeMetaData(), Effect::removeTarget(), Model::restoreModel(), LocationOperations::setActivePrismIndex(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), setMetaData(), Geometry::setPrimitive(), Geometry::setPrimitive(), Geometry::setPrimitive(), Geometry::setPrimitive(), Geometry::setPrimitiveVec(), LocationOperations::setPrismLocation(), Effect::setTarget(), Geometry::setVertex(), Geometry::setVertex(), Geometry::setVertexProperty(), Geometry::setVertexProperty(), Geometry::setVertexProperty(), Geometry::setVertexProperty(), updateMetaData(), updateMetaData(), updateMetaData(), updateMetaData(), Geometry::updateVertexColumn(), Geometry::updateVertexColumn(), Geometry::updateVertexColumn(), Geometry::updateVertexColumns(), and Geometry::vertex().
|
protected |
Initializes default property values for this design object after construction.
|
inlinenodiscard |
Checks whether a compile-time property matches the given C-string value.
| t_property | The compile-time property constant. |
| [in] | value | The C-string value to compare against. |
Definition at line 349 of file DesignObject.h.
References PropertyInterface< t_property_enum >::IsSame().
|
inlinenodiscard |
Checks whether a compile-time property matches the given String value.
| t_property | The compile-time property constant. |
| [in] | value | The String value to compare against. |
Definition at line 362 of file DesignObject.h.
References PropertyInterface< t_property_enum >::IsSame().
|
inlinenodiscard |
Checks whether a compile-time property matches the given StringView value.
| t_property | The compile-time property constant. |
| [in] | value | The StringView value to compare against. |
Definition at line 336 of file DesignObject.h.
References PropertyInterface< t_property_enum >::IsSame().
|
inlinenodiscard |
Checks whether a compile-time property matches a non-string value using equality comparison.
| t_property | The compile-time property constant. |
| t_type | The value type (must not be a string type). |
| [in] | value | The value to compare against. |
Definition at line 376 of file DesignObject.h.
References get().
|
inlinenodiscard |
Checks whether a string property matches the given C-string value.
| t_property_type | The property enum type. |
| [in] | property | The property identifier to compare. |
| [in] | value | The C-string value to compare against. |
Definition at line 297 of file DesignObject.h.
References PropertyInterface< t_property_enum >::IsSame().
|
inlinenodiscard |
Checks whether a string property matches the given String value.
| t_property_type | The property enum type. |
| [in] | property | The property identifier to compare. |
| [in] | value | The String value to compare against. |
Definition at line 310 of file DesignObject.h.
References PropertyInterface< t_property_enum >::IsSame().
|
inlinenodiscard |
Checks whether a string property matches the given StringView value.
| t_property_type | The property enum type. |
| [in] | property | The property identifier to compare. |
| [in] | value | The StringView value to compare against. |
Definition at line 284 of file DesignObject.h.
References PropertyInterface< t_property_enum >::IsSame().
Referenced by SpeedLimit::SpeedLimit(), StreetInfo::StreetInfo(), StreetName::StreetName(), SurfaceCondition::SurfaceCondition(), SurfaceType::SurfaceType(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), ModelTileTable::init(), Model::isType(), BuildActionProgramLogic::setupModel(), update(), and update().
|
inlinenodiscard |
Checks whether a non-string property matches the given value using equality comparison.
| t_property_type | The property enum type. |
| t_type | The value type (must not be a string type). |
| [in] | property | The property identifier to compare. |
| [in] | value | The value to compare against. |
Definition at line 324 of file DesignObject.h.
References get().
| bool DesignObject::isDesignType | ( | DesignObjectType | mode | ) | const |
Checks whether this object has the specified design type flag set.
| [in] | mode | The DesignObjectType to check. |
| bool DesignObject::isDesignType | ( | uint04 | mode | ) | const |
Checks whether this object has the specified design type flag set, using a raw integer value.
| [in] | mode | The design type flag as a raw integer. |
|
inlinenodiscard |
Checks whether this design object has a valid index into the database.
Definition at line 703 of file DesignObject.h.
References IsValid(), and DesignInfo::m_index.
Referenced by BuildActionProgramLogic::addMenuItems(), SetLayerCommand::execute(), SetTextValue::execute(), VisibleCommand::execute(), BuildActionProgramLogic::executeMenuItems(), FactoryModelFilters::FilterGeometryModels(), FactoryModelFilters::FilterGeometryModels(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), FactoryModelFilters::FilterTypeModels(), getInheritedProperty(), ModelTileTable::init(), operator bool(), Model::operator bool(), Geometry::operator!=(), Geometry::operator==(), MaterialPropertySlider::refreshFromMaterial(), TransitIncidentManager::setActiveBus(), and DesignObjectResourceCache::setModelToDefaults().
|
nodiscard |
Retrieves the entire metadata tree for this design object.
Referenced by Customer::company(), Customer::email(), CustomerDevice::osName(), and CustomerDevice::serialNumber().
|
nodiscard |
Translates this design object by the given offset vector.
| [in] | offset | The 3D offset vector to apply. |
|
inline |
Bool conversion operator.
Returns true if this design object is valid.
Definition at line 676 of file DesignObject.h.
References isValid().
| bool DesignObject::operator!= | ( | const DesignObject & | object | ) | const |
Checks inequality with another DesignObject.
| [in] | object | The DesignObject to compare against. |
References DesignObject().
| bool DesignObject::operator< | ( | const DesignObject & | object | ) | const |
Less-than comparison for ordering DesignObjects (e.g., for sorted containers).
| [in] | object | The DesignObject to compare against. |
References DesignObject().
| bool DesignObject::operator== | ( | const DesignObject & | object | ) | const |
Checks equality with another DesignObject by comparing base pointers and indices.
| [in] | object | The DesignObject to compare against. |
References DesignObject().
| bool DesignObject::operator> | ( | const DesignObject & | object | ) | const |
Greater-than comparison for ordering DesignObjects (e.g., for sorted containers).
| [in] | object | The DesignObject to compare against. |
References DesignObject().
|
nodiscard |
Returns a mutable reference to the property table that stores this object's properties.
|
nodiscard |
Returns a const reference to the property table that stores this object's properties.
| void DesignObject::removeMetaData | ( | const StringView & | index, |
| const void * | lock_ptr = nullptr ) |
| void DesignObject::scale | ( | Vector< 3, fltp08 > | scale, |
| Vertex< 3, fltp08 > | center_of_scale, | ||
| const Matrix< fltp08 > & | transform ) |
Scales this design object's geometry by the given scale factors around a center point, applying an additional transform.
| [in] | scale | The scale factors along each axis. |
| [in] | center_of_scale | The center point for scaling. |
| [in] | transform | An additional transformation matrix to apply during scaling. |
References scale().
| void DesignObject::scale | ( | Vector< 3, fltp08 > | scale, |
| Vertex< 3, fltp08 > | center_of_scale = Constant< Vertex< 3, fltp08 > >::Invalid ) |
Scales this design object's geometry and transform by the given scale factors around a center point.
| [in] | scale | The scale factors along each axis. |
| [in] | center_of_scale | The center point for scaling. Defaults to Invalid (uses object's own center). |
References scale().
Referenced by Model::calculateSmoothTextures(), scale(), and scale().
|
inline |
Sets a property value in the database using a compile-time property constant.
| t_property | The compile-time property constant. |
| t_type | The type of the value to set. |
| [in] | value | The value to assign to the property. |
Definition at line 212 of file DesignObject.h.
|
inline |
Sets a property value in the database.
| t_type | The type of the value to set. |
| t_property_type | The property enum type (e.g., NDPO, NDPOC). |
| [in] | property | The property identifier to set. |
| [in] | value | The value to assign to the property. |
Definition at line 200 of file DesignObject.h.
References PropertyInterface< t_property_enum >::Set().
Referenced by Customer::Customer(), CustomerDevice::CustomerDevice(), CustomerJob::CustomerJob(), Password::Password(), RealSenseMotor::RealSenseMotor(), SpeedLimit::SpeedLimit(), StreetInfo::StreetInfo(), StreetName::StreetName(), SurfaceCondition::SurfaceCondition(), SurfaceType::SurfaceType(), CheckoutCode::CheckoutAPI(), CheckoutCode::CheckoutSource(), TransitIncidentManager::createAddressRoot(), TransitIncidentManager::createOfficerRoot(), TransitIncidentManager::createPedestrainRoot(), TransitIncidentManager::createVehicleRoot(), TransitIncidentManager::createWitnessRoot(), NewModelCommand::execute(), CheckoutCode::GenerateOutput(), CheckoutCode::GeneratePKG(), TransitIncidentManager::readCache(), TransitIncidentManager::setActiveBus(), TransitIncidentManager::setActiveDriver(), DesignObjectResourceCache::setModelToDefaults(), Password::setPassword(), SpeedLimit::setSpeedLimit(), StreetName::setStreet(), SurfaceType::setSurface(), SurfaceCondition::setSurfaceCondition(), Effect::setTargetProperty(), Effect::setTargetProperty(), BuildActionProgramLogic::setupModel(), update(), and update().
| void DesignObject::setActiveFilters | ( | const JSONNode & | node | ) |
Sets the active filters on this design object from a JSON structure.
| [in] | node | The JSONNode containing the filter configuration to apply. |
| void DesignObject::setDesignType | ( | DesignObjectType | mode, |
| bool | is_type ) |
Sets or clears a design type flag on this object.
| [in] | mode | The DesignObjectType flag to set or clear. |
| [in] | is_type | Whether to set (true) or clear (false) the given type flag. |
| void DesignObject::setMetaData | ( | const JSONNode & | node | ) |
Replaces the entire metadata tree with the given JSON node.
| [in] | node | The JSONNode to set as the object's metadata. |
Referenced by Customer::setCompany(), Customer::setEmail(), CustomerDevice::setOSName(), and CustomerDevice::setSerialNumber().
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const bool & | data ) |
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const fltp08 & | data ) |
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const JSONNode & | node ) |
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const String & | data ) |
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const StringView & | data ) |
Sets a metadata entry at the given key to a StringView value.
| [in] | index | The metadata key. |
| [in] | data | The StringView value to store. |
References index().
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const uint01 & | data ) |
| void DesignObject::setMetaData | ( | const StringView & | index, |
| const uint04 & | data ) |
|
inline |
Updates a property using a compile-time property constant, only if the new value differs.
If the value changes, the design modified time is also updated.
| t_property | The compile-time property constant. |
| t_type | The type of the value to update. |
| [in] | value | The new value to assign if it differs. |
| [in] | lock | Optional write lock pointer for thread safety. |
Definition at line 251 of file DesignObject.h.
References is(), set(), and updateDesignModifiedTime().
|
inline |
Updates a property only if the new value differs from the current value.
If the value changes, the design modified time is also updated.
| t_type | The type of the value to update. |
| t_property_type | The property enum type (e.g., NDPO). |
| [in] | property | The property identifier to update. |
| [in] | value | The new value to assign if it differs. |
| [in] | lock | Optional write lock pointer for thread safety. |
Definition at line 229 of file DesignObject.h.
References is(), set(), and updateDesignModifiedTime().
Referenced by VisibleCommand::execute(), CustomerJob::setActive(), Customer::updateFirstName(), and Customer::updateSurname().
| void DesignObject::updateCreatedTime | ( | ) |
Sets the creation time stamp for this design object to the current system time.
| void DesignObject::updateDesignModifiedTime | ( | Time | time = Time::SystemTime() | ) |
Updates the modified time stamp for this design object.
Should be called after changing any property to notify the application of the modification.
| [in] | time | The time to set as the modified time. Defaults to the current system time. |
References Time::SystemTime().
| void DesignObject::updateDesignTransform | ( | const Matrix< fltp08 > & | transform, |
| const void * | lock = nullptr ) |
Updates the transform of this design object if it differs from the current value.
| [in] | transform | The new 4x4 transformation matrix to apply. |
| [in] | lock | Optional write lock pointer for thread safety. |
| bool DesignObject::updateDesignVisible | ( | bool | is_visible, |
| const void * | lock = nullptr ) |
Updates the spatial visibility of this design object if it differs from the current value.
| [in] | is_visible | Whether the object should be spatially visible. |
| [in] | lock | Optional write lock pointer for thread safety. |
| void DesignObject::updateMetaData | ( | const StringView & | index, |
| const bool & | data, | ||
| const void * | lock_ptr = nullptr ) |
| void DesignObject::updateMetaData | ( | const StringView & | index, |
| const fltp08 & | data, | ||
| const void * | lock_ptr = nullptr ) |
| void DesignObject::updateMetaData | ( | const StringView & | index, |
| const String & | data, | ||
| const void * | lock_ptr = nullptr ) |
| void DesignObject::updateMetaData | ( | const StringView & | index, |
| const StringView & | data, | ||
| const void * | lock_ptr = nullptr ) |
Updates a metadata entry only if the new value differs from the current value.
| [in] | index | The metadata key. |
| [in] | data | The new StringView value. |
| [in] | lock_ptr | Optional write lock pointer for thread safety. |
References index().
| bool DesignObject::validateDesignObject | ( | ) | const |
Validates the internal state of this design object, ensuring indices and base pointer are consistent.