Commit 48ba44a4 authored by Andrey Filippov's avatar Andrey Filippov

handling error (probably cons. of fronto)

parent b0857154
......@@ -22,6 +22,7 @@
**
*/
import java.awt.Point;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
......@@ -3498,13 +3499,21 @@ public class TilePlanes {
PlaneData otherPd,
boolean correct_distortions)
{
Matrix this_wv = new Matrix(this.getWorldXYZ(correct_distortions, 0),3);
Matrix other_wv = new Matrix(otherPd.getWorldXYZ(correct_distortions, 0),3);
Matrix cp = cross3d(this_wv, other_wv);
double cp2 = cp.transpose().times(cp).get(0, 0);
double this_wv2 = this_wv.transpose().times(this_wv).get(0, 0);
double other_wv2 = other_wv.transpose().times(other_wv).get(0, 0);
return cp2/(this_wv2 * other_wv2);
try {
Matrix this_wv = new Matrix(this.getWorldXYZ(correct_distortions, 0),3);
Matrix other_wv = new Matrix(otherPd.getWorldXYZ(correct_distortions, 0),3); // FIXME: this caused null pointer
Matrix cp = cross3d(this_wv, other_wv);
double cp2 = cp.transpose().times(cp).get(0, 0);
double this_wv2 = this_wv.transpose().times(this_wv).get(0, 0);
double other_wv2 = other_wv.transpose().times(other_wv).get(0, 0);
return cp2/(this_wv2 * other_wv2);
} catch (Exception e) {
System.out.println("Problem in getWorldSin2():");
// TODO Auto-generated catch block
e.printStackTrace();
// do nothing, just keep
return 1.0;
}
}
public double getWorldSin2(
PlaneData otherPd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment