Class ScyllaSkirtedWallShape
Parametric wall with a forward-extending skirt (baseboard / plinth) at the bottom: a
narrower wall body of thickness Thickness, sitting on a wider skirt
section of thickness Thickness + SkirtExtension spanning the bottom
SkirtHeight units of the wall's height. The back face stays flat - the
skirt sticks out only on the +Z (front) side. This shape is the vertical mirror
of ScyllaCappedWallShape.
Inheritance
Inherited Members
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/Geometry/Skirted Wall")]
public sealed class ScyllaSkirtedWallShape : ScyllaShapeBase3D
Remarks
The wall is centered at the origin. The total wall footprint is
Length x Height x Thickness. The skirt
pushes the +Z extent out to Thickness * 0.5 + SkirtExtension in
its vertical band while the back face remains at -Thickness * 0.5.
Topology: 10 quads total - body front, skirt front, skirt top step (the visible upward-facing ledge), bottom face, back face, top face, body left end, body right end, skirt left end, skirt right end.
For per-face coloring, ColoringMode selects between WallAndSkirt (the default, 2 resolver indices: body vs skirt) and PerRegion (3 indices: body, skirt, back). Per-face coloring requires a FaceColoringMode other than None and a valid ColorPaletteName.
The Build(Mesh, float, float, float, float, float, SkirtedWallColoringMode, IFaceColorResolver) static method can be called directly to populate an arbitrary UnityEngine.Mesh without attaching a component.
Properties
ColoringMode
Selects the per-face color granularity applied when a IFaceColorResolver is active. Geometry is identical in all modes; only how many distinct resolver indices the wall emits changes. See SkirtedWallColoringMode for the index-to-region mapping. Setting this triggers an immediate mesh rebuild via Rebuild().
Declaration
public SkirtedWallColoringMode ColoringMode { get; set; }
Property Value
| Type | Description |
|---|---|
| SkirtedWallColoringMode |
Height
Wall extent along the Y axis (the wall's full vertical height, including the skirt
band). Values below 0.0001 are clamped at build time. Setting this triggers
an immediate mesh rebuild via Rebuild().
Declaration
public float Height { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Length
Wall extent along the X axis (the wall's horizontal run). Values below
0.0001 are clamped at build time. Setting this triggers an immediate mesh
rebuild via Rebuild().
Declaration
public float Length { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
SkirtExtension
Forward +Z extension of the skirt beyond the body's front face. Clamped to
>= 0 at build time. A value of 0 produces a flush skirt with no
top-step ledge. Setting this triggers an immediate mesh rebuild via
Rebuild().
Declaration
public float SkirtExtension { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
SkirtHeight
Vertical extent of the skirt band, measured upward from the bottom of the wall.
Clamped to [0, Height] at build time. A value of 0 effectively
removes the skirt. Setting this triggers an immediate mesh rebuild via
Rebuild().
Declaration
public float SkirtHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Thickness
Body wall extent along the Z axis. The skirt front face is pushed further out to
Thickness * 0.5 + SkirtExtension. Values below 0.0001 are clamped at
build time. Setting this triggers an immediate mesh rebuild via
Rebuild().
Declaration
public float Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Build(Mesh, float, float, float, float, float, SkirtedWallColoringMode, IFaceColorResolver)
Populates target with a parametric skirted-wall mesh. Existing
mesh data is cleared and overwritten. All dimension parameters are clamped at build
time so the method always produces valid geometry.
Declaration
public static void Build(Mesh target, float length, float height, float thickness, float skirtHeight, float skirtExtension, SkirtedWallColoringMode coloringMode = SkirtedWallColoringMode.WallAndSkirt, IFaceColorResolver resolver = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | Destination mesh to populate. Must not be |
| float | length | Wall extent along X (horizontal run). Values below |
| float | height | Wall extent along Y (full vertical height including the skirt band). Values below
|
| float | thickness | Body wall extent along Z. Values below |
| float | skirtHeight | Vertical extent of the skirt section, measured upward from the bottom of the wall.
Clamped to |
| float | skirtExtension | Forward |
| SkirtedWallColoringMode | coloringMode | Selects how resolver indices are assigned. WallAndSkirt
(the default) uses two indices total - |
| IFaceColorResolver | resolver | Optional per-face color resolver (see IFaceColorResolver). When
non-null, a per-vertex color channel is emitted with one solid color per logical
region. When |
Remarks
This method is the pure-static entry point used by the component's BuildMesh(Mesh) implementation. It can also be called directly to fill an arbitrary UnityEngine.Mesh - for example to bake the wall into a larger mesh at edit time.
The mesh uses per-region dispatch: Resolve(int, int, Vector3) is
called once per logical color group (2 or 3 calls total depending on
coloringMode), and the returned color is shared across all
vertices in that group. See SkirtedWallColoringMode for the
index-to-region mapping.
The generated mesh uses UnityEngine.Rendering.IndexFormat.UInt16 unless the vertex count exceeds 65 000, in which case UnityEngine.Rendering.IndexFormat.UInt32 is used automatically.
BuildMesh(Mesh)
Subclass extension point: write vertex / triangle / normal / uv data into
target from the shape's serialized parameters. The base class
calls Clear(bool) before invoking this method and
UnityEngine.Mesh.RecalculateBounds() afterwards, so subclasses should not invoke
either themselves.
Declaration
protected override void BuildMesh(Mesh target)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | The owned mesh to populate. Already cleared by the base class. |
Overrides
GetMeshName()
Returns the shape's mesh name as it should appear on the generated mesh asset. Defaults to the subclass type name; override to provide a friendlier label.
Declaration
protected override string GetMeshName()
Returns
| Type | Description |
|---|---|
| string | A short identifier for the generated mesh, used as UnityEngine.Object.name. |