public class MergedVertex extends java.lang.Object implements ITransformable.Translate, ITransformable.Rotate, ITransformable.Scale, ITransformable.Alpha, ITransformable.Color, ITransformable.Brightness, java.lang.Iterable<Vertex>
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 Vertex |
base
Base
Vertex. |
protected java.lang.String |
name
Name of this
MergedVertex. |
protected org.lwjgl.util.vector.Matrix4f |
transformMatrix
Matrix holding the tranformations applied to this
MergedVertex. |
| Constructor and Description |
|---|
MergedVertex(Vertex vertex)
Instantiates a new
MergedVertex. |
| Modifier and Type | Method and Description |
|---|---|
void |
addVertex(Vertex vertex)
Adds a
Vertex to this MergedVertex. |
void |
applyMatrix()
Applies the transformations matrices to this
MergedVertex. |
void |
copyMatrix(org.lwjgl.util.vector.Matrix4f matrix)
Copies the transformation from a
shape to this Shape. |
Vertex |
getBase()
Gets the base
Vertex for this MergedVertex. |
static java.util.Map<java.lang.String,MergedVertex> |
getMergedVertexes(Shape shape)
Gets the list of
MergedVertex for a Shape. |
java.lang.String |
getName()
Gets the name of this
MergedVertex. |
double |
getX()
Gets the X coordinate of this
MergedVertex. |
double |
getY()
Gets the Y coordinate of this
MergedVertex |
double |
getZ()
Gets the Z coordinate of this
MergedVertex |
boolean |
is(java.lang.String... names)
Checks whether this
MergedVertex matches one of the names specified. |
java.util.Iterator<Vertex> |
iterator()
Gets the
Iterator for this MergedVertex. |
void |
removeVertex(Vertex vertex)
Removes a
Vertex from this MergedVertex. |
void |
rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
Rotates this
MergedVertex around the given axis the specified angle. |
void |
scale(float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
Scales this
MergedVertex. |
void |
setAlpha(int alpha)
Sets the alpha value for this
MergedVertex. |
void |
setBrightness(int brightness)
Sets the brightness for this
MergedVertex. |
void |
setColor(int color)
Sets the color for this
MergedVertex. |
void |
setX(double x)
Sets the X coordinate for this
MergedVertex. |
void |
setY(double y)
Sets the Y coordinate for this
MergedVertex. |
void |
setZ(double z)
Sets the Z coordinate for this
MergedVertex. |
void |
translate(float x,
float y,
float z)
Translates this
MergedVertex. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrotateprotected java.lang.String name
MergedVertex.protected org.lwjgl.util.vector.Matrix4f transformMatrix
MergedVertex.public MergedVertex(Vertex vertex)
MergedVertex.vertex - the vertexpublic java.lang.String getName()
MergedVertex.MergedVertex.public Vertex getBase()
Vertex for this MergedVertex.public double getX()
MergedVertex.MergedVertex.public void setX(double x)
MergedVertex.x - the new xpublic double getY()
MergedVertexMergedVertex.public void setY(double y)
MergedVertex.y - the new ypublic double getZ()
MergedVertexMergedVertex.public void setZ(double z)
MergedVertex.z - the new zpublic boolean is(java.lang.String... names)
MergedVertex matches one of the names specified.names - the namespublic void addVertex(Vertex vertex)
vertex - the vertexpublic void removeVertex(Vertex vertex)
Vertex from this MergedVertex.vertex - the vertexpublic void copyMatrix(org.lwjgl.util.vector.Matrix4f matrix)
shape to this Shape.matrix - the matrixpublic void applyMatrix()
MergedVertex. This modifies the position of the vertexes.public void translate(float x,
float y,
float z)
MergedVertex.translate in interface ITransformable.Translatex - the xy - the yz - the zpublic void rotate(float angle,
float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
MergedVertex around the given axis the specified angle. Offsets the origin for the rotation.rotate in interface ITransformable.Rotateangle - the anglex - the xy - the yz - the zoffsetX - the offset xoffsetY - the offset yoffsetZ - the offset zpublic void scale(float x,
float y,
float z,
float offsetX,
float offsetY,
float offsetZ)
MergedVertex.scale in interface ITransformable.Scalex - the xy - the yz - the zoffsetX - the offset xoffsetY - the offset yoffsetZ - the offset zpublic void setColor(int color)
MergedVertex.setColor in interface ITransformable.Colorcolor - the new colorpublic void setAlpha(int alpha)
MergedVertex.setAlpha in interface ITransformable.Alphaalpha - the new alphapublic void setBrightness(int brightness)
MergedVertex.setBrightness in interface ITransformable.Brightnessbrightness - the new brightnesspublic java.util.Iterator<Vertex> iterator()
Iterator for this MergedVertex.iterator in interface java.lang.Iterable<Vertex>public static java.util.Map<java.lang.String,MergedVertex> getMergedVertexes(Shape shape)
MergedVertex for a Shape.shape - the shapeHashMap where the key is the Vertex.baseName() of the vertexes merged.