Class ScyllaPaneledWall1Shape
Parametric wall with one or more concentric recessed rectangular picture-frame grooves on the front face, surrounding a flush central panel. Each groove sits below the wall surface by FrameDepth; the outer ring, the bands between grooves, and the inner panel are all coplanar with the wall surface. The back face is flat.
Inheritance
Inherited Members
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/Geometry/Paneled Wall 1")]
public sealed class ScyllaPaneledWall1Shape : ScyllaShapeBase3D
Remarks
The wall is centered at the origin. The total wall footprint is
Length x Height x Thickness. The first
groove is inset from every wall edge by FrameMargin; each groove is
FrameThickness wide and FrameDepth deep.
FrameCount grooves are nested toward the centre, separated by raised
wall bands of width FrameSpacing; the flush inner panel fills whatever
remains in the middle. With the default FrameCount of 1 this is
a single picture frame.
Topology per groove: 4 channel-floor strips at the recessed depth + 8 step walls (4 outer + 4 inner, connecting the wall-surface plane to the recessed channel floor). Plus the front-face wall surface: an outer ring, one band per gap between grooves, and the inner panel quad (each a rectangular frame of up to 4 strips). Plus 5 flat enclosure faces: back, top, bottom, left end, right end. So the single-frame default emits 22 quads; each extra groove adds its channel + steps + the band ring before it.
If the grooves would overrun the centre (the innermost groove's inner edge passing the wall midline), FrameMargin, FrameThickness, and FrameSpacing are scaled proportionally at build time so the inner panel always retains at least a minimal area.
For per-face coloring, ColoringMode selects between FrameAndPanel (the default, 2 resolver indices: the recessed frame channel vs everything else) and PerRegion (3 indices: outer wall, frame channel, inner panel). Per-face coloring requires a FaceColoringMode other than None and a valid ColorPaletteName.
The Build(Mesh, float, float, float, float, float, float, int, float, PaneledWall1ColoringMode, 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 PaneledWall1ColoringMode for the index-to-region mapping. Setting this triggers an immediate mesh rebuild via Rebuild().
Declaration
public PaneledWall1ColoringMode ColoringMode { get; set; }
Property Value
| Type | Description |
|---|---|
| PaneledWall1ColoringMode |
FrameCount
Number of concentric recessed grooves carved into the front face, from the outer
edge inward. 1 (the default) is a single picture frame; higher values nest
additional frames toward the centre, separated by raised wall bands of width
FrameSpacing. Clamped to the inclusive range 1 to 8 when set and at
build time. When the grooves would overrun the centre, FrameMargin,
FrameThickness, and FrameSpacing are scaled down
proportionally so a flush inner panel always remains. Setting this triggers an
immediate mesh rebuild via Rebuild().
Declaration
public int FrameCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
FrameDepth
Depth the frame channel is recessed below the wall surface along -Z. Clamped
to >= 0 when set and at build time. A value of 0 produces a flat-flush channel
with no visible recession. Setting this triggers an immediate mesh rebuild via
Rebuild().
Declaration
public float FrameDepth { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
FrameMargin
Distance from each wall edge to the outer edge of the frame channel. Clamped to
>= 0 at build time. Setting this triggers an immediate mesh rebuild via
Rebuild().
Declaration
public float FrameMargin { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
FrameSpacing
Width of the raised wall band between consecutive grooves, in world units. Only used
when FrameCount is greater than 1. Clamped to >= 0 at
build time (a value of 0 butts adjacent grooves directly against each other).
Scaled down proportionally alongside FrameMargin and
FrameThickness when the grooves would overrun the centre. Setting this
triggers an immediate mesh rebuild via Rebuild().
Declaration
public float FrameSpacing { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
FrameThickness
Width of the picture-frame border channel on the front face. Clamped to
>= 0.0001 at build time; both FrameMargin and this value
are scaled proportionally when their sum would leave the inner panel with less than
0.0001 units on its smallest axis. Setting this triggers an immediate mesh
rebuild via Rebuild().
Declaration
public float FrameThickness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Height
Wall extent along the Y axis (the wall's full vertical height). Values below
0.0001 are clamped when set and 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 when set and at build time. Setting this triggers an immediate mesh
rebuild via Rebuild().
Declaration
public float Length { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Thickness
Wall body extent along the Z axis. The frame channel is recessed from the front
face by FrameDepth toward the interior. Values below 0.0001
are clamped when set and 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, float, int, float, PaneledWall1ColoringMode, IFaceColorResolver)
Populates target with a parametric picture-frame paneled-wall mesh.
Existing mesh data is cleared and overwritten. All 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 frameMargin, float frameThickness, float frameDepth, int frameCount = 1, float frameSpacing = 0.1, PaneledWall1ColoringMode coloringMode = PaneledWall1ColoringMode.FrameAndPanel, 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). Values below |
| float | thickness | Wall body extent along Z. Values below |
| float | frameMargin | Distance from each wall edge to the outer edge of the frame channel. Clamped to
|
| float | frameThickness | Width of the recessed frame channel. Clamped to |
| float | frameDepth | Depth the channel is recessed below the wall surface. Clamped to |
| int | frameCount | |
| float | frameSpacing | |
| PaneledWall1ColoringMode | coloringMode | Selects how resolver indices are assigned. FrameAndPanel
(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 without attaching a component.
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). See PaneledWall1ColoringMode
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. |