debugging decl

This commit is contained in:
James E McClure
2018-09-13 22:31:19 -04:00
parent 33eeda579a
commit 3c953c8ab2
3 changed files with 32 additions and 10 deletions

View File

@@ -365,6 +365,7 @@ double DECL::EdgeAngle(int edge)
V = TriNormal(halfedge.twin(edge));
double dotprod=U.x*V.x + U.y*V.y + U.z*V.z;
if (dotprod > 1.f) dotprod=1.f;
if (dotprod < -1.f) dotprod=-1.f;
angle = acos(dotprod);
if (halfedge.twin(edge) < 0 ){
// turn in outward normal at cube face is pi/2 from each side of the cube
@@ -388,11 +389,11 @@ double DECL::EdgeAngle(int edge)
angle *= 0.5; // half edge value
}
//1.570796326794897
/*if (angle < 0.f){
printf("%f, %f (Edge=%i, twin=%i): U={%f, %f, %f}, V={%f, %f, %f}\n",angle,dotprod,edge,halfedge.twin(edge),U.x,U.y,U.z,V.x,V.y,V.z);
printf(" P={%f, %f, %f}, Q={%f, %f, %f}, R={%f, %f, %f} \n",P.x,P.y,P.z,Q.x,Q.y,Q.z,R.x,R.y,R.z);
}
*/
// if (angle < 0.f){
printf(" %f, %f (Edge=%i, twin=%i)\n U={%f, %f, %f}, V={%f, %f, %f}\n",angle,dotprod,edge,halfedge.twin(edge),U.x,U.y,U.z,V.x,V.y,V.z);
//printf(" P={%f, %f, %f}, Q={%f, %f, %f}, R={%f, %f, %f} \n",P.x,P.y,P.z,Q.x,Q.y,Q.z,R.x,R.y,R.z);
//}
return angle;
}