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

    Class HollowTruncatedCone

    A HollowTruncatedCone (Hohlkegelstumpf / Truncated Hollow Cone) geometry.

    A conical frustum with a coaxial inner conical frustum carved out, forming a hollow cone with outer mantle, inner mantle, and two annular circular caps (Kreisringe).

    Mathematical formulas:

    • Outer base radius $R$, Outer top radius $r$
    • Inner base radius $S$, Inner top radius $s$
    • Height $h$
    • Wall thickness: $d = R - S = r - s$ (when uniform)
    • Outer slant height: $m_{\text{outer}} = \sqrt{(R - r)^2 + h^2}$
    • Inner slant height: $m_{\text{inner}} = \sqrt{(S - s)^2 + h^2}$
    • Outer lateral area: $M_{\text{outer}} = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (R + r) m_{\text{outer}}$
    • Inner lateral area: $M_{\text{inner}} = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (S + s) m_{\text{inner}}$
    • Bottom annular cap area: $A_{\text{bottom}} = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (R^2 - S^2)$
    • Top annular cap area: $A_{\text{top}} = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (r^2 - s^2)$
    • Total surface area: $A = M_{\text{outer}} + M_{\text{inner}} + A_{\text{bottom}} + A_{\text{top}}$
    • Volume: $V = \frac{\theta_{\text{len}}}{2\pi} \cdot \frac{\pi h}{3} (R^2 + R r + r^2 - S^2 - S s - s^2)$
    • 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.

    height: number

    Total height (h).

    heightSegments: number

    Number of height subdivisions.

    innerRadiusBottom: number

    Inner radius at the bottom base (S).

    innerRadiusTop: number

    Inner radius at the top cap (s).

    openEnded: boolean

    Whether the cone ends are open (no caps).

    outerRadiusBottom: number

    Outer radius at the bottom base (R).

    outerRadiusTop: number

    Outer radius at the top cap (r).

    radialSegments: number

    Number of radial subdivisions.

    thetaLength: number

    Central angle in radians.

    thetaStart: number

    Start angle in radians.

    • 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 bottom base annular cap area $A_{\text{bottom}} = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (R^2 - S^2)$.

      Returns number

    • Calculates the top cap annular area $A_{\text{top}} = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (r^2 - s^2)$.

      Returns number

    • Calculates the volume $V = \frac{\theta_{\text{len}}}{2\pi} \cdot \frac{\pi h}{3} (R^2 + R r + r^2 - S^2 - S s - s^2)$.

      Returns number