point.cc

Go to the documentation of this file.
00001 #include "point.h"
00002 
00003 #include "vertex.h"
00004 
00005 void Point::add (double j,double k,double l)
00006 {
00007   double t=(x-j)*(x-j)+(y-k)*(y-k)+(z-l)*(z-l);
00008   if (t<L){a=j;b=k;c=l;L=t;}
00009 }
00010 
00011 Point::Point (double j,double k,double l)
00012   :x(j),y(k),z(l),a(0),b(0),c(0),L(1E300)
00013 {
00014 }
00015 
00016 void Point::clear (void)
00017 {
00018   a=b=c=0.0;
00019   L=1e300;
00020 }
00021 
00022 double Point::getClosestX (void) const
00023 {
00024   return a;
00025 }
00026 
00027 double Point::getClosestY (void) const
00028 {
00029   return b;
00030 }
00031 
00032 double Point::getClosestZ (void) const
00033 {
00034   return c;
00035 }
00036 
00037 double Point::getSqD (void) const
00038 {
00039   return L;
00040 }
00041 

Generated on Fri Jul 18 19:43:40 2008 for meshmorph by  doxygen 1.5.1