|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mt4j.util.math.Vector3D
org.mt4j.util.math.Vertex
public class Vertex
A point in space for describing geometry.
Field Summary |
---|
Fields inherited from class org.mt4j.util.math.Vector3D |
---|
BEZIERVERTEX, VECTOR, VERTEX, w, x, X_AXIS, y, Y_AXIS, z, Z_AXIS, ZERO_VECTOR |
Constructor Summary | |
---|---|
Vertex() Instantiates a new vertex. (0,0,0) |
|
Vertex(float x, float y) Instantiates a new vertex with z=0. |
|
Vertex(float x, float y, float z) Instantiates a new vertex. |
|
Vertex(float x, float y, float z, float w) Instantiates a new vertex. |
|
Vertex(float x, float y, float z, float textureX, float textureY) Instantiates a new vertex. |
|
Vertex(float x, float y, float z, float r, float g, float b, float a) Instantiates a new vertex. |
|
Vertex(float x, float y, float z, float textureX, float textureY, float r, float g, float b, float a) Instantiates a new vertex. |
|
Vertex(float x, float y, float z, float w, float textureU2, float textureV2, float r, float g, float b, float a) Instantiates a new vertex. |
|
Vertex(Vector3D vector) Instantiates a new vertex. |
Method Summary | |
---|---|
boolean |
equalsVector(Vector3D vertex) Checks if the two vectors have the same components (XYZW). |
float |
getA() Gets the a. |
Vector3D |
getAdded(Vector3D v) NOTE: texture coordinates and color of the calling vector are kept. |
float |
getB() Gets the b. |
Vector3D |
getCopy() Copy the vector. |
Vector3D |
getCross(Vector3D v) Calculate the cross product with another vector. |
static java.util.ArrayList<Vertex[]> |
getDeepVertexArrayCopy(java.util.ArrayList<Vertex[]> vertices) Returns a list of exact copies of the provided vertices. |
static Vertex[] |
getDeepVertexArrayCopy(Vertex[] vertices) Returns an array of exact copies of the provided vertices. |
float |
getG() Gets the g. |
float |
getR() Gets the r. |
Vector3D |
getSubtracted(Vector3D v) NOTE: texture coordinates of the calling vector are kept. |
float |
getTexCoordU() Gets the tex coord u. |
float |
getTexCoordV() Gets the tex coord v. |
static Vertex[] |
scaleVectorArray(Vertex[] inputArray, Vector3D scalingPoint, float factor) scales the Vertex[] around the scalingpoint by the given factor evenly in the X and Y direction. |
static Vertex[] |
scaleVectorArray(Vertex[] inputArray, Vector3D scalingPoint, float X, float Y, float Z) scales the Vertex[] around the scalingpoint by the factors given for each dimension. |
void |
setA(float a) Sets the a. |
void |
setB(float b) Sets the b. |
void |
setG(float g) Sets the g. |
void |
setR(float r) Sets the r. |
void |
setRGBA(float r, float g, float b, float a) Sets the rgba. |
void |
setTexCoordU(float coordinateX) Sets the tex coord u. |
void |
setTexCoordV(float coordinateY) Sets the tex coord v. |
static Vertex[] |
transFormArray(Matrix transformMatrix, Vertex[] points) Multiplicates all Vector3D of the Vector3D array with the given transformation matrix, thus transforming them. |
static Vertex[] |
translateArray(Vertex[] inputArray, Vector3D directionVector) translates an array of Vertex by the given amounts in the directionvector. |
static Vertex[] |
xRotateVectorArray(Vertex[] inputArray, Vector3D rotationPoint, float degree) rotates the Vertex array around the rotationpoint by the given degree. |
static Vertex[] |
yRotateVectorArray(Vertex[] inputArray, Vector3D rotationPoint, float degree) rotates the Vertex array around the rotationpoint by the given degree. |
static Vertex[] |
zRotateVectorArray(Vertex[] inputArray, Vector3D rotationPoint, float degree) rotates the Vertex array around the rotationpoint by the given degree. |
Methods inherited from class org.mt4j.util.math.Vector3D |
---|
addLocal, angleBetween, angleBetween, crossLocal, distance, distance, distance2D, distance2D, distanceSquared, divideLocal, dot, equalsVectorWithTolerance, getDeepVertexArrayCopy, getInterpolatedTo, getInverted, getJava2DPoint, getLimited, getNormalized, getScaled, getType, getW, getX, getY, getZ, invertLocal, length, lengthSquared, normalizeLocal, rotateAroundAxisLocal, rotateX, rotateX, rotateXVectorArray, rotateY, rotateY, rotateYVectorArray, rotateZ, rotateZ, rotateZVectorArray, scaleLocal, scaleVectorArray, scaleVectorArray, set, setType, setValues, setW, setX, setXYZ, setXYZW, setY, setZ, subtractLocal, toArray, toString, transform, transFormArrayLocal, transformDirectionVector, transformNormal, translate, translateVectorArray |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Vertex()
public Vertex(float x, float y)
x
- the xy
- the ypublic Vertex(float x, float y, float z)
x
- the xy
- the yz
- the zpublic Vertex(Vector3D vector)
vector
- the vectorpublic Vertex(float x, float y, float z, float w)
x
- the xy
- the yz
- the zw
- the wpublic Vertex(float x, float y, float z, float textureX, float textureY)
x
- the xy
- the yz
- the ztextureX
- the texture xtextureY
- the texture ypublic Vertex(float x, float y, float z, float r, float g, float b, float a)
x
- the xy
- the yz
- the zr
- the rg
- the gb
- the ba
- the apublic Vertex(float x, float y, float z, float textureX, float textureY, float r, float g, float b, float a)
x
- the xy
- the yz
- the ztextureX
- the texture xtextureY
- the texture yr
- the rg
- the gb
- the ba
- the apublic Vertex(float x, float y, float z, float w, float textureU2, float textureV2, float r, float g, float b, float a)
x
- the xy
- the yz
- the zw
- the wtextureU2
- the texture u2textureV2
- the texture v2r
- the rg
- the gb
- the ba
- the aMethod Detail |
---|
public static Vertex[] getDeepVertexArrayCopy(Vertex[] vertices)
vertices
- the verticespublic static java.util.ArrayList<Vertex[]> getDeepVertexArrayCopy(java.util.ArrayList<Vertex[]> vertices)
vertices
- the verticespublic static Vertex[] transFormArray(Matrix transformMatrix, Vertex[] points)
points
- the pointstransformMatrix
- the transform matrixpublic static Vertex[] translateArray(Vertex[] inputArray, Vector3D directionVector)
inputArray
- the input arraydirectionVector
- the direction vectorpublic static Vertex[] xRotateVectorArray(Vertex[] inputArray, Vector3D rotationPoint, float degree)
inputArray
- the input arrayrotationPoint
- the rotation pointdegree
- the degreepublic static Vertex[] yRotateVectorArray(Vertex[] inputArray, Vector3D rotationPoint, float degree)
rotationPoint
- the rotation pointdegree
- the degreeinputArray
- the input arraypublic static Vertex[] zRotateVectorArray(Vertex[] inputArray, Vector3D rotationPoint, float degree)
rotationPoint
- the rotation pointdegree
- the degreeinputArray
- the input arraypublic static Vertex[] scaleVectorArray(Vertex[] inputArray, Vector3D scalingPoint, float factor)
inputArray
- the input arrayscalingPoint
- the scaling pointfactor
- the factorpublic static Vertex[] scaleVectorArray(Vertex[] inputArray, Vector3D scalingPoint, float X, float Y, float Z)
inputArray
- the input arrayscalingPoint
- the scaling pointX
- the xY
- the yZ
- the zpublic Vector3D getAdded(Vector3D v)
getAdded
in class Vector3D
v
- the vpublic Vector3D getSubtracted(Vector3D v)
getSubtracted
in class Vector3D
v
- the vpublic Vector3D getCross(Vector3D v)
getCross
in class Vector3D
v
- the vpublic boolean equalsVector(Vector3D vertex)
Vector3D
equalsVector
in class Vector3D
vertex
- the vector3 dpublic Vector3D getCopy()
getCopy
in class Vector3D
public float getTexCoordU()
public void setTexCoordU(float coordinateX)
coordinateX
- the new tex coord upublic float getTexCoordV()
public void setTexCoordV(float coordinateY)
coordinateY
- the new tex coord vpublic float getA()
public void setA(float a)
a
- the new apublic float getB()
public void setB(float b)
b
- the new bpublic float getG()
public void setG(float g)
g
- the new gpublic float getR()
public void setR(float r)
r
- the new rpublic void setRGBA(float r, float g, float b, float a)
r
- the rg
- the gb
- the ba
- the a
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |