00001
00002
00004
00006
00007
00008
00009
00010
00011 #ifndef _Direction_h
00012 #define _Direction_h
00013
00019 #include "BaseSRF.h"
00020 #include "Exception.h"
00021
00022 namespace srm
00023 {
00024
00029 class EXPORT_SRM_CPP_DLL Direction
00030 {
00031 public:
00032
00036 BaseSRF *getSRF() const {
00037 return _srf;
00038 }
00039
00043 void getRefCoord( Coord3D &coord ) const;
00044
00046 void getDir( Vector3 vec ) const;
00047
00049 SRM_Long_Float getVectorComp1() const;
00050
00052 SRM_Long_Float getVectorComp2() const;
00053
00055 SRM_Long_Float getVectorComp3() const;
00056
00061 SRM_Long_Float getVectorComp( SRM_Integer index ) const;
00062
00064 void setVectorComp( const SRM_Long_Float comp1,
00065 const SRM_Long_Float comp2,
00066 const SRM_Long_Float comp3 );
00067
00072 void setVectorComp( const SRM_Integer index,
00073 const SRM_Long_Float comp );
00074
00076 void setVector( const Vector3 vec );
00077
00079 bool isEqual( const Direction &dir ) const;
00080
00082 Direction* makeCopy() const;
00083
00084 protected:
00085
00086 friend class BaseSRF_3D;
00087 friend class Orientation;
00088
00092 Direction( BaseSRF *srf,
00093 const Vector3 ref_coord,
00094 const Vector3 vec );
00095
00097 virtual ~Direction() {
00098 _srf->release();
00099 }
00100
00101 Direction &operator =( const Direction & ) { return *this; }
00102
00104 BaseSRF *_srf;
00106 Vector3 _ref_coord;
00108 Vector3 _vec;
00109 };
00110
00111 }
00112
00113 #endif // _Direction_h
00114