/***
 * Image/J Plugins
 * Copyright (C) 2002 Jarek Sacha
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Latest release available at http://sourceforge.net/projects/ij-plugins/
 */
package net.sf.ij_plugins.im3d;

/**
 * Represents a 3D point.
 *
 * @author Jarek Sacha
 * @since April 29, 2002
 */
public class Point3DInt {
    /**
     * x coordinate.
     */
    public int x;
    /**
     * y coordinate.
     */
    public int y;
    /**
     * z coordinate.
     */
    public int z;


    /**
     * Constructor for the Point3D object
     */
    public Point3DInt() {
    }


    /**
     * Constructor for the Point3D object
     *
     * @param x x coordinate.
     * @param y y coordinate.
     * @param z z coordinate.
     */
    public Point3DInt(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }


    /**
     * Returns a string representing Point3D coordinates: (x,y,z).
     *
     * @return String representing Point3D coordinates.
     */
    @Override
    public String toString() {
        return "(" + x + "," + y + "," + z + ")";
    }
}

@@ -1,13 +1,11 @@
 /*
-**
 %0A
+
  * Image
@@ -36,16 +36,21 @@
 (C) 2002
+-2009
  Jarek S
@@ -54,16 +54,75 @@
 k Sacha%0A
+ * Author's email: jsacha at users dot sourceforge dot net%0A
  *%0A * Th
@@ -1052,16 +1052,22 @@
 002%0A */%0A
+final 
 public c
@@ -1081,16 +1081,50 @@
 int3DInt
+ implements Comparable%3CPoint3DInt%3E
  %7B%0A    /
@@ -1558,21 +1558,39 @@
 Int(
+final 
 int x, 
-int y,
+final int y, final
  int
@@ -1850,24 +1850,24 @@
 oString() %7B%0A
-
         retu
@@ -1909,11 +1909,684 @@
 %22;%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(final Object obj) %7B%0A        return obj instanceof Point3DInt && compareTo((Point3DInt) obj) == 0;%0A    %7D%0A%0A%0A    public int compareTo(final Point3DInt p) %7B%0A        if (p == null) %7B%0A            throw new IllegalArgumentException(%22Argument 'p' cannot be null.%22);%0A        %7D%0A%0A        if (x %3C p.x) %7B%0A            return -1;%0A        %7D else if (x %3E p.x) %7B%0A            return 1;%0A        %7D else if (y %3C p.y) %7B%0A            return -1;%0A        %7D else if (y %3E p.y) %7B%0A            return 1;%0A        %7D else if (z %3C p.z) %7B%0A            return -1;%0A        %7D else if (z %3E p.z) %7B%0A            return 1;%0A        %7D else %7B%0A            return 0;%0A        %7D%0A    %7D
 %0A%7D%0A

Implement Comparable interface for Point3DInt.