Class LightUtil


  • public class LightUtil
    extends java.lang.Object
    • Field Detail

      • formatMaps

        private static final java.util.concurrent.ConcurrentMap<org.apache.commons.lang3.tuple.Pair<VertexFormat,​VertexFormat>,​int[]> formatMaps
      • DEFAULT_FROM

        private static final VertexFormat DEFAULT_FROM
      • DEFAULT_MAPPING

        private static final int[] DEFAULT_MAPPING
    • Constructor Detail

      • LightUtil

        public LightUtil()
    • Method Detail

      • diffuseLight

        public static float diffuseLight​(float x,
                                         float y,
                                         float z)
      • diffuseLight

        public static float diffuseLight​(Direction side)
      • toSide

        public static Direction toSide​(float x,
                                       float y,
                                       float z)
      • unpack

        public static void unpack​(int[] from,
                                  float[] to,
                                  VertexFormat formatFrom,
                                  int v,
                                  int e)
      • pack

        public static void pack​(float[] from,
                                int[] to,
                                VertexFormat formatTo,
                                int v,
                                int e)
      • getLightOffset

        public static int getLightOffset​(int v)
      • setLightData

        public static void setLightData​(BakedQuad q,
                                        int light)