/[libvob]/libvob/include/vob/geom/Fillets2.hxx
ViewVC logotype

Diff of /libvob/include/vob/geom/Fillets2.hxx

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

revision 1.10 by tjl, Wed Jun 11 17:41:55 2003 UTC revision 1.11 by jvk, Thu Jun 12 13:28:53 2003 UTC
# Line 91  namespace Geom { Line 91  namespace Geom {
91          /** The thickness of the connection at the middle.          /** The thickness of the connection at the middle.
92           */           */
93          float t;          float t;
94          /** Whether we're looking at the clockwise or counterclockwise side.          /** Whether we're looking at the clockwise (+1) or counterclockwise (-1) side.
95           */           */
96          int sign;          int sign;
97          /** The z coordinate of the middle.          /** The z coordinate of the middle.
# Line 102  namespace Geom { Line 102  namespace Geom {
102          // The following data members are derivable from the already mentioned ones.          // The following data members are derivable from the already mentioned ones.
103          // They are calculated here to be cached.          // They are calculated here to be cached.
104    
105          /** The direction (unit) vector.          /** The direction (unit) vector of the connection (from the node).
106           */           */
107          Vec dir;          Vec dir;
108    
109          /** The normal (unit) vector.          /** The normal (unit) vector of the connection pointing to the outside.
110           */           */
111          Vec norm;          Vec norm;
112    
# Line 183  namespace Geom { Line 183  namespace Geom {
183    
184              x1 = (node.r+r1) * cos(ta);              x1 = (node.r+r1) * cos(ta);
185    
186              dirTang = dirVec(conn.a + conn.sign * tangentAngle);              dirTang = dirVec(conn.a - conn.sign * tangentAngle);
187    
188          }          }
189          ZVec point(float fract, ZVec *intern = 0) const {          ZVec point(float fract, ZVec *intern = 0) const {
# Line 219  namespace Geom { Line 219  namespace Geom {
219          const LinearConnectionHalf &conn;          const LinearConnectionHalf &conn;
220          float tangentAngle;          float tangentAngle;
221    
222            /**  Direction vector pointing to the point where the fillet touches the circle
223             */
224          Vec dirTang;          Vec dirTang;
225          float dtSign;          float dtSign;
226    
227          Vec ept, eno;          Vec ept, eno;
228    
229            /** Lengths of the half axes
230             */
231          Vec elli;          Vec elli;
232    
233          Vec ey;          Vec ey;
# Line 257  namespace Geom { Line 261  namespace Geom {
261    
262              ecenter = conn.endPoint - ex;              ecenter = conn.endPoint - ex;
263    
264              dirTang = dirVec(conn.a + conn.sign * tangentAngle);              dirTang = dirVec(conn.a - conn.sign * tangentAngle);
265              dtSign = conn.sign;              dtSign = conn.sign;
266    
267              /* Now, the ellipse always starts at angle 0. Find              /* Now, the ellipse always starts at angle 0. Find
# Line 267  namespace Geom { Line 271  namespace Geom {
271              pt2.x *= elli.y / elli.x;              pt2.x *= elli.y / elli.x;
272              pt2.y = elli.y - pt2.y;              pt2.y = elli.y - pt2.y;
273    
274              eangle = pt2.atan();              eangle = atan2(pt2.x, pt2.y);
275    
276              DBG(dbg_fillets) << format("Ellipse: ept: %s, eno: %s, elli: %s, ecenter: %s, "              DBG(dbg_fillets) << format("Ellipse: ept: %s, eno: %s, elli: %s, ecenter: %s, "
277                                  "dirtang: %s, dtsign: %s, eangle: %s\n") %                                  "dirtang: %s, dtsign: %s, eangle: %s\n") %

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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