proj home

Files   Classes   Functions   Hierarchy  

plane.h

Go to the documentation of this file.
00001 #ifndef PLANE_H
00002 #define PLANE_H
00003 
00004 #include <print.h>
00005 #include <point.h>
00006 #include <typedefs.h>
00007 #include <zero.h>
00008 
00015 class plane
00016 {
00017 public:
00018 
00020   point3<double> nml;
00022   double d0;
00023 
00025   boolc nmlxIsZero() const
00026     { return nml.x*nml.x<zero<double>::val; }
00028   boolc nmlyIsZero() const
00029     { return nml.y*nml.y<zero<double>::val; }
00031   boolc nmlzIsZero() const
00032     { return nml.z*nml.z<zero<double>::val; }
00033 
00035   plane( point3<double> const & nml_, doublec d0_ )
00036     : nml(nml_), d0(d0_) {}
00037 
00039   plane
00040   (
00041     bool & valid,
00042     point3<double> const & p0,
00043     point3<double> const & p1,
00044     point3<double> const & p2
00045   );
00046 
00049   boolc intersects
00050   ( 
00051     point3<double> & A,
00052     point3<double> & B,
00053     plane const & P2 
00054   ) const;
00055 
00057   boolc isPointOnPlane( point3<double> const & p ) const
00058     { return zero<double>::test(nml.dot(p)-d0); }
00059 
00062   operator stringc () const;
00063 
00064 };
00065 
00066 #endif
00067 

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