GeomRep
Class Vertex

java.lang.Object
  extended by GeomRep.Vertex

public class Vertex
extends java.lang.Object

Vertex class that encapsulates all vertex related information. The coordinates contained in this class are physical coordinates, not the device (window) coordinates. (Window coordinates are integers, being pixel numbers.

Since:
1.0

Field Summary
private  float[] mCoordinates
          Vertex coordinates (physical).
 
Constructor Summary
Vertex()
          Default class constructor.
Vertex(float[] coor)
          Class constructor.
Vertex(float x, float y, float z)
          Class constructor.
 
Method Summary
 float[] GetCoordArray()
          Get the coordinates of the vertex.
 float GetX()
          Get the X coordinate of the vertex.
 float GetY()
          Get the Y coordinate of the vertex.
 float GetZ()
          Get the Z coordinate of the vertex.
 void SetCoordinates(float[] coord)
          Set the X, Y, Z coordinates of the vertex.
 void SetX(float val)
          Set the X coordinate of the vertex.
 void SetY(float val)
          Set the Y coordinate of the vertex.
 void SetZ(float val)
          Set the Z coordinate of the vertex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mCoordinates

private float[] mCoordinates
Vertex coordinates (physical).

Constructor Detail

Vertex

public Vertex()
Default class constructor.


Vertex

public Vertex(float[] coor)
Class constructor.

Parameters:
coor - Coordinates for the vertex (X, Y, Z) as an array.

Vertex

public Vertex(float x,
              float y,
              float z)
Class constructor.

Parameters:
x - X coordinate for the vertex.
y - Y coordinate for the vertex.
z - Z coordinate for the vertex.
Method Detail

GetX

public float GetX()
Get the X coordinate of the vertex.

Returns:
X coordinate of the vertex.

SetX

public void SetX(float val)
Set the X coordinate of the vertex.

Parameters:
val - X Coordinate of the vertex.

GetY

public float GetY()
Get the Y coordinate of the vertex.

Returns:
Y coordinate of the vertex.

SetY

public void SetY(float val)
Set the Y coordinate of the vertex.

Parameters:
val - Y Coordinate of the vertex.

GetZ

public float GetZ()
Get the Z coordinate of the vertex.

Returns:
Z coordinate of the vertex.

SetZ

public void SetZ(float val)
Set the Z coordinate of the vertex.

Parameters:
val - Z Coordinate of the vertex.

SetCoordinates

public void SetCoordinates(float[] coord)
Set the X, Y, Z coordinates of the vertex.

Parameters:
coord - (X, Y, Z) coordinates.

GetCoordArray

public float[] GetCoordArray()
Get the coordinates of the vertex.

Returns:
Coordinates (X, Y, Z) of the vertex.