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

    Class CylindricalArch

    A CylindricalArch (Zylinderbogen / Rohrbogen / Curved Pipe Elbow) geometry.

    A curved solid cylinder segment forming a quarter torus (or customizable angular torus sector) used to connect two perpendicular cylindrical pipes smoothly.

    Mathematical formulas:

    • Pipe cross-section radius: $r$
    • Inner bend radius: $a$
    • Major torus radius: $R = a + r$
    • Sweep angle: $\theta_{\text{arc}}$ (defaults to $\pi / 2 = 90^\circ$)
    • Mantle surface area: $M = \frac{\theta_{\text{arc}}}{2\pi} \cdot (4\pi^2 R r) = 2\pi \theta_{\text{arc}} (a + r) r = \pi^2 (a + r) r$ (for $90^\circ$)
    • Total surface area: $A = M + 2\pi r^2 = \pi^2 (a + r) r + 2\pi r^2$
    • Volume: $V = \frac{\theta_{\text{arc}}}{2\pi} \cdot (2\pi^2 R r^2) = \pi \theta_{\text{arc}} (a + r) r^2 = \frac{1}{2} \pi^2 (a + r) r^2$ (for $90^\circ$)
    • Surface-to-volume ratio: $A / V$

    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.

    arcAngle: number

    Sweep angle in radians (theta).

    arcSegments: number

    Number of subdivisions along bend arc.

    bendRadius: number

    Inner bend radius (a).

    openEnded: boolean

    Whether pipe ends are open (no caps).

    pipeRadius: number

    Pipe cross-section radius (r).

    radialSegments: number

    Number of subdivisions around pipe circumference.

    • 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 circular cap area of a single pipe end $A_{\text{cap}} = \pi r^2$.

      Returns number

    • Calculates the curved mantle surface area $M = 2\pi \cdot \theta_{\text{arc}} (a + r) r$.

      Returns number

    • Calculates the total surface area $A = M + 2\pi r^2$ (or $M$ if openEnded).

      Returns number