Class LightmappedTriangle
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.texturedpolygon.TexturedTriangle
eu.svjatoslav.sixth.e3d.renderer.raster.gi.LightmappedTriangle
- All Implemented Interfaces:
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.
-
Field Summary
Fields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
shapeId, verticesFields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
cachedBoundingBox, mouseInteractionController -
Constructor Summary
ConstructorsConstructorDescriptionLightmappedTriangle(Point3D a, Point3D b, Point3D c, Color baseColor, double unitsPerTexel, double normalX, double normalY, double normalZ) Creates a lightmapped triangle. -
Method Summary
Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.texturedpolygon.TexturedTriangle
getTexture, isBackfaceCullingEnabled, isPerspectiveCorrectionEnabled, paint, refreshTextureDistance, setBackfaceCulling, setPerspectiveCorrectionEnabled, setTextureMethods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
clippedVertices, getBoundingBox, getBspRank, getScreenXMargin, getScreenYMargin, getZ, getZ, onScreenMaxX, onScreenMaxY, onScreenMinX, onScreenMinY, setBspRank, setZ, transform, translateMethods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
getTransformWeight, invalidateBounds, setMouseInteractionController
-
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 vertexc- third vertexbaseColor- unlit surface colorunitsPerTexel- world units per lightmap texelnormalX- unit normal xnormalY- unit normal ynormalZ- unit normal z
-
-
Method Details
-
getLightmap
Description copied from interface:LightmappedShapeReturns the lightmap for this shape.- Specified by:
getLightmapin interfaceLightmappedShape- Returns:
- the lightmap
-