test-Point3D.C

00001 #include "Point3D.H"
00002 #include "Globals.H"
00003 
00004 int main( int argc, const char* argv[] )
00005 {
00006   Point3D pt1 = Point3D(1,1,1);
00007   Point3D pt2 = Point3D(2,2,2);
00008 
00009   Point3D sum = pt1 + pt2;
00010 
00011   std::cout<<"Sum X: "<<sum.x<<" Sum Y: "<<sum.y<<" Sum Z: "<<sum.z<<std::endl;
00012 
00013   std::cout<<"Distance between pt1 and sum is: "<<pt1.distance(sum)<<std::endl;
00014 
00015   std::cout<<"Type of sum: "<<typeid(pt1).name()<<std::endl;
00016 
00017   if(typeid(pt1).name() == typeid(pt2).name())
00018     {
00019       std::cout<<"pt1 and pt2 have equal types"<<std::endl;
00020     }
00021 
00022   return 0;
00023 }
Generated on Sun May 8 08:40:19 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3