From ac3a7c7668000c64284b4a271fff4608b9e233ac Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 5 Sep 2018 10:46:19 +0200 Subject: [PATCH] Document flipFace() behaviour --- .../com/minelittlepony/util/render/Quad.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/main/java/com/minelittlepony/util/render/Quad.java b/src/main/java/com/minelittlepony/util/render/Quad.java index ff57921e..217ac3ae 100644 --- a/src/main/java/com/minelittlepony/util/render/Quad.java +++ b/src/main/java/com/minelittlepony/util/render/Quad.java @@ -7,4 +7,31 @@ public class Quad extends TexturedQuad { Quad(Vertex[] vertices, int texcoordU1, int texcoordV1, int texcoordU2, int texcoordV2, float textureWidth, float textureHeight) { super(vertices, texcoordU1, texcoordV1, texcoordU2, texcoordV2, textureWidth, textureHeight); } + + /** + * Reverses the order of the vertices belonging to this quad. + * Positions of the vertices stay the same but the order of rendering is reversed to go counter-clockwise. + * + * Reversal also affects the cross-product used to calculate texture orientation. + *
+     * Normal:
+     * 0-----1
+     * |\    |
+     * |  \  |
+     * |    \|
+     * 3-----2
+     *
+     * After flipFace:
+     *
+     * 3-----2
+     * |    /|
+     * |  /  |
+     * |/    |
+     * 0-----1
+     * 
+ */ + @Override + public void flipFace() { + super.flipFace(); + } } \ No newline at end of file