import java.awt.*;
import java.lang.*;

public class Vertex2D implements Drawable {
  
    //protected int x, y;
  protected float x, y;
  protected int argb;
  protected int vertexNo;
  
  ///////  CONSTRUCTORS /////////////////////////////  
  
  // zero argument constructor for future expansion 
  public Vertex2D() {;}

  // constructor using x and y
    //public Vertex2D(  int xVal, int yVal, int cVal ) {
  public Vertex2D(  float xVal, float yVal, int cVal ) {
    x = xVal;     y = yVal;    argb = cVal;
    //System.out.println( " vertexNo=" + vertexNo );  
    //System.out.println( "x=" +x + "y=" +y + "argb=" +argb );
  }	
 
  // constructor using integer x and y  and vertexNo
    //public Vertex2D( int vNo, int xVal, int yVal, int cVal ) {
  public Vertex2D( int vNo, float xVal, float yVal, int cVal ) {
    x = xVal;     y = yVal;    argb = cVal;
    vertexNo = vNo;
    //System.out.println( " vertexNo=" + vertexNo );  
    //System.out.println( "x=" +x + "y=" +y + "argb=" +argb );
  }	
  

  /////////  METHODS  ////////////////////////////
  
  public float getx() {
    return x;
  }

 
 public float gety() {
    return y;
  }

  public int getargb() {
    return argb;
  }

   
 public void setVertexNo( int someNo  ) {
   vertexNo = someNo;
  } 
  
 public int getVertexNo() {
   return vertexNo;
  } 
  
 public void draw( Raster r){
     //System.out.println("DRAWING VERTEX");
     //System.out.println(" (int)(x+0.5)="+(int)(x+0.5)+" (int)(y+0.5)="+ (int)(y+0.5)+" argb=" + argb);   
     r.setPixel( argb, (int)(x+0.5), (int)(y+0.5));
 }

    public  void drawLine( Raster r ){;}
    public  void drawLine( Raster r, float[] alpha, float[] red,  float[] green,  float[] blue) {;}

     
} // CLASS VERTEX2D
