public class MutableQuad
extends java.lang.Object
BakedQuad
. This provides a variety of methods to quickly
set or get different elements. This currently holds 4 MutableVertex
.Modifier and Type | Field and Description |
---|---|
static MutableQuad[] |
EMPTY_ARRAY |
MutableVertex |
vertex_0 |
MutableVertex |
vertex_1 |
MutableVertex |
vertex_2 |
MutableVertex |
vertex_3 |
Constructor and Description |
---|
MutableQuad() |
MutableQuad(int tintIndex,
net.minecraft.util.EnumFacing face) |
MutableQuad(int tintIndex,
net.minecraft.util.EnumFacing face,
boolean shade) |
MutableQuad(MutableQuad from) |
Modifier and Type | Method and Description |
---|---|
MutableQuad |
colourf(float r,
float g,
float b,
float a) |
MutableQuad |
colouri(int rgba) |
MutableQuad |
colouri(int r,
int g,
int b,
int a) |
MutableQuad |
colourvf(javax.vecmath.Tuple4f vec) |
MutableQuad |
colourvl(VecLong vec) |
MutableQuad |
copyAndInvertNormal()
Inverts a copy of this quad's normal so that it will render in the opposite direction.
|
MutableQuad |
copyFrom(MutableQuad from) |
static float |
diffuseLight(float x,
float y,
float z) |
static float |
diffuseLight(javax.vecmath.Vector3f normal) |
MutableQuad |
fromBakedBlock(net.minecraft.client.renderer.block.model.BakedQuad quad) |
MutableQuad |
fromBakedItem(net.minecraft.client.renderer.block.model.BakedQuad quad) |
float |
getCalculatedDiffuse() |
javax.vecmath.Vector3f |
getCalculatedNormal() |
net.minecraft.util.EnumFacing |
getFace() |
net.minecraft.client.renderer.texture.TextureAtlasSprite |
getSprite() |
int |
getTint() |
boolean |
isShade() |
MutableQuad |
lightf(float block,
float sky) |
MutableQuad |
lighti(int combined) |
MutableQuad |
lighti(int block,
int sky) |
MutableQuad |
lightvf(javax.vecmath.Tuple2f vec) |
MutableQuad |
maxLighti(int block,
int sky)
Sets the current light value of every vertex to be the maximum of the given in value, and the current value
|
MutableQuad |
multColourd(double by) |
MutableQuad |
multColourd(double r,
double g,
double b,
double a) |
MutableQuad |
multColouri(int by) |
MutableQuad |
multColouri(int r,
int g,
int b,
int a) |
MutableQuad |
multShade()
Multiplies every vertex by
diffuseLight(float, float, float) for the normal, if isShade()
returns true. |
MutableQuad |
normald(double x,
double y,
double z)
Sets the normal for all vertices to the specified double coordinates.
|
MutableQuad |
normalf(float x,
float y,
float z)
Sets the normal for all vertices to the specified float coordinates.
|
net.minecraft.util.math.Vec3d |
normalvd() |
MutableQuad |
normalvd(net.minecraft.util.math.Vec3d vec)
Sets the normal for all vertices to the specified
Vec3d . |
MutableQuad |
normalvd(VecDouble vec)
Sets the normal for all vertices to the specified
VecDouble , using
VecDouble.a ,VecDouble.b , and VecDouble.c |
javax.vecmath.Vector3f |
normalvf() |
MutableQuad |
normalvf(javax.vecmath.Vector3f vec)
Sets the normal for all vertices to the specified
Vector3f . |
void |
render(net.minecraft.client.renderer.BufferBuilder bb) |
MutableQuad |
rotate(net.minecraft.util.EnumFacing from,
net.minecraft.util.EnumFacing to,
float ox,
float oy,
float oz) |
void |
rotateDirectlyX(float cos,
float sin) |
void |
rotateDirectlyY(float cos,
float sin) |
void |
rotateDirectlyZ(float cos,
float sin) |
MutableQuad |
rotateTextureUp(int times) |
MutableQuad |
rotateX_180() |
MutableQuad |
rotateX_90(float scale) |
void |
rotateX(float angle) |
MutableQuad |
rotateY_180() |
MutableQuad |
rotateY_90(float scale) |
void |
rotateY(float angle) |
MutableQuad |
rotateZ_180() |
MutableQuad |
rotateZ_90(float scale) |
void |
rotateZ(float angle) |
MutableQuad |
scaled(double scale) |
MutableQuad |
scaled(double x,
double y,
double z) |
MutableQuad |
scalef(float scale) |
MutableQuad |
scalef(float x,
float y,
float z) |
void |
setCalculatedDiffuse() |
void |
setCalculatedNormal() |
void |
setDiffuse(javax.vecmath.Vector3f normal) |
MutableQuad |
setFace(net.minecraft.util.EnumFacing face) |
void |
setShade(boolean shade) |
void |
setSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) |
MutableQuad |
setTint(int tint) |
MutableQuad |
texFromSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) |
net.minecraft.client.renderer.block.model.BakedQuad |
toBakedBlock() |
net.minecraft.client.renderer.block.model.BakedQuad |
toBakedItem() |
java.lang.String |
toString() |
MutableQuad |
transform(javax.vecmath.Matrix4f transformation) |
MutableQuad |
translated(double x,
double y,
double z) |
MutableQuad |
translatef(float x,
float y,
float z) |
MutableQuad |
translatei(int x,
int y,
int z) |
MutableQuad |
translatevd(net.minecraft.util.math.Vec3d vec) |
MutableQuad |
translatevf(javax.vecmath.Vector3f vec) |
MutableQuad |
translatevi(net.minecraft.util.math.Vec3i vec) |
public static final MutableQuad[] EMPTY_ARRAY
public final MutableVertex vertex_0
public final MutableVertex vertex_1
public final MutableVertex vertex_2
public final MutableVertex vertex_3
public MutableQuad()
public MutableQuad(int tintIndex, net.minecraft.util.EnumFacing face)
public MutableQuad(int tintIndex, net.minecraft.util.EnumFacing face, boolean shade)
public MutableQuad(MutableQuad from)
public MutableQuad copyFrom(MutableQuad from)
public MutableQuad setTint(int tint)
public int getTint()
public MutableQuad setFace(net.minecraft.util.EnumFacing face)
public net.minecraft.util.EnumFacing getFace()
public void setShade(boolean shade)
public boolean isShade()
public void setSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
public net.minecraft.client.renderer.texture.TextureAtlasSprite getSprite()
public net.minecraft.client.renderer.block.model.BakedQuad toBakedBlock()
public net.minecraft.client.renderer.block.model.BakedQuad toBakedItem()
public MutableQuad fromBakedBlock(net.minecraft.client.renderer.block.model.BakedQuad quad)
public MutableQuad fromBakedItem(net.minecraft.client.renderer.block.model.BakedQuad quad)
public void render(net.minecraft.client.renderer.BufferBuilder bb)
public javax.vecmath.Vector3f getCalculatedNormal()
public void setCalculatedNormal()
public static float diffuseLight(javax.vecmath.Vector3f normal)
public static float diffuseLight(float x, float y, float z)
public float getCalculatedDiffuse()
public void setDiffuse(javax.vecmath.Vector3f normal)
public void setCalculatedDiffuse()
public MutableQuad copyAndInvertNormal()
public MutableQuad rotateTextureUp(int times)
public MutableQuad normalf(float x, float y, float z)
public MutableQuad normald(double x, double y, double z)
public MutableQuad normalvf(javax.vecmath.Vector3f vec)
Vector3f
.public MutableQuad normalvd(net.minecraft.util.math.Vec3d vec)
Vec3d
.public MutableQuad normalvd(VecDouble vec)
VecDouble
, using
VecDouble.a
,VecDouble.b
, and VecDouble.c
public javax.vecmath.Vector3f normalvf()
Vector3f
with the normal of the first vertex. Only useful if the normal is expected to be
the same for every vertex.public net.minecraft.util.math.Vec3d normalvd()
Vec3d
with the normal of the first vertex. Only useful if the normal is expected to be the
same for every vertex.public MutableQuad colouri(int r, int g, int b, int a)
public MutableQuad colouri(int rgba)
public MutableQuad colourf(float r, float g, float b, float a)
public MutableQuad colourvl(VecLong vec)
public MutableQuad colourvf(javax.vecmath.Tuple4f vec)
public MutableQuad multColourd(double r, double g, double b, double a)
public MutableQuad multColourd(double by)
public MutableQuad multColouri(int by)
public MutableQuad multColouri(int r, int g, int b, int a)
public MutableQuad multShade()
diffuseLight(float, float, float)
for the normal, if isShade()
returns true. Also sets isShade()
to false.public MutableQuad texFromSprite(net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
public MutableQuad lighti(int block, int sky)
public MutableQuad lighti(int combined)
public MutableQuad lightf(float block, float sky)
public MutableQuad lightvf(javax.vecmath.Tuple2f vec)
public MutableQuad maxLighti(int block, int sky)
public MutableQuad transform(javax.vecmath.Matrix4f transformation)
public MutableQuad translatei(int x, int y, int z)
public MutableQuad translatef(float x, float y, float z)
public MutableQuad translated(double x, double y, double z)
public MutableQuad translatevi(net.minecraft.util.math.Vec3i vec)
public MutableQuad translatevf(javax.vecmath.Vector3f vec)
public MutableQuad translatevd(net.minecraft.util.math.Vec3d vec)
public MutableQuad scalef(float scale)
public MutableQuad scaled(double scale)
public MutableQuad scalef(float x, float y, float z)
public MutableQuad scaled(double x, double y, double z)
public void rotateX(float angle)
public void rotateY(float angle)
public void rotateZ(float angle)
public void rotateDirectlyX(float cos, float sin)
public void rotateDirectlyY(float cos, float sin)
public void rotateDirectlyZ(float cos, float sin)
public MutableQuad rotate(net.minecraft.util.EnumFacing from, net.minecraft.util.EnumFacing to, float ox, float oy, float oz)
public MutableQuad rotateX_90(float scale)
public MutableQuad rotateY_90(float scale)
public MutableQuad rotateZ_90(float scale)
public MutableQuad rotateX_180()
public MutableQuad rotateY_180()
public MutableQuad rotateZ_180()
public java.lang.String toString()
toString
in class java.lang.Object