|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.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 vertex
public DefaultVertex(int index,
Vertex other)
index - The indexother - The other vertex
public DefaultVertex(int index,
float x,
float y,
float z)
index - The indexx - The x-coordinatey - The y-coordinatez - The z-coordinate| Method Detail |
|---|
public int getIndex()
Indexed
getIndex in interface Indexedpublic void setX(float x)
Vertex
setX in interface Vertexx - The x-coordinate of this vertexpublic void setY(float y)
Vertex
setY in interface Vertexy - The y-coordinate of this vertexpublic void setZ(float z)
Vertex
setZ in interface Vertexz - The z-coordinate of this vertexpublic float getX()
Vertex
getX in interface Vertexpublic float getY()
Vertex
getY in interface Vertexpublic float getZ()
Vertex
getZ in interface Vertexpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic 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 | |||||||||