Jafar
|
00001 /* $Id$ */ 00002 00003 #ifndef _GEOM_ORIENTED_PLAN_HPP_ 00004 #define _GEOM_ORIENTED_PLAN_HPP_ 00005 00006 #include "geom/HyperPlane.hpp" 00007 #include "geom/Transferrable.hpp" 00008 00009 namespace jafar { 00010 namespace geom { 00015 template<int dimension> 00016 class OrientedPlan : public HyperPlane<dimension> { 00017 typedef Repere<dimension> RepereD; 00018 typedef HyperPlane<dimension> HyperPlaneD; 00019 typedef typename geom::Atom<dimension>::HomogenousVecD HomogenousVecD; 00020 typedef typename geom::Atom<dimension>::VecD VecD; 00021 typedef boost::numeric::ublas::bounded_matrix<double,dimension + 1 ,dimension + 1> MatrixD; 00022 class RepereDriver; 00023 public: 00027 class Driver { 00028 public: 00029 virtual ~Driver() {} 00033 virtual HomogenousVecD vec(unsigned int index) const = 0; 00037 virtual void localToReference(MatrixD&) const = 0; 00041 virtual Driver* cloneOrientedPlanDriver() const = 0; 00045 virtual typename HyperPlaneD::Driver* asHyperPlaneDriver() =0; 00046 }; 00050 class VectorsDriver : public Driver, public HyperPlaneD::Driver, public Transferrable<dimension> 00051 { 00052 public: 00060 VectorsDriver( const HomogenousVecD* repere, const HomogenousVecD& origin, const RepereD* reference = RepereD::global()); 00064 virtual HomogenousVecD origin() const; 00068 virtual HomogenousVecD vec(unsigned int index) const; 00072 virtual void localToReference(MatrixD&) const; 00076 virtual HomogenousVecD normal() const; 00080 virtual HomogenousVecD equation() const; 00081 virtual void changeReference( const RepereD* reference ); 00082 virtual const RepereD* reference( ) const; 00083 virtual typename HyperPlaneD::Driver* clone() const; 00084 virtual Driver* cloneOrientedPlanDriver() const ; 00085 virtual typename HyperPlaneD::Driver* asHyperPlaneDriver(); 00086 virtual bool hasCov() const { return false; } 00087 private: 00088 MatrixD m_matrix; 00089 const RepereD* m_reference; 00090 }; 00091 // class PolyLineDriver : public Driver, public HyperPlaneD::Driver, public Transferrable<dimension> 00092 // { 00093 // public: 00094 // PolyLineDriver( const PolyLine<dimension>* polyLine); 00095 // virtual HomogenousVecD vec(unsigned int index) const; 00096 // virtual void localToReference(MatrixD&) const; 00097 // virtual Driver* cloneOrientedPlanDriver() const; 00098 // virtual typename HyperPlaneD::Driver* asHyperPlaneDriver() const; 00099 00100 // private: 00101 // const PolyLine<dimension>* m_polyLine; 00102 // }; 00103 00104 public: 00105 OrientedPlan(); 00109 template<typename _TDriver_> 00110 OrientedPlan( _TDriver_* d); 00111 OrientedPlan(const OrientedPlan&); 00112 ~OrientedPlan(); 00113 inline OrientedPlan& operator=(const OrientedPlan& rhs); 00114 virtual typename Atom<dimension>::Type type() const { return Atom<dimension>::T_OrientedPlan; } 00118 inline HomogenousVecD vec(unsigned int index) const; 00119 inline void localToReference(MatrixD&) const; 00123 inline const RepereD* repere() const; 00124 private: 00125 Driver* m_driver; 00126 RepereD* m_repere; 00127 }; 00128 } 00129 } 00130 00131 #include "OrientedPlanImpl.hpp" 00132 00133 #endif
Generated on Wed Oct 15 2014 00:37:19 for Jafar by doxygen 1.7.6.1 |