<< lib/user-interface/SLMaterial.sleela SLeeLa Standard Library Definition. Definition: Defines SLMaterial — how a Canvas-aware object catches light. The RELIEF profile is a height model the lighting uses to compute surface normals, which is what produces the raised/recessed "quality relief": a smooth dome (ROUNDED), a crisp chamfer (BEVEL), an inset the shape reads as pressed INTO the floor (ENGRAVED), or a raised plateau standing OFF the floor (EMBOSSED). It also carries depth (how pronounced), gloss (specular sheen), occlusion (how much darkness pools in the creases), and the edge band width. It is a pure value object passed to SLLightScene painting helpers and to a canvas widget's light attachment. Family: user-interface. Mirrors SLUIMaterial in the SleelaUI Lighting C ABI. >> #sleela 2.5 material; class SLMaterial { < ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- > << Eleven catalogued attributes with getter/setter pairs, so a GUI, loader, or catalog can read and (where appropriate) override this record. Values are faithful to the subject's real origin where publicly known. >> String metaVersion = "1.0.0"; int metaId = 10380; String metaAuthor = "Kiro Agent"; String metaDate = "2026-10-16"; String metaCopyright = "SLeeLa project"; String metaTrademark = "none"; String metaCorporation = "none"; < metaOrigin: National | | International | Galactic > String metaOrigin = "International"; String metaBirthDate = "2026-10-07"; < metaScienceRating: maturity/robustness on a 1..10 scale > int metaScienceRating = 9; < metaNationalSchedule: a real, citable instrument or "none" > String metaNationalSchedule = "none"; String getMetaVersion() { return metaVersion; } void setMetaVersion(String v) { metaVersion = v; } int getMetaId() { return metaId; } void setMetaId(int v) { metaId = v; } String getAuthor() { return metaAuthor; } void setAuthor(String v) { metaAuthor = v; } String getDate() { return metaDate; } void setDate(String v) { metaDate = v; } String getCopyright() { return metaCopyright; } void setCopyright(String v) { metaCopyright = v; } String getTrademark() { return metaTrademark; } void setTrademark(String v) { metaTrademark = v; } String getCorporation() { return metaCorporation; } void setCorporation(String v) { metaCorporation = v; } String getOrigin() { return metaOrigin; } void setOrigin(String v) { metaOrigin = v; } String getBirthDate() { return metaBirthDate; } void setBirthDate(String v) { metaBirthDate = v; } int getScienceRating() { return metaScienceRating; } void setScienceRating(int v) { metaScienceRating = v; } String getNationalSchedule() { return metaNationalSchedule; } void setNationalSchedule(String v) { metaNationalSchedule = v; } < Relief-profile ordinals (mirror SLUIReliefProfile). > static final int FLAT = 0; static final int ROUNDED = 1; static final int BEVEL = 2; static final int ENGRAVED = 3; static final int EMBOSSED = 4; int profile; < relief height in px > double depth; < 0 matte .. 1 mirror (specular sheen) > double gloss; < 0..1 ambient-occlusion darkening in the creases > double occlusion; < bevel/edge band width in px > double edgePx; < Fill a material for a profile at a given relief depth, with sensible > < defaults for gloss/occlusion/edge the host may then tune. > void of(int reliefProfile, double reliefDepth) { profile = reliefProfile; depth = reliefDepth; gloss = 0.35; occlusion = 0.4; edgePx = 6.0; } < Common relief shorthands. > void rounded(double depth) { of(ROUNDED, depth); } void bevel(double depth) { of(BEVEL, depth); } void engraved(double depth) { of(ENGRAVED, depth); } void embossed(double depth) { of(EMBOSSED, depth); } }