public class Face
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name |
protected RenderParameters |
params |
protected Vertex[] |
vertexes |
Constructor and Description |
---|
Face(Face face) |
Face(Face face,
RenderParameters params) |
Face(java.util.List<Vertex> vertexes) |
Face(Vertex... vertexes) |
Face(Vertex[] vertexes,
RenderParameters params) |
Modifier and Type | Method and Description |
---|---|
int[][][] |
calculateAoMatrix(net.minecraftforge.common.util.ForgeDirection 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 |
Face |
factor(float fx,
float fy,
float fz) |
RenderParameters |
getParameters()
Gets the
RenderParameters of this Face . |
Vertex[] |
getVertexes()
|
Vector[] |
getVertexNormals()
Gets the vertexes normals for this
Face . |
Face |
interpolateUV() |
java.lang.String |
name()
Gets the base name of this
Face . |
static java.lang.String |
nameFromDirection(net.minecraftforge.common.util.ForgeDirection dir)
Gets a
Face name from a ForgeDirection . |
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,
double x,
double y,
double z) |
Face |
setAlpha(int alpha) |
Face |
setBrightness(int brightness) |
Face |
setColor(int color) |
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() |
Face |
setTexture(net.minecraft.util.IIcon icon) |
Face |
setTexture(net.minecraft.util.IIcon icon,
boolean flippedU,
boolean flippedV,
boolean interpolate) |
java.lang.String |
toString() |
Face |
translate(double x,
double y,
double z) |
protected java.lang.String name
protected Vertex[] vertexes
protected RenderParameters params
public Face(Vertex[] vertexes, RenderParameters params)
public Face(Vertex... vertexes)
public Face(java.util.List<Vertex> vertexes)
public Face(Face face)
public Face(Face face, RenderParameters params)
public 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 Face setParameters(RenderParameters params)
RenderParameters
for this Face
.params
- the parameters. If null
, sets default parametersFace
public RenderParameters getParameters()
RenderParameters
of this Face
.public Face setColor(int color)
public Face setAlpha(int alpha)
public Face setBrightness(int brightness)
public Face setTexture(net.minecraft.util.IIcon icon)
public Face setStandardUV()
public Face interpolateUV()
public Face setTexture(net.minecraft.util.IIcon icon, boolean flippedU, boolean flippedV, boolean interpolate)
public Face factor(float fx, float fy, float fz)
public Face translate(double x, double y, double z)
public void scale(float f)
public void scale(float f, double x, double y, double z)
public 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.minecraftforge.common.util.ForgeDirection 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.Object
public static java.lang.String nameFromDirection(net.minecraftforge.common.util.ForgeDirection dir)
Face
name from a ForgeDirection
.dir
- the dir