Class TexturedPolygon
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.TexturedPolygon
Textured polygon.
This is how perspective-correct texture rendering is implemented: If polygon is sufficiently small, it is rendered without perspective correction. Otherwise, it is sliced into smaller polygons.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIftruethen polygon borders will be drawn.final TextureFields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
coordinates, onScreenZ, shapeIdFields inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
mouseInteractionController -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidpaint(RenderingContext renderBuffer) Paints this shape onto the rendering context's pixel buffer.voidsetBackfaceCulling(boolean backfaceCulling) Methods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape
getZ, transformMethods inherited from class eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape
setMouseInteractionController
-
Field Details
-
texture
-
showBorders
public boolean showBordersIftruethen polygon borders will be drawn. It is used for debugging purposes.
-
-
Constructor Details
-
TexturedPolygon
-
-
Method Details
-
paint
Description copied from class:AbstractCoordinateShapePaints this shape onto the rendering context's pixel buffer.This method is called after all shapes have been transformed and sorted by depth. Implementations should use the transformed screen-space coordinates from
Vertex.transformedCoordinateto draw pixels.- Specified by:
paintin classAbstractCoordinateShape- Parameters:
renderBuffer- the rendering context containing the pixel buffer and graphics context
-
isBackfaceCullingEnabled
public boolean isBackfaceCullingEnabled() -
setBackfaceCulling
public void setBackfaceCulling(boolean backfaceCulling)
-