Creates a new SphericalTriangleSector geometry.
Configuration options.
Protected_Cached bounding volume to prevent re-allocation
Protected_The indices of the geometry for indexed rendering.
Protected_Whether the geometry is purely line-based.
Protected Optional_Optional skinning joints (4 IDs per vertex).
Protected_The normals of the geometry (nx, ny, nz).
Protected_The tangents of the geometry (tx, ty, tz).
Protected_The UV coordinates of the geometry (u, v).
Protected_The vertices of the geometry (x, y, z).
Protected Optional_Optional skinning weights (4 weights per vertex).
Protected_The indices for wireframe rendering.
The central angle (alpha) in radians.
Number of polar segments from pole to equator.
Whether planar faces are omitted.
The sphere radius (r).
Number of azimuth segments along equator.
Protected_Helper method to create an appropriately sized index array. Automatically chooses between 16-bit and 32-bit indices based on vertex count.
The number of indices needed.
A Uint16Array or Uint32Array.
Applies a Matrix4 transformation to all geometry vertices in-place.
The transformation matrix.
this
Computes the normals of the geometry using the current vertices and indices. Averages normals for shared vertices.
Computes the tangents of the geometry based on normals and UVs. Required for normal mapping.
Computes the wireframe indices (line-segments) from the current triangle topology.
ProtectedgenerateGenerates the raw geometry data. Must be implemented by subclasses.
Calculates the equatorial base arc length $a = \alpha \cdot r$.
Returns a bounding volume that encapsulates this geometry.
The bounding volume.
Returns the raw geometry data ready for GPU upload.
The geometry data interface.
Calculates the sum of all flat planar bounding areas (two meridian quarter circles + equator sector). $A_{\text{planar}} = \frac{\pi + \alpha}{2} r^2$.
Calculates the curved spherical triangle surface area $S = \alpha \cdot r^2$.
Calculates the total surface area $A = \frac{3\alpha + \pi}{2} r^2$.
Calculates the enclosed volume $V = \frac{\alpha \cdot r^3}{3}$.
Rotates the geometry vertices around the X-axis in-place.
The rotation angle in radians.
this
Rotates the geometry vertices around the Y-axis in-place.
The rotation angle in radians.
this
Rotates the geometry vertices around the Z-axis in-place.
The rotation angle in radians.
this
Scales the geometry vertices in-place.
The scale factor.
this
A spherical triangle sector geometry (Kugeldreieck-Sektor / spherical triangle pyramid sector).
A wedge-shaped sector cut from a sphere extending from the north pole $(0, r, 0)$ down to the equator $(y=0)$, bounded by two meridian planes intersecting at central angle $\alpha$.
Mathematical formulas:
See
https://rechneronline.de/pi/kugeldreiecksektor.php