diff options
| author | student <student@localhost> | 2018-04-11 17:06:20 -0400 |
|---|---|---|
| committer | student <student@localhost> | 2018-04-11 17:06:20 -0400 |
| commit | 5fdb8554aa59432924c6cf2cf4e8c178c5856deb (patch) | |
| tree | 9fb86d7ed82887c883ba0bd9c462619a6f96499e /CSMath/src/bezier/TDHPoint.java | |
| parent | dcb6c2159446135a142cad41eec185bb24c45bfb (diff) | |
Update
Diffstat (limited to 'CSMath/src/bezier/TDHPoint.java')
| -rw-r--r-- | CSMath/src/bezier/TDHPoint.java | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/CSMath/src/bezier/TDHPoint.java b/CSMath/src/bezier/TDHPoint.java deleted file mode 100644 index f2a02a8..0000000 --- a/CSMath/src/bezier/TDHPoint.java +++ /dev/null @@ -1,85 +0,0 @@ -package bezier;
-
-/**
- * A two-dimensional homogeneous point.
- *
- * @author bjculkin
- *
- */
-public class TDHPoint extends TDPoint {
- /**
- * The homogeneous coordinate for the point.
- */
- public final double z;
-
- /**
- * Create a new two-dimensional homogeneous point.
- *
- * @param x
- * The x coordinate.
- * @param y
- * The y coordinate.
- * @param z
- * The homogeneous coordinate.
- */
- public TDHPoint(double x, double y, double z) {
- super(x, y);
-
- this.z = z;
- }
-
- /**
- * Create a new two-dimensional homogeneous point.
- *
- * The homogeneous coordinate is set to 1.
- *
- * @param x
- * The x coordinate.
- * @param y
- * The y coordinate.
- */
- public TDHPoint(double x, double y) {
- this(x, y, 1);
- }
-
- /**
- * Convert this point to a plain two-dimensional point.
- *
- * @return A two-dimensional version of this point.
- */
- public TDPoint toTDPoint() {
- /*
- * Convert back down by dividing each coordinate by the homogeneous value.
- */
- return new TDPoint(x / z, y / z);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- long temp;
- temp = Double.doubleToLongBits(z);
- result = prime * result + (int) (temp ^ (temp >>> 32));
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!super.equals(obj))
- return false;
- if (getClass() != obj.getClass())
- return false;
- TDHPoint other = (TDHPoint) obj;
- if (Double.doubleToLongBits(z) != Double.doubleToLongBits(other.z))
- return false;
- return true;
- }
-
- @Override
- public String toString() {
- return "TDHPoint [z=" + z + ", x=" + x + ", y=" + y + "]";
- }
-}
\ No newline at end of file |
