/[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.30 by jvk, Fri Jun 27 10:11:48 2003 UTC revision 1.31 by jvk, Fri Jun 27 10:39:31 2003 UTC
# Line 1  Line 1 
1  /*  /*
2  Trivial.hxx  Trivial.hxx
3   *       *    
4   *    Copyright (c) 2003, Tuomas J. Lukka   *    Copyright (c) 2003, Tuomas J. Lukka and Janne V. Kujala
5   *    This file is part of LibVob.   *    This file is part of LibVob.
6   *       *    
7   *    LibVob is free software; you can redistribute it and/or modify it under   *    LibVob is free software; you can redistribute it and/or modify it under
# Line 21  Trivial.hxx Line 21  Trivial.hxx
21   *       *    
22   */   */
23  /*  /*
24   * Written by Tuomas J. Lukka   * Written by Tuomas J. Lukka and Janne V. Kujala
25   */   */
26    
27  #ifndef VOB_VOBS_FILLET  #ifndef VOB_VOBS_FILLET
# Line 134  struct FilletSpan2 { Line 134  struct FilletSpan2 {
134      }      }
135    
136      template<class T> float crad(const T &t) const {      template<class T> float crad(const T &t) const {
137          return t.getSqSize().x;          return 0.5 * t.getSqSize().x;
138      }      }
139    
140      struct Conn {      struct Conn {
141          template<class T> float crad(const T &t) const {          template<class T> float crad(const T &t) const {
142              return t.getSqSize().x;              return 0.5 * t.getSqSize().x;
143          }          }
144          float th;          float th;
145          float a;          float a;
# Line 297  struct FilletSpan2 { Line 297  struct FilletSpan2 {
297          const Transform &t1 = *t[3];          const Transform &t1 = *t[3];
298          const Transform &t2 = *t[4];          const Transform &t2 = *t[4];
299    
300          ZVec p0 = t0.transform(t0.getSqSize());          ZVec p0 = t0.transform(0.5 * t0.getSqSize());
301          ZVec p1 = t1.transform(t1.getSqSize()) ;          ZVec p1 = t1.transform(0.5 * t1.getSqSize()) ;
302          ZVec p2 = t2.transform(t2.getSqSize()) ;          ZVec p2 = t2.transform(0.5 * t2.getSqSize()) ;
303    
304          ZVec ctr = p0;          ZVec ctr = p0;
305          Vec v1 = p1 - ctr;          Vec v1 = p1 - ctr;
# Line 523  struct Fillet3D { Line 523  struct Fillet3D {
523      }      }
524    
525      template<class T> float crad(const T &t) const {      template<class T> float crad(const T &t) const {
526          return t.getSqSize().x;          return 0.5 * t.getSqSize().x;
527      }      }
528    
529      ZVec norm(ZVec v) const {      ZVec norm(ZVec v) const {
# Line 539  struct Fillet3D { Line 539  struct Fillet3D {
539          const Transform &t0 = *t[2];          const Transform &t0 = *t[2];
540          const Transform &t1 = *t[3];          const Transform &t1 = *t[3];
541    
542          ZVec p0 = t0.transform(t0.getSqSize());          ZVec p0 = t0.transform(0.5 * t0.getSqSize());
543          ZVec p1 = t1.transform(t1.getSqSize());          ZVec p1 = t1.transform(0.5 * t1.getSqSize());
544    
545          float d = (p1 - p0).length() / 2;          float d = (p1 - p0).length() / 2;
546          float r = crad(t0);          float r = crad(t0);

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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