proj home

Files   Classes   Functions   Hierarchy  

d2linesegment.cpp

Go to the documentation of this file.
00001 #include <mathlib.h>
00002 
00003 #include <d2linesegment.h>
00004 
00005 void d2linesegment::translate( pt2c & x )
00006 {
00007   for (uint i=0; i<2; ++i)
00008     v[i] += x; 
00009 }
00010 
00011 void d2linesegment::rotate(double const theta)
00012 {
00013   R.setRotateAboutPoint(theta,v[0]);
00014 
00015   for (uint i=0; i<2; ++i)
00016     R.matrixMultiply(v[i]);
00017 }
00018 
00019 bool const d2linesegment::intersects(d2linesegment const & s2) const
00020 {
00021   return lineSegmentIntersection(v[0],v[1],s2.v[0],v2.v[1],1E-5);
00022 }
00023 
00024 

Generated on Fri Mar 4 00:49:27 2011 for Chelton Evans Source by  doxygen 1.5.8