Files Classes Functions Hierarchy
#include <d3circlepartition.h>
Public Member Functions | |
| d3circlepartition () | |
| d3circlepartition (pt2c _x0, double const _radius) | |
| bool const | isInside (pt3c &x) const |
| bool const | intersection (pt3 &x, pt3c &w, pt3c &b) const |
| bool const | isOnBoundary (pt3c &w, double const zero) const |
Public Attributes | |
| pt2 | x0 |
| double | radius |
Definition at line 12 of file d3circlepartition.h.
| d3circlepartition::d3circlepartition | ( | ) | [inline] |
| d3circlepartition::d3circlepartition | ( | pt2c | _x0, | |
| double const | _radius | |||
| ) | [inline] |
Definition at line 7 of file d3circlepartition.cpp.
References point2< T >::dot(), solvequadratic(), point3< T >::x, and point3< T >::y.
00012 { 00013 pt2c w2(w.x-x0.x,w.y-x0.y); 00014 pt2c b2(b.x-x0.x,b.y-x0.y); 00015 00016 pt2c b3(b2-w2); 00017 double const q0 = b3.dot(); 00018 double const q1 = w2.dot(b3)*2.0; 00019 double const q2 = w2.dot()-radius*radius; 00020 00021 double t0; 00022 double t1; 00023 bool res = solvequadratic(t0,t1,q0,q1,q2); 00024 if (res==false) 00025 return false; 00026 00027 double t = -1; 00028 if ((t0>=0.0) && (t0<=1.0)) 00029 t = t0; 00030 if ((t1>=0.0) && (t1<=1.0)) 00031 t = t1; 00032 x = w + (b-w)*t; 00033 00034 if (t==-1) 00035 return false; 00036 00037 return true; 00038 }
Definition at line 25 of file d3circlepartition.h.
References point2< T >::dot(), radius, point3< T >::x, x0, and point3< T >::y.
Definition at line 41 of file d3circlepartition.cpp.
References point2< T >::dot(), point3< T >::x, and point3< T >::y.
00045 { 00046 pt2c z(w.x-x0.x,w.y-x0.y); 00047 double const d = z.dot() - radius*radius; 00048 00049 if (0 < (d + zero)) 00050 { 00051 //if ( zero + d < zero + zero ) 00052 if ( d < zero ) 00053 return true; 00054 } 00055 00056 return false; 00057 }
| double d3circlepartition::radius |
Definition at line 17 of file d3circlepartition.h.
Referenced by d3circlepartitiondraw::draw(), and isInside().
Definition at line 16 of file d3circlepartition.h.
Referenced by d3circlepartitiondraw::draw(), isInside(), and d3circlepartitiondraw::translate().
1.5.8