Module gpuFlux

Class FluxCurveLight


public class FluxCurveLight extends FluxLight
GPU serialiser for the CurveLight line-segment / curve light.

Serialisation layout (matches curvelight.h CurveLight struct):

   Light base                  (type = LIGHT_CURVE)
   float exponent
   float openingAngleStart     (radians)
   float openingAngleSector    (radians, sector width = end − start)
   float sectorSoftness        (radians, smooth falloff zone at each sector edge)
   int   numPoints             (= FLUX_N + 1 = 17, or 2 for straight tube)
   float arcLengthWorld        (total world-space arc length in metres)
   float arcLengthCdf[17]      (normalised CDF; cdf[0]=0, cdf[numPoints-1]=1)
   Vec3  points[17]            (world-space polyline positions)
   Vec3  tangents[17]          (world-space unit tangents)
 

When CurveLight.getCurve() is non-null, the polyline is built via CurveLight.buildCurvePolyline(int, float[], float[]) (64 segments = 17 points). For a straight tube (curve == null) only 2 points are used.

Author:
MH at YNL 2026