Fixed git clone URL
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / shapes / basic / ForwardOrientedTexture.java
index 7f13783..9ec004b 100644 (file)
@@ -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.
-     *
+     * <p>
      * Object rendered visible size on the screen depends on underlying texture size and scale.
-     *
+     * <p>
      * 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);
     }