X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Fraster%2Fshapes%2Fbasic%2FForwardOrientedTexture.java;h=9ec004b7fcdb5e7e48b52d8e6ca3766ba4e27b89;hb=HEAD;hp=7f13783befff475873e0873ceeaca87bc1bc41c8;hpb=24e68b2f99037dec8a3442030dcb15013c930652;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/ForwardOrientedTexture.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/ForwardOrientedTexture.java index 7f13783..9ec004b 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/ForwardOrientedTexture.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/basic/ForwardOrientedTexture.java @@ -7,10 +7,14 @@ package eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic; import eu.svjatoslav.sixth.e3d.geometry.Point2D; import eu.svjatoslav.sixth.e3d.geometry.Point3D; import eu.svjatoslav.sixth.e3d.gui.RenderingContext; +import eu.svjatoslav.sixth.e3d.math.Vertex; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractCoordinateShape; import eu.svjatoslav.sixth.e3d.renderer.raster.texture.Texture; import eu.svjatoslav.sixth.e3d.renderer.raster.texture.TextureBitmap; +/** + * Texture object that is always oriented towards the viewer. + */ public class ForwardOrientedTexture extends AbstractCoordinateShape { private static final double SCALE_MULTIPLIER = 0.005; @@ -18,9 +22,9 @@ public class ForwardOrientedTexture extends AbstractCoordinateShape { /** * Scale of the texture object. - * + *

* Object rendered visible size on the screen depends on underlying texture size and scale. - * + *

* 0 means that object will be infinitely small. * 1 in recommended value to maintain sharpness of the texture as seen by the viewer. */ @@ -28,7 +32,7 @@ public class ForwardOrientedTexture extends AbstractCoordinateShape { public ForwardOrientedTexture(final Point3D point, final double scale, final Texture texture) { - super(point); + super(new Vertex(point)); this.texture = texture; setScale(scale); }