pub struct MaterialSignature {
pub id: String,
pub name: String,
pub mechanical: Option<MechanicalFacet>,
pub optical: Option<OpticalFacet>,
pub acoustic: Option<AcousticFacet>,
pub chemical: Option<ChemicalFacet>,
pub thermal: Option<ThermalFacet>,
}Expand description
A complete, multi-faceted Material Signature attached to a Continuant.
Fields§
§id: StringCanonical material signature IRI (e.g. <did:q42:material:sucrose-cube-v1>).
name: StringHuman-readable material name.
mechanical: Option<MechanicalFacet>Mechanical properties.
optical: Option<OpticalFacet>Optical & EM properties.
acoustic: Option<AcousticFacet>Acoustic properties.
chemical: Option<ChemicalFacet>Chemical solubility & miscibility traits.
thermal: Option<ThermalFacet>Thermal & thermodynamic properties.
Implementations§
Source§impl MaterialSignature
impl MaterialSignature
Sourcepub fn sugar_cube() -> Self
pub fn sugar_cube() -> Self
Sugar Cube (Sucrose) canonical specification from primer §2.2.
Sourcepub fn liquid_water() -> Self
pub fn liquid_water() -> Self
Liquid Water canonical specification.
Sourcepub fn mineral_oil() -> Self
pub fn mineral_oil() -> Self
Mineral Oil specification (immiscible with water).
Sourcepub fn water_tank_shell() -> Self
pub fn water_tank_shell() -> Self
HDPE shell of a water tank — a part continuant, not the water it holds.
Order-of-magnitude polymer figures on this same signature stack, not a
second materials system. liquid_water is species H2O only: it is not
this shell, and it is not any of the six game water forms (natural,
collected, potable, salt, grey, black). The whole tank does not subsume
the shell’s signature.
Sourcepub fn lookup(name: &str) -> Result<Self, PartBindError>
pub fn lookup(name: &str) -> Result<Self, PartBindError>
Catalog lookup on this one physics stack.
Game water forms return PartBindError::WaterFormNotSignature and
never alias to Self::liquid_water.
Sourcepub fn has_facet(&self, facet: SignatureFacet) -> bool
pub fn has_facet(&self, facet: SignatureFacet) -> bool
true when it has facet.
Sourcepub fn facet_fields(
&self,
facet: SignatureFacet,
) -> Vec<(&'static str, FacetField)>
pub fn facet_fields( &self, facet: SignatureFacet, ) -> Vec<(&'static str, FacetField)>
Fields of one facet. Empty when that facet is absent.
Sourcepub fn with_spectrum_stress(&self, stress: f64) -> Self
pub fn with_spectrum_stress(&self, stress: f64) -> Self
Shift the colour and sound readings of the one EMF spectrum axis.
stress is clamped to [0, 1]. Optical albedo falls and absorption
rises; acoustic absorption rises with the same stress. Mechanical
numbers, the signature id, and spatial coordinates are unchanged.
There is no texture id to swap — a stressed look is this reading.