|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.javagl.simplemesh.impl.DefaultVertex
public class DefaultVertex
Default implementation of a Vertex
. Comparing two
instances of this class for equality will ONLY compare the
indices and ignore the coordinates of the vertices.
Constructor Summary | |
---|---|
DefaultVertex(int index)
Creates a new vertex (at 0,0,0) with the given index |
|
DefaultVertex(int index,
float x,
float y,
float z)
Creates a new vertex with the given index and position. |
|
DefaultVertex(int index,
Vertex other)
Creates a new vertex with the given index, at the same position as the given vertex. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getIndex()
Returns the index of this object |
float |
getX()
Returns the x-coordinate of this vertex |
float |
getY()
Returns the y-coordinate of this vertex |
float |
getZ()
Returns the z-coordinate of this vertex |
int |
hashCode()
|
void |
setX(float x)
Set the x-coordinate of this vertex |
void |
setY(float y)
Set the y-coordinate of this vertex |
void |
setZ(float z)
Set the z-coordinate of this vertex |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultVertex(int index)
index
- The index of the vertexpublic DefaultVertex(int index, Vertex other)
index
- The indexother
- The other vertexpublic DefaultVertex(int index, float x, float y, float z)
index
- The indexx
- The x-coordinatey
- The y-coordinatez
- The z-coordinateMethod Detail |
---|
public int getIndex()
Indexed
getIndex
in interface Indexed
public void setX(float x)
Vertex
setX
in interface Vertex
x
- The x-coordinate of this vertexpublic void setY(float y)
Vertex
setY
in interface Vertex
y
- The y-coordinate of this vertexpublic void setZ(float z)
Vertex
setZ
in interface Vertex
z
- The z-coordinate of this vertexpublic float getX()
Vertex
getX
in interface Vertex
public float getY()
Vertex
getY
in interface Vertex
public float getZ()
Vertex
getZ
in interface Vertex
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |