00001 package commandline.ImageStuff.GeometricObjects;
00002
00003 import commandline.ImageStuff.Loc;
00004 import commandline.ImageStuff.Pixel;
00005
00006
00007
00008
00014 public class ParametrizedPiercingVertex extends Vertex {
00015
00016 private float x_param, y_param;
00017
00018 public ParametrizedPiercingVertex(int x, int y, float z,
00019 int verticalOffset, float normalisation,GenericEdge e) {
00020 super(x, y, z, verticalOffset, normalisation);
00021 init(e);
00022 }
00023
00024 public ParametrizedPiercingVertex(int x, int y, float z,
00025 int verticalOffset, float normalisation,float param_x,float param_y) {
00026 super(x, y, z, verticalOffset, normalisation);
00027 this.x_param=param_x;
00028 this.y_param=param_y;
00029 }
00030
00031 public ParametrizedPiercingVertex(Loc l, float z, int verticalOffset,
00032 float A_I,GenericEdge e) {
00033 super(l, z, verticalOffset, A_I);
00034 init(e);
00035 }
00036
00037 public ParametrizedPiercingVertex(Pixel p,GenericEdge e) {
00038 super(p);
00039 init(e);
00040 }
00041
00042 public ParametrizedPiercingVertex(Pixel p,float x_param,float y_param) {
00043 super(p);
00044 this.x_param=x_param;
00045 this.y_param=y_param;
00046 }
00047
00048
00049 private void init(GenericEdge e){
00050 ParametrizedPiercingVertex a= e.getBegin();
00051 ParametrizedPiercingVertex b= e.getEind();
00052 this.x_param=(a.getX_param()+b.getX_param())/2;
00053 this.y_param=(a.getY_param()+b.getY_param())/2;
00054 }
00055
00056 public float getX_param() {
00057 return x_param;
00058 }
00059
00060
00061 public float getY_param() {
00062 return y_param;
00063 }
00064
00065
00066
00067 }