Bugged!
The vecmath Tuple3d class doesn't define equals correctly.
the method missing (from the GPL2'd java3d vecmath) is
public boolean equals(Object t1)
{
try {
Tuple3d t2 = (Tuple3d) t1;
return(this.x == t2.x &&
this.y == t2.y && this.z == t2.z);
}
catch (ClassCastException e1) {return false;}
catch (NullPointerException e2) {return false;}
}
boolean equals (Tuple3d) isn't enough!
public class NewClass
{
public static void main (String[] args)
{
Vector3d v = new Vector3d(1,2,3);
Point3d p = new Point3d(1,2,3);
System.out.println(
v.equals( (Object)p));
System.out.println(
v.equals( (Object)new Point3d(1,2,3))
== v.equals( p ));
}
}