public class Face extends java.lang.Object implements ITransformable.Translate, ITransformable.Rotate
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
name
Name of this
Face. |
protected RenderParameters |
params
RenderParameters for this Face. |
protected Vertex[] |
vertexes
|
| Constructor and Description |
|---|
Face(Face face)
Instantiates a new
Face. |
Face(Face face,
RenderParameters params)
Instantiates a new
Face. |
Face(java.util.List<Vertex> vertexes)
Instantiates a new
Face. |
Face(Vertex... vertexes)
Instantiates a new
Face. |
Face(Vertex[] vertexes,
RenderParameters params)
Instantiates a new
Face. |
| Modifier and Type | Method and Description |
|---|---|
int[][][] |
calculateAoMatrix(net.minecraft.util.EnumFacing offset)
Automatically calculate AoMatrix for this
Face. |
void |
calculateNormal()
Calculates the normal of this
Face based on the vertex coordinates. |
Vector |
calculateNormal(Vector[] normals)
Calculates normal of this
Face using the vertex normals provided. |
void |
deductParameters()
Deducts the parameters for this
Face based on the calculated normal. |
void |
deductParameters(Vector[] normals)
Deducts the
RenderParameters for this Face based on the specified normals |
RenderParameters |
getParameters()
Gets the
RenderParameters of this Face. |
Vertex[] |
getVertexes()
|
java.util.List<Vertex> |
getVertexes(java.lang.String name)
Gets a list of
Vertex with a base name containing name. |
Vector[] |
getVertexNormals()
Gets the vertexes normals for this
Face. |
Face |
interpolateUV()
Interpolate UVs according to the
Face position in the block space. |
java.lang.String |
name()
Gets the base name of this
Face. |
static java.lang.String |
nameFromDirection(net.minecraft.util.EnumFacing dir)
Gets a
Face name from a EnumFacing. |
void |
rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ) |
void |
rotateAroundX(double angle) |
void |
rotateAroundX(double angle,
double centerX,
double centerY,
double centerZ) |
void |
rotateAroundY(double angle) |
void |
rotateAroundY(double angle,
double centerX,
double centerY,
double centerZ) |
void |
rotateAroundZ(double angle) |
void |
rotateAroundZ(double angle,
double centerX,
double centerY,
double centerZ) |
void |
scale(float f) |
void |
scale(float f,
float offset) |
void |
scale(float fx,
float fy,
float fz) |
void |
scale(float fx,
float fy,
float fz,
float offsetX,
float offsetY,
float offsetZ) |
Face |
setAlpha(int alpha)
Sets the alpha for this
Face. |
Face |
setBrightness(int brightness)
Sets the brightness for this
Face. |
Face |
setColor(int color)
Sets the color for this
Face. |
void |
setName(java.lang.String name)
Sets the base name for this
Face. |
Face |
setParameters(RenderParameters params)
Sets the
RenderParameters for this Face. |
Face |
setStandardUV()
Sets standard UVs for this
Face. |
Face |
setTexture(Icon icon)
|
Face |
setTexture(Icon icon,
boolean flippedU,
boolean flippedV,
boolean interpolate)
|
java.lang.String |
toString() |
void |
translate(float x,
float y,
float z) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitrotateprotected java.lang.String name
Face.protected Vertex[] vertexes
protected RenderParameters params
RenderParameters for this Face.public Face(Vertex[] vertexes, RenderParameters params)
Face.vertexes - the vertexesparams - the paramspublic Face(java.util.List<Vertex> vertexes)
Face.vertexes - the vertexespublic Face(Face face, RenderParameters params)
Face.face - the faceparams - the paramspublic void setName(java.lang.String name)
Face. If the name specified is null, it is automatically determined based on the Vertex
positions.name - the base namepublic java.lang.String name()
Face.public Vertex[] getVertexes()
public java.util.List<Vertex> getVertexes(java.lang.String name)
Vertex with a base name containing name.name - the namepublic Face setParameters(RenderParameters params)
RenderParameters for this Face.params - the parameters. If null, sets default parametersFacepublic RenderParameters getParameters()
RenderParameters of this Face.public Face setColor(int color)
Face.color - the colorpublic Face setAlpha(int alpha)
Face.alpha - the alphapublic Face setBrightness(int brightness)
Face.brightness - the brightnesspublic Face setStandardUV()
Face. Sets UVs from 0 to 1 if this face has 4 vertexes.public Face interpolateUV()
Face position in the block space.public Face setTexture(Icon icon, boolean flippedU, boolean flippedV, boolean interpolate)
icon - the iconflippedU - whether to mirror the texture horizontallyflippedV - whether to mirror the texture verticallyinterpolate - whether to interpolate the UVs based on the face position in the block space.public void translate(float x,
float y,
float z)
translate in interface ITransformable.Translatepublic void scale(float f)
public void scale(float f,
float offset)
public void scale(float fx,
float fy,
float fz)
public void scale(float fx,
float fy,
float fz,
float offsetX,
float offsetY,
float offsetZ)
public void rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
rotate in interface ITransformable.Rotatepublic void rotateAroundX(double angle)
public void rotateAroundX(double angle,
double centerX,
double centerY,
double centerZ)
public void rotateAroundY(double angle)
public void rotateAroundY(double angle,
double centerX,
double centerY,
double centerZ)
public void rotateAroundZ(double angle)
public void rotateAroundZ(double angle,
double centerX,
double centerY,
double centerZ)
public int[][][] calculateAoMatrix(net.minecraft.util.EnumFacing offset)
Face. Only works for regular N/S/E/W/T/B facesoffset - the offsetpublic Vector[] getVertexNormals()
Face.public void calculateNormal()
Face based on the vertex coordinates.public Vector calculateNormal(Vector[] normals)
Face using the vertex normals provided.normals - the normalspublic void deductParameters()
Face based on the calculated normal.public void deductParameters(Vector[] normals)
RenderParameters for this Face based on the specified normalsnormals - the vertex normalspublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String nameFromDirection(net.minecraft.util.EnumFacing dir)
Face name from a EnumFacing.dir - the dir