Class ScyllaSignShape
Parametric sign: a thin rectangular sign panel mounted atop a vertical cylindrical post.
The post stands along Y; the panel sits centered above it with its bottom edge flush
against the post top. Centered on the origin so the whole shape's bounding box is
symmetric around (0, 0, 0).
Inherited Members
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/Geometry/Sign")]
public sealed class ScyllaSignShape : ScyllaShapeBase3D
Remarks
Total height is postHeight + panelHeight. Centering: post bottom at
y = -totalHeight/2, panel top at y = +totalHeight/2, panel center at
y = (postHeight - panelHeight) / 2 + panelHeight/2.
For per-face coloring, ColoringMode selects between PostAndPanel (default, 2 resolver indices: post + panel all six quads share) and PerRegion (3 indices: post + panel front + panel back/sides).
Properties
ColoringMode
Selects the per-face color granularity used when an IFaceColorResolver is active. Geometry is identical in all modes; only how many distinct resolver indices the sign emits changes. See SignColoringMode for the exact index layout. Setting this triggers an immediate mesh rebuild.
Declaration
public SignColoringMode ColoringMode { get; set; }
Property Value
| Type | Description |
|---|---|
| SignColoringMode |
PanelHeight
Height of the rectangular sign panel along the Y axis. Contributes to the total
shape height (PostHeight + PanelHeight). Setting this triggers an immediate
mesh rebuild.
Declaration
public float PanelHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PanelThickness
Front-to-back thickness of the sign panel along the Z axis. The panel box extends
by PanelThickness/2 in both the +Z and -Z directions from the
panel center. Setting this triggers an immediate mesh rebuild.
Declaration
public float PanelThickness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PanelWidth
Width of the rectangular sign panel along the X axis. The panel is centered on X and Z. Setting this triggers an immediate mesh rebuild.
Declaration
public float PanelWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PostHeight
Height of the vertical cylindrical post. The total shape height is
PostHeight + PanelHeight. Setting this triggers an immediate mesh rebuild.
Declaration
public float PostHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PostRadius
Radius of the cylindrical post. Also determines the bottom and top cap disc radius of the post. Setting this triggers an immediate mesh rebuild.
Declaration
public float PostRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
PostSegments
Circumferential subdivisions of the cylindrical post. Clamped to [3, 64] at
build time. Setting this triggers an immediate mesh rebuild.
Declaration
public int PostSegments { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Build(Mesh, float, float, int, float, float, float, SignColoringMode, IFaceColorResolver)
Populates target with a parametric sign mesh. Existing mesh data is
overwritten.
Declaration
public static void Build(Mesh target, float postHeight, float postRadius, int postSegments, float panelWidth, float panelHeight, float panelThickness, SignColoringMode coloringMode = SignColoringMode.PostAndPanel, IFaceColorResolver resolver = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | Destination mesh. Must be non-null. |
| float | postHeight | Height of the vertical post. |
| float | postRadius | Radius of the cylindrical post. |
| int | postSegments | Circumferential subdivisions. Clamped to |
| float | panelWidth | Width of the panel along X. |
| float | panelHeight | Height of the panel along Y. |
| float | panelThickness | Thickness of the panel along Z. |
| SignColoringMode | coloringMode | Selects how the resolver indices are assigned. PostAndPanel
(the default) uses two indices total - |
| IFaceColorResolver | resolver | Optional per-face color resolver. When non-null, a per-vertex color channel is emitted with one solid color per logical face. When null, no color channel is written. |
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. |