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_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_The indices for wireframe rendering.
The first vertex position.
The second vertex position.
The third vertex position.
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.
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 simple triangle geometry defined by three points.