00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #ifndef _LocalTangentSpaceCylindrical_h
00077 #define _LocalTangentSpaceCylindrical_h
00078
00079 #include "BaseSRF.h"
00080 #include "Coord.h"
00081 #include "Exception.h"
00082
00083 namespace srm
00084 {
00091 class EXPORT_SRM_CPP_DLL SRF_LocalTangentSpaceCylindrical: public BaseSRF_WithTangentPlaneSurface
00092 {
00093 public:
00097 static SRF_LocalTangentSpaceCylindrical* create( SRM_ORM_Code orm,
00098 SRM_RT_Code rt,
00099 const SRM_Local_Tangent_Parameters ¶ms);
00100
00104 static SRF_LocalTangentSpaceCylindrical* create(
00105 SRM_ORM_Code orm,
00106 SRM_RT_Code rt,
00107 SRM_Long_Float geodetic_longitude,
00108 SRM_Long_Float geodetic_latitude,
00109 SRM_Long_Float azimuth,
00110 SRM_Long_Float height_offset
00111 );
00112
00116 static SRF_LocalTangentSpaceCylindrical* create( SRM_SRF_Parameters_Info srf_params )
00117 {
00118 return create( srf_params.value.srf_template.orm_code,
00119 srf_params.rt_code,
00120 srf_params.value.srf_template.parameters.ltsc_srf_parameters );
00121 }
00122
00125 Coord3D* createCoordinate3D(SRM_Long_Float coord_comp1,
00126 SRM_Long_Float coord_comp2,
00127 SRM_Long_Float coord_comp3 );
00128
00131 CoordSurf* createSurfaceCoordinate(SRM_Long_Float coord_surf_comp1,
00132 SRM_Long_Float coord_surf_comp2 );
00133
00137 const SRM_Local_Tangent_Parameters &getSRFParameters() const;
00138
00142 SRM_Long_Float get_geodetic_longitude() const;
00143
00147 SRM_Long_Float get_geodetic_latitude() const;
00148
00152 SRM_Long_Float get_azimuth() const;
00153
00157 SRM_Long_Float get_height_offset() const;
00158
00161 virtual bool isA( SRF_ClassType type ) const;
00162
00165 virtual SRF_ClassType getClassType() const
00166 {
00167 return BaseSRF::SRF_TYP_LTSC;
00168 }
00169
00173 bool isEqual( const SRF_LocalTangentSpaceCylindrical &srf ) const;
00174
00178 bool operator==( const SRF_LocalTangentSpaceCylindrical &rhs ) const;
00179
00183 SRF_LocalTangentSpaceCylindrical* makeCopy() const;
00184
00188 const char* toString();
00189
00190 protected:
00191 SRF_LocalTangentSpaceCylindrical( void *impl ) : BaseSRF_WithTangentPlaneSurface(impl) {}
00192 SRF_LocalTangentSpaceCylindrical &operator =( const SRF_LocalTangentSpaceCylindrical & ) { return *this; }
00193 virtual ~SRF_LocalTangentSpaceCylindrical() {}
00194 };
00195
00196
00197 inline bool SRF_LocalTangentSpaceCylindrical::isA( SRF_ClassType type ) const
00198 {
00199 if (type == BaseSRF::SRF_TYP_LTSC)
00200 return true;
00201 else
00202 return BaseSRF_WithTangentPlaneSurface::isA(type);
00203 };
00204
00205
00207 typedef SRF_LocalTangentSpaceCylindrical SRF_LTSC;
00208
00209
00214 class EXPORT_SRM_CPP_DLL Coord3D_LocalTangentSpaceCylindrical: public Coord3D
00215 {
00216 public:
00219 Coord3D_LocalTangentSpaceCylindrical(SRF_LocalTangentSpaceCylindrical *srf,
00220 SRM_Long_Float angle = 0.0,
00221 SRM_Long_Float radius = 0.0,
00222 SRM_Long_Float height = 0.0 )
00223 : Coord3D(srf)
00224 {
00225 setComponentValues(angle, radius, height);
00226 }
00227
00230 Coord3D_LocalTangentSpaceCylindrical( const Coord3D_LocalTangentSpaceCylindrical &coord )
00231 : Coord3D(coord._srf)
00232 {
00233 setComponentValues( coord._values[0], coord._values[1], coord._values[2] );
00234 }
00235
00241 void copyTo( Coord3D_LocalTangentSpaceCylindrical &coord ) const
00242 {
00243 if (coord._srf != _srf)
00244 throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00245
00246 coord._values[0] = _values[0];
00247 coord._values[1] = _values[1];
00248 coord._values[2] = _values[2];
00249 }
00250
00254 bool isEqual( const Coord3D_LocalTangentSpaceCylindrical &coord ) const
00255 {
00256 return (_srf == coord._srf &&
00257 _values[0] == coord._values[0] &&
00258 _values[1] == coord._values[1] &&
00259 _values[2] == coord._values[2] );
00260 }
00261
00264 void setComponentValues( SRM_Long_Float angle, SRM_Long_Float radius, SRM_Long_Float height )
00265 {
00266 _values[0] = angle;
00267 _values[1] = radius;
00268 _values[2] = height;
00269 }
00270
00273 SRM_Long_Float get_angle() const
00274 {
00275 return _values[0];
00276 }
00277
00280 SRM_Long_Float get_radius() const
00281 {
00282 return _values[1];
00283 }
00284
00287 SRM_Long_Float get_height() const
00288 {
00289 return _values[2];
00290 }
00291
00294 void set_angle( SRM_Long_Float value )
00295 {
00296 _values[0] = value;
00297 }
00298
00301 void set_radius( SRM_Long_Float value )
00302 {
00303 _values[1] = value;
00304 }
00305
00308 void set_height( SRM_Long_Float value )
00309 {
00310 _values[2] = value;
00311 }
00312
00315 virtual bool isA( Coord_ClassType type ) const;
00316
00319 virtual Coord_ClassType getClassType() const
00320 {
00321 return Coord::COORD_TYP_LTSC;
00322 }
00323
00326 bool operator==( const Coord3D_LocalTangentSpaceCylindrical &rhs ) const;
00327
00333 bool isCompatibleWith( const Coord3D_LocalTangentSpaceCylindrical &rhs ) const {
00334 return ((*(SRF_LocalTangentSpaceCylindrical*)(this->_srf)) == (*(SRF_LocalTangentSpaceCylindrical*)(rhs._srf)));
00335 }
00336
00342 Coord3D_LocalTangentSpaceCylindrical &operator= ( const Coord3D_LocalTangentSpaceCylindrical &rhs )
00343 {
00344 if((*(SRF_LocalTangentSpaceCylindrical*)(this->_srf)) == (*(SRF_LocalTangentSpaceCylindrical*)(rhs._srf)))
00345 {
00346 _values[0] = rhs._values[0];
00347 _values[1] = rhs._values[1];
00348 _values[2] = rhs._values[2];
00349 }
00350 else
00351 throw Exception(SRM_STATCOD_INVALID_TARGET_COORDINATE,
00352 "SRF_LocalTangentSpaceCylindrical op=: incompatible rhs coordinate");
00353
00354 return *this;
00355 }
00356 };
00357
00358
00359 inline bool Coord3D_LocalTangentSpaceCylindrical::isA( Coord_ClassType type ) const
00360 {
00361 if (type == Coord::COORD_TYP_LTSC)
00362 return true;
00363 else
00364 return Coord3D::isA(type);
00365 };
00366
00367
00369 typedef Coord3D_LocalTangentSpaceCylindrical Coord3D_LTSC;
00370
00371
00376 class EXPORT_SRM_CPP_DLL CoordSurf_LocalTangentSpaceCylindrical: public CoordSurf
00377 {
00378 public:
00381 CoordSurf_LocalTangentSpaceCylindrical( SRF_LocalTangentSpaceCylindrical *srf,
00382 SRM_Long_Float angle = 0.0,
00383 SRM_Long_Float radius = 0.0 )
00384 : CoordSurf(srf)
00385 {
00386 setComponentValues(angle, radius);
00387 }
00388
00391 CoordSurf_LocalTangentSpaceCylindrical( const CoordSurf_LocalTangentSpaceCylindrical &coord )
00392 : CoordSurf(coord._srf)
00393 {
00394 setComponentValues( coord._values[0], coord._values[1] );
00395 }
00396
00402 void copyTo( CoordSurf_LocalTangentSpaceCylindrical &coord ) const
00403 {
00404 if (coord._srf != _srf)
00405 throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00406
00407 coord._values[0] = _values[0];
00408 coord._values[1] = _values[1];
00409 }
00410
00414 bool isEqual( const CoordSurf_LocalTangentSpaceCylindrical &coord ) const
00415 {
00416 return (_srf == coord._srf &&
00417 _values[0] == coord._values[0] &&
00418 _values[1] == coord._values[1] );
00419 }
00420
00423 void setComponentValues( SRM_Long_Float angle, SRM_Long_Float radius )
00424 {
00425 _values[0] = angle;
00426 _values[1] = radius;
00427 }
00428
00431 SRM_Long_Float get_angle() const
00432 {
00433 return _values[0];
00434 }
00435
00438 SRM_Long_Float get_radius() const
00439 {
00440 return _values[1];
00441 }
00442
00445 void set_angle( SRM_Long_Float value )
00446 {
00447 _values[0] = value;
00448 }
00449
00452 void set_radius( SRM_Long_Float value )
00453 {
00454 _values[1] = value;
00455 }
00456
00459 virtual bool isA( Coord_ClassType type ) const;
00460
00463 virtual Coord_ClassType getClassType() const
00464 {
00465 return Coord::COORD_TYP_SURF_LTSC;
00466 }
00467
00470 bool operator==( const CoordSurf_LocalTangentSpaceCylindrical &rhs ) const;
00471
00477 bool isCompatibleWith( const CoordSurf_LocalTangentSpaceCylindrical &rhs ) const
00478 {
00479 return ((*(SRF_LocalTangentSpaceCylindrical*)(this->_srf)) == (*(SRF_LocalTangentSpaceCylindrical*)(rhs._srf)));
00480 }
00481
00487 CoordSurf_LocalTangentSpaceCylindrical &operator= ( const CoordSurf_LocalTangentSpaceCylindrical &rhs )
00488 {
00489 if((*(SRF_LocalTangentSpaceCylindrical*)(this->_srf)) == (*(SRF_LocalTangentSpaceCylindrical*)(rhs._srf)))
00490 {
00491 _values[0] = rhs._values[0];
00492 _values[1] = rhs._values[1];
00493 }
00494 else
00495 throw Exception(SRM_STATCOD_INVALID_TARGET_COORDINATE,
00496 "CoordSurf_LocalTangentSpaceCylindrical op=: incompatible rhs coordinate");
00497
00498 return *this;
00499 }
00500 };
00501
00502
00503 inline bool CoordSurf_LocalTangentSpaceCylindrical::isA( Coord_ClassType type ) const
00504 {
00505 if (type == Coord::COORD_TYP_SURF_LTSC)
00506 return true;
00507 else
00508 return CoordSurf::isA(type);
00509 };
00510
00511
00513 typedef CoordSurf_LocalTangentSpaceCylindrical CoordSurf_LTSC;
00514
00515 }
00516
00517 #endif // _LocalTangentSpaceCylindrical_h