projects
/
anneal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add items to TODO list
[anneal.git]
/
src
/
edu
/
berkeley
/
qfat
/
geom
/
Point.java
diff --git
a/src/edu/berkeley/qfat/geom/Point.java
b/src/edu/berkeley/qfat/geom/Point.java
index
57c8667
..
f011243
100644
(file)
--- a/
src/edu/berkeley/qfat/geom/Point.java
+++ b/
src/edu/berkeley/qfat/geom/Point.java
@@
-3,7
+3,7
@@
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
/** point in 3-space; immutable */
import javax.media.opengl.glu.*;
/** point in 3-space; immutable */
-public final class Point extends HasPoint implements HasBoundingBox, AffineConstraint {
+public final class Point implements HasBoundingBox, AffineConstraint, HasPoint {
public static final Point ZERO = new Point(0,0,0);
public static final Point ZERO = new Point(0,0,0);
@@
-36,8
+36,12
@@
public final class Point extends HasPoint implements HasBoundingBox, AffineConst
public Point getProjection(Point p) { return this; }
public AffineConstraint intersect(AffineConstraint c, float epsilon) {
public Point getProjection(Point p) { return this; }
public AffineConstraint intersect(AffineConstraint c, float epsilon) {
- if (c.getProjection(this).distance(this) <= epsilon) return this;
- return null;
+ Point p2 = c.getProjection(this);
+ if (p2==null) return AffineConstraint.NONE;
+ if (p2.distance(this) <= epsilon) return this;
+ return AffineConstraint.NONE;
}
}
+ public AffineConstraint multiply(Matrix m) { return m.times(this); }
+
}
}