本文整理匯總了Java中com.badlogic.gdx.graphics.g2d.TextureRegion.getU方法的典型用法代碼示例。如果您正苦於以下問題:Java TextureRegion.getU方法的具體用法?Java TextureRegion.getU怎麽用?Java TextureRegion.getU使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.graphics.g2d.TextureRegion
的用法示例。
在下文中一共展示了TextureRegion.getU方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createMaxX
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMaxX(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light, float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例2: createMinZ
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinZ(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light, float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例3: createMinXMaxZ
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinXMaxZ(Vector3 offset, TextureRegion region, int x, int y, int z, int light, float[] vertices, int vertexOffset, boolean ao) {
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
return vertexOffset;
}
示例4: createMinZMaxXStretched
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinZMaxXStretched(Vector3 offset, TextureRegion region, int x, int y, int z, int light, float[] vertices, int vertexOffset, boolean ao) {
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
return vertexOffset;
}
示例5: createMaxY
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMaxY(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light, float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例6: createMinX
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinX(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light, float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例7: createMaxXMinZ
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMaxXMinZ(Vector3 offset, TextureRegion region, int x, int y, int z, int light, float[] vertices, int vertexOffset, boolean ao) {
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
return vertexOffset;
}
示例8: createMaxY
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMaxY(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light,
float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例9: createMinZMaxX
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinZMaxX(Vector3 offset, TextureRegion region, int x, int y, int z, int light, float[] vertices, int vertexOffset, boolean ao) {
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
return vertexOffset;
}
示例10: createMinX
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinX(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light,
float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minX;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例11: createMaxZ
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMaxZ(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light,
float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + maxZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + maxZ;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例12: createMinY
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinY(Vector3 offset, TextureRegion region, TextureRegion ao, int x, int y, int z, int light, float[] vertices, int vertexOffset) {
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light + minY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU2();
vertices[vertexOffset++] = ao.getV2();
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light + minY;
if (ao != null) {
vertices[vertexOffset++] = ao.getU();
vertices[vertexOffset++] = ao.getV2();
}
return vertexOffset;
}
示例13: createMaxZMinX
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMaxZMinX(Vector3 offset, TextureRegion region, int x, int y, int z, int light, float[] vertices, int vertexOffset, boolean ao) {
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + max;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + max;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + min;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + min;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light ;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
return vertexOffset;
}
示例14: set
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public void set (TextureRegion region) {
u = region.getU();
u2 = region.getU2();
v = region.getV();
v2 = region.getV2();
}
示例15: createMinXMaxZStretched
import com.badlogic.gdx.graphics.g2d.TextureRegion; //導入方法依賴的package包/類
public static int createMinXMaxZStretched(Vector3 offset, TextureRegion region, int x, int y, int z, int light, float[] vertices, int vertexOffset, boolean ao) {
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y + 1;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x + 1;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z + 1;
vertices[vertexOffset++] = region.getU();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
vertices[vertexOffset++] = offset.x + x;
vertices[vertexOffset++] = offset.y + y;
vertices[vertexOffset++] = offset.z + z;
vertices[vertexOffset++] = region.getU2();
vertices[vertexOffset++] = region.getV2();
vertices[vertexOffset++] = light;
if (ao) {
vertices[vertexOffset++] = 0;
vertices[vertexOffset++] = 0;
}
return vertexOffset;
}