Class ForwardOrientedTexture
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.ForwardOrientedTexture
- Direct Known Subclasses:
ForwardOrientedTextBlock,GlowingPoint
Base class for textures always facing the viewer.
This class implements the "billboard" rendering technique where the texture remains oriented towards the camera regardless of 3D position. The visible size is calculated based on distance from viewer (z-coordinate) and scale factor.
The texture mapping algorithm: 1. Calculates screen coverage based on perspective 2. Clips to viewport boundaries 3. Maps texture pixels to screen pixels using proportional scaling
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidpaint(RenderingContext targetRenderingArea) Paint the texture on the screen (targetRenderingArea)voidsetScale(double scale) Set the scale of the textureMethods 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
-
-
Constructor Details
-
ForwardOrientedTexture
-
-
Method Details
-
paint
Paint the texture on the screen (targetRenderingArea)- Specified by:
paintin classAbstractCoordinateShape- Parameters:
targetRenderingArea- the screen to paint on
-
setScale
public void setScale(double scale) Set the scale of the texture- Parameters:
scale- the scale of the texture
-
getLocation
-