contrib/oxl/mvl/HomgPlane3D.h
Go to the documentation of this file.
00001 // This is oxl/mvl/HomgPlane3D.h
00002 #ifndef HomgPlane3D_h_
00003 #define HomgPlane3D_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Homogeneous 4-vector for a 3D plane
00010 //
00011 // A class to hold a homogeneous 4-vector for a 3D plane.
00012 
00013 #include <mvl/Homg3D.h>
00014 #include <vcl_iosfwd.h>
00015 
00016 class HomgPoint3D;
00017 
00018 class HomgPlane3D : public Homg3D
00019 {
00020  public:
00021   // Constructors/Initializers/Destructors-------------------------------------
00022 
00023   HomgPlane3D ();
00024   HomgPlane3D (double x, double y, double z, double w);
00025   HomgPlane3D (const vnl_vector<double>& n, double d);
00026   HomgPlane3D (const vnl_vector<double>& v): Homg3D(v) {}
00027   ~HomgPlane3D ();
00028 
00029   // Utility Methods-----------------------------------------------------------
00030   HomgPoint3D closest_point(const HomgPoint3D& x) const;
00031   double distance(const HomgPoint3D& x) const;
00032 
00033   vnl_vector<double> n() const { return homg_vector_.extract(3).normalize(); }
00034 };
00035 
00036 vcl_ostream& operator<<(vcl_ostream&, const HomgPlane3D&);
00037 
00038 #endif // HomgPlane3D_h_