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=2a312cdfb3abb3d6a4c9f8b58229c2485978d29b;hb=6b39de1e9e80433b78ae731845551e742718d613;hp=30255969312a8589ccdbf73f9097cb981a76d3e4;hpb=03447008b8ee26a6463d2cd03005dc26464863db;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 3025596..2a312cd 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 @@ -1,5 +1,5 @@ /* - * Sixth 3D engine. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Sixth 3D engine. Copyright ©2012-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License @@ -18,8 +18,8 @@ import eu.svjatoslav.sixth.e3d.renderer.raster.texture.TextureBitmap; public class ForwardOrientedTexture extends AbstractCoordinateShape { - public static final double SIZE_MULTIPLIER = 0.005; - public Texture texture; + private static final double SIZE_MULTIPLIER = 0.005; + public final Texture texture; private double scale; public ForwardOrientedTexture(final Point3D point, final double scale, @@ -78,7 +78,7 @@ public class ForwardOrientedTexture extends AbstractCoordinateShape { if (xEnd > targetRenderingArea.width) xEnd = targetRenderingArea.width; - final byte[] targetRenderingAreaBytes = targetRenderingArea.bytes; + final byte[] targetRenderingAreaBytes = targetRenderingArea.pixels; final int textureWidth = textureBitmap.width; @@ -105,4 +105,8 @@ public class ForwardOrientedTexture extends AbstractCoordinateShape { this.scale = scale * SIZE_MULTIPLIER; } + public Point3D getLocation() { + return coordinates[0].coordinate; + } + }