Small World Engine API Reference - v0.78.00
    Preparing search index...

    Class Arch

    A Roman bridge arch geometry (Bogen / Rundbogen).

    A rectangular masonry block of span length $l$, height $h$, and depth $t$, with a semicircular arch vault tunnel of radius $r$ cut out at the bottom.

    Mathematical formulas:

    • Front / back face area: $A_{\text{face}} = h l - \frac{\pi r^2}{2}$
    • Intrados (vault tunnel ceiling) area: $A_{\text{intrados}} = \pi r t$
    • Outer boundary area: $A_{\text{outer}} = 2t(l + h - r)$
    • Total surface area: $A = 2(h l - \frac{\pi r^2}{2}) + \pi r t + 2t(l + h - r)$
    • Volume: $V = (h l - \frac{\pi r^2}{2}) t$

    Hierarchy (View Summary)

    Index
    _cachedBoundingVolume: BoundingVolume | undefined = undefined

    Cached bounding volume to prevent re-allocation

    _indices:
        | Uint16Array<ArrayBufferLike>
        | Uint32Array<ArrayBufferLike>
        | undefined = undefined

    The indices of the geometry for indexed rendering.

    _isLineGeometry: boolean = false

    Whether the geometry is purely line-based.

    _joints?: Float32Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> = undefined

    Optional skinning joints (4 IDs per vertex).

    _normals: Float32Array = ...

    The normals of the geometry (nx, ny, nz).

    _tangents: Float32Array = ...

    The tangents of the geometry (tx, ty, tz).

    _uvs: Float32Array = ...

    The UV coordinates of the geometry (u, v).

    _vertices: Float32Array = ...

    The vertices of the geometry (x, y, z).

    _weights?: Float32Array<ArrayBufferLike> = undefined

    Optional skinning weights (4 weights per vertex).

    _wireframeIndices:
        | Uint16Array<ArrayBufferLike>
        | Uint32Array<ArrayBufferLike>
        | undefined = undefined

    The indices for wireframe rendering.

    depth: number

    Extrusion depth along Z (t).

    height: number

    Total height along Y (h).

    length: number

    Total span length along X (l).

    radialSegments: number

    Number of subdivisions along the arch curve.

    radius: number

    Radius of the semicircular arch cutout (r).

    • Helper method to create an appropriately sized index array. Automatically chooses between 16-bit and 32-bit indices based on vertex count.

      Parameters

      • indexCount: number

        The number of indices needed.

      Returns Uint16Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>

      A Uint16Array or Uint32Array.

    • Calculates the cross-sectional front / back face area $A_{\text{face}} = h l - \frac{\pi r^2}{2}$.

      Returns number

    • Calculates the curved intrados (inner vault tunnel) area $A_{\text{intrados}} = \pi r t$.

      Returns number

    • Calculates the total surface area $A = 2 A_{\text{face}} + A_{\text{intrados}} + 2t(l + h - r)$.

      Returns number

    • Calculates the volume $V = A_{\text{face}} \cdot t = \left( h l - \frac{\pi r^2}{2} \right) t$.

      Returns number