Class ScyllaWallWithDoorShape
Parametric wall with a rectangular door cutout that reaches the floor. The wall is centered at the origin (X = length, Y = height, Z = thickness); the door is centered horizontally at DoorOffsetX with the given DoorWidth and DoorHeight. The cutout passes through the wall's full thickness.
Inheritance
Inherited Members
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/Geometry/Wall With Door")]
public sealed class ScyllaWallWithDoorShape : ScyllaShapeBase3D
Remarks
Topology: the wall's six outer faces are split where the cutout intersects them, producing up to three sub-quads on the front and back faces (left jamb, right jamb, lintel), two sub-quads on the bottom face (left of door, right of door - the door reaches the floor so the section under the door is missing), and the left end, right end, and top face are single quads. Three additional quads form the interior of the cutout (left jamb inside, right jamb inside, lintel underside) so a viewer standing in the doorway sees solid walls on all visible sides.
Degenerate sub-quads (zero-width jambs when the door is flush against a wall end,
zero-height lintel when the door reaches the ceiling) are silently skipped. This
makes the shape robust to the full range of DoorWidth /
DoorHeight / DoorOffsetX values without runtime
exceptions. Door dimensions are clamped at build time: DoorWidth to
[0, WallLength], DoorHeight to [0, WallHeight],
DoorOffsetX so the door fits within the wall.
No bevel in v1 - cutouts and bevels interact non-trivially. For a beveled wall without a door cutout, use ScyllaWallShape.
Properties
DoorHeight
Height of the door cutout along the Y axis in world units. The door's bottom edge is
always flush with the floor (Y = -WallHeight * 0.5). Clamped to
[0, WallHeight] at build time. Setting this property triggers an
immediate mesh rebuild via Rebuild().
Declaration
public float DoorHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
DoorOffsetX
Horizontal offset of the door's center from the wall's center along the X axis in world units. Clamped at build time so the door's left and right edges stay within the wall's extents. Setting this property triggers an immediate mesh rebuild via Rebuild().
Declaration
public float DoorOffsetX { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
DoorWidth
Width of the door cutout along the X axis in world units. Clamped to
[0, WallLength] at build time. Setting this property triggers an
immediate mesh rebuild via Rebuild().
Declaration
public float DoorWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
WallHeight
Wall extent along the Y axis in world units. Controls the wall's standing height. Setting this property triggers an immediate mesh rebuild via Rebuild().
Declaration
public float WallHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
WallLength
Wall extent along the X axis in world units. Controls how long the wall is. Setting this property triggers an immediate mesh rebuild via Rebuild().
Declaration
public float WallLength { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
WallThickness
Wall extent along the Z axis in world units. Controls how deep (thick) the wall slab is perpendicular to its face. Setting this property triggers an immediate mesh rebuild via Rebuild().
Declaration
public float WallThickness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Build(Mesh, float, float, float, float, float, float, IFaceColorResolver)
Populates target with a parametric wall-with-door mesh. Existing mesh
data is overwritten. All door parameters are clamped at build time so the cutout always
fits within the wall (see the class remarks for the full topology description).
Declaration
public static void Build(Mesh target, float wallLength, float wallHeight, float wallThickness, float doorWidth, float doorHeight, float doorOffsetX, IFaceColorResolver resolver = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | Destination mesh to populate. Must be non-null. |
| float | wallLength | Wall extent along the X axis in world units. |
| float | wallHeight | Wall extent along the Y axis in world units. |
| float | wallThickness | Wall extent along the Z axis in world units. |
| float | doorWidth | Width of the door cutout along the X axis in world units. Clamped to
[ |
| float | doorHeight | Height of the door cutout along the Y axis in world units. The door's bottom edge is flush
with the wall floor. Clamped to [ |
| float | doorOffsetX | Horizontal offset of the door's center from the wall's center along the X axis in world units. Clamped so the door's left and right edges remain within the wall's extents. |
| IFaceColorResolver | resolver | Optional per-face color resolver. When non-null, a per-vertex color channel is emitted
with one solid color per emitted quad. The face count is at most |
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 |
|