![]() |
NDEVR
API Documentation
|
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR API 3D environment. More...
Public Member Functions | |
| Material (const DesignObject &obj) | |
| Constructs a Material from a generic DesignObject reference. | |
| Material (DesignObjectBase *property_table) | |
| Constructs a new Material and allocates a row in the given property table. | |
| Material (uint04 index, DesignObjectBase *property_table) | |
| Constructs a Material referencing a specific row in the given property table. | |
| TranslatedString | appearanceName () const |
| Returns the appearance-specific name for this material. | |
| void | cleanupMaterial () |
| Cleans up and resets material properties to a minimal valid state. | |
| void | colorBy (const DesignParameterAccumulator &accumulator) |
| Applies color-by-property rendering using the given parameter accumulator. | |
| void | combineFrom (const Material &mesh) |
| Combines material properties from another Material into this one. | |
| RGBColor | constantColor (Model model, RGBColor background_color=RGBColor(255, 255, 255), UVType type=UVType::e_KD) const |
| Computes a constant representative color for this material given a model and background. | |
| RGBColor | convertValueToColor (fltp08 value) const |
| Converts a scalar value to an RGBColor using this material's color palette and range. | |
| void | copyFrom (const Material &mesh) |
| Copies all material properties from another Material, replacing current values. | |
| PrimitiveProperty | defaultRenderProperty () const |
| Returns the default primitive render property for this material. | |
| TranslatedString | displayName () const |
| Returns a user-facing display name for this material. | |
| void | ensureImageDataLoaded (ImageFactory &factory) |
| Ensures that any referenced image data is loaded into memory using the provided factory. | |
| ShadingModel | getShadingModel () const |
| Retrieves the current shading model for this material. | |
| TextureCoordMode | getTextureCoordinateMode () const |
| Retrieves the current texture coordinate generation mode. | |
| Vector< 3, TileTextureMode > | getTileTextureMode () const |
| Retrieves the texture tiling mode for each of the three axes. | |
| RGBColor | getUVColor (UVType uv_index) const |
| Retrieves the color assigned to the specified UV channel. | |
| StringView | getUVImage (UVType uv_index) const |
| Retrieves the image file path or identifier for the specified UV channel. | |
| fltp04 | getUVIntensity (UVType uv_index) const |
| Retrieves the intensity value for the specified UV channel. | |
| uint04 | getUVLayer (UVType uv_index) const |
| Retrieves the layer index for the specified UV channel. | |
| UVMode | getUVMode (UVType uv_index) const |
| Retrieves the UV mapping mode for the specified UV channel. | |
| bool | hasActiveImage () const |
| Checks whether this material has an active (non-empty, in-use) image texture. | |
| bool | hasActiveUVImage (UVType index) const |
| Checks whether the specified UV channel has an active image texture assigned. | |
| bool | hasImageData () const |
| Checks whether this material has any image data loaded or referenced. | |
| bool | hasModelDependentColor () const |
| Checks whether any UV type has model-dependent coloring. | |
| bool | hasModelDependentColor (UVType type) const |
| Checks whether the color for the specified UV type depends on the owning model. | |
| bool | hasOpacity () const |
| Checks whether this material has a non-default opacity value set. | |
| bool | hasPerVertexColoring (UVType type=UVType::e_KD) const |
| Checks whether per-vertex coloring is active for the specified UV type. | |
| bool | hasUVColor (UVType index) const |
| Checks whether the specified UV channel has a color assigned. | |
| bool | hasUVIntensity (UVType index) const |
| Checks whether the specified UV channel has a non-default intensity value. | |
| bool | hasUVLayer (UVType index) const |
| Checks whether the specified UV channel has a layer index assigned. | |
| bool | isSupportedByShadingModel (UVType type) const |
| Checks whether the given UV type is supported by the current shading model. | |
| Buffer< RGBColor > | palette () const |
| Retrieves the color palette used for value-based coloring. | |
| void | setPalette (const Buffer< RGBColor > &palette) |
| Sets the color palette used for value-based coloring. | |
| void | setTileTextureMode (const Vector< 3, TileTextureMode > &modes) |
| Sets the texture tiling mode for each of the three axes. | |
| void | setupAsDefault () |
| Initializes this material with default property values. | |
| template<class t_type> | |
| void | setUVColor (const t_type &type) |
| Sets the color for all UV channels to the same value. | |
| template<class t_type> | |
| void | setUVColor (UVType uv_index, const t_type &type) |
| Sets the color for a specific UV channel. | |
| void | setUVImage (UVType uv_index, const StringView &type) |
| Sets the image file path or identifier for the specified UV channel. | |
| template<class t_type> | |
| void | setUVIntensity (UVType uv_index, const t_type &type) |
| Sets the intensity value for the specified UV channel. | |
| template<class t_type> | |
| void | setUVLayer (UVType uv_index, const t_type &type) |
| Sets the layer index for the specified UV channel. | |
| void | setUVMode (UVType uv_index, const UVMode &type) |
| Sets the UV mapping mode for the specified UV channel. | |
| void | updateModifiedTime (const Time &time=Time::SystemTime()) |
| Updates the material's modification timestamp. | |
| template<class t_type> | |
| void | updateUVColor (const t_type &type, const void *lock_ptr=nullptr) |
| Updates the color for all UV channels, only writing if the value has changed. | |
| template<class t_type> | |
| void | updateUVColor (UVType uv_index, const t_type &value, const void *lock_ptr=nullptr) |
| Updates the color for a specific UV channel, only writing if the value has changed. | |
| bool | validate () const |
| Validates that this material's properties are in a consistent and usable state. | |
| Public Member Functions inherited from DesignObject | |
| 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. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from DesignObject | |
| static constexpr StringView | FilePathDesignNameVariable () |
| Returns the placeholder variable string used in file paths to represent the design name. | |
| Protected Member Functions inherited from DesignObject | |
| 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. | |
| 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. | |
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR API 3D environment.
Models may have 3 materials but Materials can be shared across any number of Models within a Scene.
Definition at line 152 of file Material.h.
| enum Material::GridLineMode : uint01 |
Defines modes for gridline rendering on material surfaces.
Definition at line 202 of file Material.h.
Enumerates the available shading models for material rendering.
Each value represents a distinct lighting/shading algorithm that determines how light interacts with the material surface during rendering.
| Enumerator | |
|---|---|
| e_flat | Flat shading. Shading is done on per-face base, diffuse only. Also known as 'faceted shading'. |
| e_gouraud | Simple Gouraud shading with per-vertex color interpolation. |
| e_phong | Phong shading with per-pixel lighting. |
| e_phong_blinn | Phong-Blinn shading model. |
| e_toon | Toon shading per pixel. Also known as 'comic' shader. |
| e_oren_nayar | Oren-Nayar shading per pixel. Extension to Lambertian shading accounting for surface roughness. |
| e_minnaert | Minnaert shading per pixel. Extension to Lambertian shading accounting for material "darkness". |
| e_cook_torrance | Cook-Torrance shading model. Special shader for metallic surfaces. |
| e_no_shading | No shading applied. Constant light influence of 1.0. |
| e_fresnel | Fresnel-based shading model. |
| e_pbr | Physically-based rendering model. |
| e_ibl | Image-based lighting model. |
| e_water | Specialized water surface shading. |
| e_background_gradiant | Background gradient shading. |
| e_skybox | Skybox cubemap shading. |
| e_number_of_shading_models | Sentinel value indicating the total number of shading models. |
Definition at line 161 of file Material.h.
Defines how texture coordinates are generated or interpreted for a material.
Definition at line 225 of file Material.h.
Defines how texture coordinates outside the [0,1] range are handled per axis.
Definition at line 213 of file Material.h.
| enum Material::UVMode |
Defines UV mapping modes that control how texture colors are determined for surfaces.
| Enumerator | |
|---|---|
| e_none | No UV mapping applied. |
| e_solid_color | A single solid color is used. |
| e_color_channel | Color is taken from the per-vertex color channel. |
| e_scaled_channel | Color channel values are scaled by a property range. |
| e_color_by_model | Color is determined by the owning model. |
| e_background | Uses the background color. |
| e_background_contrast | Uses a color that contrasts with the background. |
| e_background_contrast_plus_solid | Combines background contrast with a solid color. |
| e_image | Color is sampled from a texture image. |
| e_color_by_layer | Color is determined by the layer assignment. |
| e_highlight | Uses the highlight/selection color. |
Definition at line 184 of file Material.h.
| Material::Material | ( | uint04 | index, |
| DesignObjectBase * | property_table ) |
Constructs a Material referencing a specific row in the given property table.
| [in] | index | The row index within the material property table. |
| [in] | property_table | The design object base containing the material data. |
References DesignObject::index().
| Material::Material | ( | DesignObjectBase * | property_table | ) |
Constructs a new Material and allocates a row in the given property table.
| [in] | property_table | The design object base to allocate the material in. |
|
explicit |
Constructs a Material from a generic DesignObject reference.
| [in] | obj | The DesignObject to interpret as a Material. |
References DesignObject::DesignObject().
| TranslatedString Material::appearanceName | ( | ) | const |
Returns the appearance-specific name for this material.
| void Material::cleanupMaterial | ( | ) |
Cleans up and resets material properties to a minimal valid state.
| void Material::colorBy | ( | const DesignParameterAccumulator & | accumulator | ) |
Applies color-by-property rendering using the given parameter accumulator.
| [in] | accumulator | The design parameter accumulator providing property data for color mapping. |
| void Material::combineFrom | ( | const Material & | mesh | ) |
|
nodiscard |
Computes a constant representative color for this material given a model and background.
| [in] | model | The Model context for resolving model-dependent colors. |
| [in] | background_color | The background color used for contrast calculations (defaults to white). |
| [in] | type | The UV type to evaluate (defaults to e_KD, the diffuse channel). |
References e_KD.
| void Material::copyFrom | ( | const Material & | mesh | ) |
| PrimitiveProperty Material::defaultRenderProperty | ( | ) | const |
Returns the default primitive render property for this material.
| TranslatedString Material::displayName | ( | ) | const |
Returns a user-facing display name for this material.
| void Material::ensureImageDataLoaded | ( | ImageFactory & | factory | ) |
Ensures that any referenced image data is loaded into memory using the provided factory.
| [in] | factory | The ImageFactory used to load image data on demand. |
| ShadingModel Material::getShadingModel | ( | ) | const |
| TextureCoordMode Material::getTextureCoordinateMode | ( | ) | const |
Retrieves the current texture coordinate generation mode.
| Vector< 3, TileTextureMode > Material::getTileTextureMode | ( | ) | const |
Retrieves the texture tiling mode for each of the three axes.
Retrieves the color assigned to the specified UV channel.
| [in] | uv_index | The UV channel to query. |
Referenced by updateUVColor().
| StringView Material::getUVImage | ( | UVType | uv_index | ) | const |
Retrieves the image file path or identifier for the specified UV channel.
| [in] | uv_index | The UV channel to query. |
Retrieves the intensity value for the specified UV channel.
| [in] | uv_index | The UV channel to query. |
Retrieves the layer index for the specified UV channel.
| [in] | uv_index | The UV channel to query. |
Retrieves the UV mapping mode for the specified UV channel.
| [in] | uv_index | The UV channel to query. |
| bool Material::hasActiveImage | ( | ) | const |
Checks whether this material has an active (non-empty, in-use) image texture.
| bool Material::hasActiveUVImage | ( | UVType | index | ) | const |
Checks whether the specified UV channel has an active image texture assigned.
| [in] | index | The UV channel to check. |
References DesignObject::index().
| bool Material::hasImageData | ( | ) | const |
Checks whether this material has any image data loaded or referenced.
| bool Material::hasModelDependentColor | ( | ) | const |
Checks whether any UV type has model-dependent coloring.
| bool Material::hasModelDependentColor | ( | UVType | type | ) | const |
Checks whether the color for the specified UV type depends on the owning model.
| [in] | type | The UV type to check. |
| bool Material::hasOpacity | ( | ) | const |
Checks whether this material has a non-default opacity value set.
| bool Material::hasPerVertexColoring | ( | UVType | type = UVType::e_KD | ) | const |
Checks whether per-vertex coloring is active for the specified UV type.
| [in] | type | The UV type to check (defaults to e_KD, the diffuse channel). |
References e_KD.
| bool Material::hasUVColor | ( | UVType | index | ) | const |
Checks whether the specified UV channel has a color assigned.
| [in] | index | The UV channel to check. |
References DesignObject::index().
| bool Material::hasUVIntensity | ( | UVType | index | ) | const |
Checks whether the specified UV channel has a non-default intensity value.
| [in] | index | The UV channel to check. |
References DesignObject::index().
| bool Material::hasUVLayer | ( | UVType | index | ) | const |
Checks whether the specified UV channel has a layer index assigned.
| [in] | index | The UV channel to check. |
References DesignObject::index().
| bool Material::isSupportedByShadingModel | ( | UVType | type | ) | const |
Checks whether the given UV type is supported by the current shading model.
| [in] | type | The UV type to check for support. |
| void Material::setTileTextureMode | ( | const Vector< 3, TileTextureMode > & | modes | ) |
Sets the texture tiling mode for each of the three axes.
| [in] | modes | A 3-component vector of TileTextureMode values (one per axis). |
| void Material::setupAsDefault | ( | ) |
Initializes this material with default property values.
|
inline |
Sets the color for all UV channels to the same value.
| [in] | type | The color value to set across all UV channels. |
Definition at line 382 of file Material.h.
References cast(), e_uv_size, setUVColor(), and type.
Referenced by setUVColor().
|
inline |
Sets the color for a specific UV channel.
| [in] | uv_index | The UV channel to set the color for. |
| [in] | type | The color value to set. |
Definition at line 394 of file Material.h.
References cast(), DesignInfo::m_base, DesignInfo::m_design_index, and type.
|
inline |
Sets the image file path or identifier for the specified UV channel.
| [in] | uv_index | The UV channel to assign the image to. |
| [in] | type | The image file path or resource identifier. |
Definition at line 372 of file Material.h.
References cast(), DesignInfo::m_base, DesignInfo::m_design_index, and type.
|
inline |
Sets the intensity value for the specified UV channel.
| [in] | uv_index | The UV channel to set the intensity for. |
| [in] | type | The intensity value to set. |
Definition at line 438 of file Material.h.
References cast(), DesignInfo::m_base, DesignInfo::m_design_index, and type.
|
inline |
Sets the layer index for the specified UV channel.
| [in] | uv_index | The UV channel to set the layer for. |
| [in] | type | The layer index to set. |
Definition at line 449 of file Material.h.
References cast(), DesignInfo::m_base, DesignInfo::m_design_index, and type.
Sets the UV mapping mode for the specified UV channel.
| [in] | uv_index | The UV channel to configure. |
| [in] | type | The UVMode to apply. |
| void Material::updateModifiedTime | ( | const Time & | time = Time::SystemTime() | ) |
Updates the material's modification timestamp.
| [in] | time | The time to record as the modification time (defaults to current system time). |
References Time::SystemTime().
Referenced by updateUVColor().
|
inline |
Updates the color for all UV channels, only writing if the value has changed.
Acquires a write lock and updates the modified time if any value changed.
| [in] | type | The color value to set across all UV channels. |
| [in] | lock_ptr | Optional pointer used for write lock acquisition. |
Definition at line 407 of file Material.h.
References cast(), e_uv_size, type, and updateUVColor().
Referenced by updateUVColor().
|
inline |
Updates the color for a specific UV channel, only writing if the value has changed.
Acquires a write lock and updates the modified time if the value differs from the current one.
| [in] | uv_index | The UV channel to update. |
| [in] | value | The new color value. |
| [in] | lock_ptr | Optional pointer used for write lock acquisition. |
Definition at line 422 of file Material.h.
References cast(), getUVColor(), DesignInfo::m_base, DesignInfo::m_design_index, and updateModifiedTime().
| bool Material::validate | ( | ) | const |
Validates that this material's properties are in a consistent and usable state.