Creates a new HollowCylinder 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 total height (h).
The number of height subdivisions.
Whether the cylinder ends are open (no caps).
The number of radial subdivisions.
The inner radius (r2).
The outer radius (r1).
The central angle in radians.
The start angle in radians.
Gets the inner radius (r2).
Sets the inner radius (r2).
Gets the outer radius (r1).
Sets the outer radius (r1).
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.
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 lateral / mantle surface area $M = \frac{\theta_{\text{len}}}{2\pi} \cdot 2\pi (r_1 + r_2) h$.
Calculates the total surface area $A$.
Calculates the volume $V = \frac{\theta_{\text{len}}}{2\pi} \cdot \pi (r_1^2 - r_2^2) h$.
Calculates the wall thickness $b = r_1 - r_2$.
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 hollow cylinder geometry (Hohlzylinder / cylindrical shell / pipe).
Implements exact geometry generation for hollow cylinders with distinct surface normals for the outer wall, inner wall, top annular cap, bottom annular cap, and optional cut-plane end caps for partial sectors (thetaLength < 2π).
Mathematical formulas:
See
https://rechneronline.de/pi/hohlzylinder.php