// Last edited on 2011-08-25 00:21:06 by stolfilocal package tracking; public class TrackRegion { private double C[] = {0.0, 0.0}; /* Center. */ private double U[] = {0.0, 0.0}; /* U vector. */ private double V[] = {0.0, 0.0}; /* V vector. */ private String label = null; /* Sets center coordinates: */ public void set_C (double x, double y) { this.C[0] = x; this.C[1] = y; } public double[] get_C () { return this.C; } public double get_Cx () { return this.C[0]; } public double get_Cy () { return this.C[1]; } /*U*/ public void set_U (double x, double y) { this.U[0] = x; this.U[1] = y; } public double[] get_U () { return this.U; } public double get_Ux () { return this.U[0]; } public double get_Uy () { return this.U[1]; } /*V*/ public void set_V (double x, double y) { this.V[0] = x; this.V[1] = y; } public double[] get_V () { return this.V; } public double get_Vx () { return this.V[0]; } public double get_Vy () { return this.V[1]; } /*Label*/ public void set_label (String label) { this.label = label; } public String get_label () { return label; } /* Sets all fields of this track region to the corresponding values from {S}, except the label. */ public void update(S) { this.set_C(S.get_Cx(),S.get_Cy()); this.set_U(S.get_Ux(),S.get_Uy()); this.set_V(S.get_Vx(),S.get_Vy()); } }