workign on edge angle projection

This commit is contained in:
James E McClure
2018-09-14 15:44:17 -04:00
parent acf2d19e20
commit 80441c7b4f

View File

@@ -371,9 +371,8 @@ double DECL::EdgeAngle(int edge)
if (halfedge.twin(edge) < 0 ){
// compute projection onto plane
W = U - dotprod*V;
length = sqrt(W.x*W.x+W.y*W.y+W.z*W.z);
W /= length; // normalize
dotprod = U.x*W.x + U.y*W.y + U.z*W.z;
length = sqrt(W.x*W.x+W.y*W.y+W.z*W.z); // for normalization
dotprod = (U.x*W.x + U.y*W.y + U.z*W.z)/length;
if (dotprod > 1.f) dotprod=1.f;
if (dotprod < -1.f) dotprod=-1.f;
angle = acos(dotprod);