Skip to content

Instantly share code, notes, and snippets.

@artillect
Created November 28, 2016 04:37
Show Gist options
  • Save artillect/23ce608ff5881553aff6312807d107ea to your computer and use it in GitHub Desktop.
Save artillect/23ce608ff5881553aff6312807d107ea to your computer and use it in GitHub Desktop.
package teamroots.embers.util;
public class StructUV {
public double minU = 0, minV = 0, maxU = 0, maxV = 0;
public StructUV(double minU, double minV, double maxU, double maxV){
this.minU = minU;
this.minV = minV;
this.maxU = maxU;
this.maxV = maxV;
}
public StructUV(double minU, double minV, double maxU, double maxV, double textureWidth, double textureHeight){
this.minU = minU/textureWidth;
this.minV = minV/textureHeight;
this.maxU = maxU/textureWidth;
this.maxV = maxV/textureHeight;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment