ray2D.h

Go to the documentation of this file.
00001 
00015 #ifndef DLR_GEOMETRY_RAY2D_H
00016 #define DLR_GEOMETRY_RAY2D_H
00017 
00018 #include <iostream>
00019 #include <dlrNumeric/vector2D.h>
00020 
00021 namespace dlr {
00022 
00023   namespace geometry {
00024     
00028     class Ray2D {
00029     public:
00030       
00035       Ray2D()
00036         : m_origin(0.0, 0.0), m_direction(1.0, 0.0) {}
00037 
00038     
00050       Ray2D(const Vector2D& point,
00051             const Vector2D& direction,
00052             bool normalize = true);
00053 
00054 
00067       Ray2D(double aa, double bb, double cc);
00068       
00069     
00076       Ray2D(const Ray2D& source);
00077 
00078 
00082       ~Ray2D() {}
00083 
00084       
00093       Ray2D&
00094       operator=(const Ray2D& source);
00095 
00096 
00103       const Vector2D&
00104       getDirection() const {return m_direction;}
00105       
00106 
00113       const Vector2D&
00114       getDirectionVector() const {return this->getDirection();}
00115       
00116 
00123       const Vector2D&
00124       getOrigin() const {return m_origin;}
00125 
00126 
00127    private:
00128       // Private member functions.
00129 
00130       // Private data members.
00131       Vector2D m_origin;
00132       Vector2D m_direction;
00133 
00134     }; // class Ray2D
00135 
00136 
00137     
00138     /* ======= Non-member functions. ======= */
00139 
00140     std::ostream&
00141     operator<<(std::ostream& stream, const Ray2D& ray);
00142     
00143     
00144   } // namespace utilities
00145     
00146 } // namespace dlr
00147 
00148 
00149 /* ======= Inline and template function definitions. ======= */
00150 
00151 namespace dlr {
00152 
00153   namespace geometry {
00154 
00155     
00156   } // namespace geometry
00157   
00158 } // namespace dlr
00159 
00160 
00161 #endif /* #ifndef DLR_GEOMETRY_RAY2D_H */

Generated on Wed Nov 25 11:45:25 2009 for dlrGeometry Utility Library by  doxygen 1.5.8