Class LightmappedTriangle

All Implemented Interfaces:
LightmappedShape

public class LightmappedTriangle extends TexturedTriangle implements LightmappedShape
A textured triangle whose texture is a GI-generated lightmap composite (baseColor x lighting). UVs are fixed at (0,0), (width,0), (0,height) (engine UVs are in texture pixel units): the whole triangle is covered by its own lightmap, valid region u+v <= 1 in normalized coordinates.

Shading via LightingManager does not apply — all light (ambient, direct with shadows, indirect) lives in the composite texture, which the GI system regenerates and swaps in every few sweeps.

  • Constructor Details

    • LightmappedTriangle

      public LightmappedTriangle(Point3D a, Point3D b, Point3D c, Color baseColor, double unitsPerTexel, double normalX, double normalY, double normalZ)
      Creates a lightmapped triangle.
      Parameters:
      a - first vertex (shared coordinate reference is fine)
      b - second vertex
      c - third vertex
      baseColor - unlit surface color
      unitsPerTexel - world units per lightmap texel
      normalX - unit normal x
      normalY - unit normal y
      normalZ - unit normal z
  • Method Details