Class ScyllaColumnShape
Parametric architectural column: a cylindrical ShaftHeight shaft with optional CapitalHeight capital on top and BaseHeight base at the bottom. The capital and base have independent radii that can match the shaft (smooth cylinder) or flare outward (classical column with stepped capital and base).
Inherited Members
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/Geometry/Column")]
public sealed class ScyllaColumnShape : ScyllaShapeBase3D
Remarks
Topology: three stacked cylindrical side strips, a circular cap at the top and
bottom of the column, and annular caps at each shaft-junction where the radius
changes (e.g. the upward-facing ring on top of a wider base, the downward-facing
ring on the underside of a wider capital). When CapitalHeight is
0 the capital section is omitted entirely (no junction, the shaft's top
cap sits at the column's top). Similarly for BaseHeight.
The column is centered at the origin on the X/Z axes; in Y, it spans from
-totalHeight * 0.5 to +totalHeight * 0.5 where
totalHeight = BaseHeight + ShaftHeight + CapitalHeight. This matches the
centered-at-origin convention every other shape in Scylla.Core.Util.Geom
uses, so the column can be positioned identically.
When ColliderMode is set to MatchingPrimitive the shape falls back to a UnityEngine.MeshCollider (Unity has no native cylinder collider, and a capsule's rounded caps would change the silhouette).
Properties
BaseHeight
Height of the base (bottom slab) in mesh units. Set to 0 to omit the base
section entirely, in which case the shaft's bottom becomes the column's bottommost cap.
Setting this property triggers an immediate mesh rebuild.
Declaration
public float BaseHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
BaseRadius
Radius of the base (bottom slab) in mesh units. Set equal to ShaftRadius
to produce a flush bottom with no junction annulus. Values less than or equal to 0
cause the base section to be omitted. Setting this property triggers an immediate mesh
rebuild.
Declaration
public float BaseRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
CapitalHeight
Height of the capital (top slab) in mesh units. Set to 0 to omit the capital
section entirely, in which case the shaft's top becomes the column's topmost cap.
Setting this property triggers an immediate mesh rebuild.
Declaration
public float CapitalHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
CapitalRadius
Radius of the capital (top slab) in mesh units. Set equal to ShaftRadius
to produce a flush top with no junction annulus. Values less than or equal to 0
cause the capital section to be omitted. Setting this property triggers an immediate
mesh rebuild.
Declaration
public float CapitalRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ShaftHeight
Vertical extent of the central shaft in mesh units. Values less than or equal to
0 cause the shaft section to be omitted at build time. Setting this property
triggers an immediate mesh rebuild.
Declaration
public float ShaftHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ShaftRadius
Radius of the column's central shaft in mesh units. Values less than or equal to
0 cause the shaft section to be omitted at build time. Setting this property
triggers an immediate mesh rebuild.
Declaration
public float ShaftRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ShaftSegments
Number of circumferential segments shared by the shaft, capital, and base cylinders.
Higher values produce a smoother silhouette at the cost of extra geometry. Clamped
to [3, 128] at build time. Setting this property triggers an immediate mesh
rebuild.
Declaration
public int ShaftSegments { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
TotalHeight
Read-only sum of BaseHeight, ShaftHeight, and
CapitalHeight. The column spans from -TotalHeight * 0.5 to
+TotalHeight * 0.5 on the Y axis.
Declaration
public float TotalHeight { get; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Build(Mesh, float, float, int, float, float, float, float, IFaceColorResolver)
Populates target with a parametric column mesh. Existing mesh
data is overwritten. shaftSegments is clamped to
[3, 128]. When capitalHeight is 0 the capital is
omitted entirely; same for baseHeight.
Declaration
public static void Build(Mesh target, float shaftRadius, float shaftHeight, int shaftSegments, float capitalRadius, float capitalHeight, float baseRadius, float baseHeight, IFaceColorResolver resolver = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | Destination mesh. Must be non-null. |
| float | shaftRadius | Radius of the column's shaft. |
| float | shaftHeight | Vertical extent of the shaft. |
| int | shaftSegments | Subdivisions around the circumference. |
| float | capitalRadius | Radius of the capital block. |
| float | capitalHeight | Height of the capital block. |
| float | baseRadius | Radius of the base block. |
| float | baseHeight | Height of the base block. |
| IFaceColorResolver | resolver | Optional per-surface color resolver. When non-null, a per-vertex color channel is
emitted with one solid color per logical surface. Each distinct emitted surface is one
face and shares a single resolved color across all of its vertices. Faces are indexed
with a continuing zero-based index in emission order: the section side strips first
(base, then shaft, then capital, each strip a single face), then the bottom cap, then
the top cap, then the base-shaft junction annulus and the shaft-capital junction
annulus. Only surfaces actually emitted advance the index (omitted sections, degenerate
caps, and equal-radius junctions do not). |
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. |
Overrides
TryAttachPrimitiveCollider()
Subclass extension point: when ColliderMode is
MatchingPrimitive, attach the appropriate
primitive collider for this shape and return true. Return false to
let the base class fall back to UnityEngine.MeshCollider.
Declaration
protected override bool TryAttachPrimitiveCollider()
Returns
| Type | Description |
|---|---|
| bool |
|