/[libvob]/libvob/include/vob/vobs/Fillet.hxx
ViewVC logotype

Diff of /libvob/include/vob/vobs/Fillet.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.47 by jvk, Sat Jul 5 11:55:57 2003 UTC revision 1.48 by jvk, Sat Jul 5 13:13:03 2003 UTC
# Line 187  struct FilletSpan2 { Line 187  struct FilletSpan2 {
187              a = atan(angle_t.transform(ZVec(d / r, 0, 0)).x);              a = atan(angle_t.transform(ZVec(d / r, 0, 0)).x);
188    
189              // XXX: prevent the connection from being thicker than the node              // XXX: prevent the connection from being thicker than the node
190              //if (th > 2 * r0) th = 2 * r0;              //if (th > r0) th = r0;
   
             float t = 0.5 * th;  
191    
192              // XXX: prevent the middle of the connection from being              // XXX: prevent the middle of the connection from being
193              // thicker than the start by adjusting the "tangent"              // thicker than the start by adjusting the "tangent"
194              // angle if necessary              // angle if necessary
195              float aw = asin(t / r0);              float aw = asin(th / r0);
196              if (a < aw) a = aw;              if (a < aw) a = aw;
197    
198              // XXX: prevent negative stretching by adjusting the "tangent"              // XXX: prevent negative stretching by adjusting the "tangent"
199              // angle, if necessary              // angle, if necessary
200              float r2 = (d*d+t*t-r0*r0) / (2*r0 - 2*t);              float r2 = (d*d + th*th - r0*r0) / (2*r0 - 2*th);
201              float at = asin((t + r2) / (r0 + r2));              float at = asin((th + r2) / (r0 + r2));
202              if (a > at) a = at;              if (a > at) a = at;
203    
204              // XXX: interpolate the "tangent" angle to zero from the point of              // XXX: interpolate the "tangent" angle to zero from the point of
# Line 1082  struct Fillet3DBlend { Line 1080  struct Fillet3DBlend {
1080    
1081          // Add the vertices of the diced midsections of the connectors          // Add the vertices of the diced midsections of the connectors
1082          for (i = 0; i < N; i++) {          for (i = 0; i < N; i++) {
1083              float t = 0.5 * conns[i]->c.t;              float t = conns[i]->c.t;
1084              float d = conns[i]->c.d;              float d = conns[i]->c.d;
1085    
1086              ZVec ref = t0.transform(ZVec(0,0,1)) - t0.transform(ZVec(0,0,0));              ZVec ref = t0.transform(ZVec(0,0,1)) - t0.transform(ZVec(0,0,0));

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26