Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Direction.h

Go to the documentation of this file.
00001 
00005 // SRM SDK Release 4.4.0 - December 7, 2009
00006 
00007 // - SRM spec. 4.4
00008 
00009 /*
00010  *                             NOTICE
00011  * 
00012  * This software is provided openly and freely for use in representing and
00013  * interchanging environmental data & databases.
00014  * 
00015  * This software was developed for use by the United States Government with
00016  * unlimited rights.  The software was developed under contract
00017  * DASG60-02-D-0006 TO-193 by Science Applications International Corporation.
00018  * The software is unclassified and is deemed as Distribution A, approved
00019  * for Public Release.
00020  * 
00021  * Use by others is permitted only upon the ACCEPTANCE OF THE TERMS AND
00022  * CONDITIONS, AS STIPULATED UNDER THE FOLLOWING PROVISIONS:
00023  * 
00024  *    1. Recipient may make unlimited copies of this software and give
00025  *       copies to other persons or entities as long as the copies contain
00026  *       this NOTICE, and as long as the same copyright notices that
00027  *       appear on, or in, this software remain.
00028  * 
00029  *    2. Trademarks. All trademarks belong to their respective trademark
00030  *       holders.  Third-Party applications/software/information are
00031  *       copyrighted by their respective owners.
00032  * 
00033  *    3. Recipient agrees to forfeit all intellectual property and
00034  *       ownership rights for any version created from the modification
00035  *       or adaptation of this software, including versions created from
00036  *       the translation and/or reverse engineering of the software design.
00037  * 
00038  *    4. Transfer.  Recipient may not sell, rent, lease, or sublicense
00039  *       this software.  Recipient may, however enable another person
00040  *       or entity the rights to use this software, provided that this
00041  *       AGREEMENT and NOTICE is furnished along with the software and
00042  *       /or software system utilizing this software.
00043  * 
00044  *       All revisions, modifications, created by the Recipient, to this
00045  *       software and/or related technical data shall be forwarded by the
00046  *       Recipient to the Government at the following address:
00047  * 
00048  *         SMDC
00049  *         Attention SEDRIS (TO193) TPOC
00050  *         P.O. Box 1500
00051  *         Hunstville, AL  35807-3801
00052  * 
00053  *         or via electronic mail to:  [email protected]
00054  * 
00055  *    5. No Warranty. This software is being delivered to you AS IS
00056  *       and there is no warranty, EXPRESS or IMPLIED, as to its use
00057  *       or performance.
00058  * 
00059  *       The RECIPIENT ASSUMES ALL RISKS, KNOWN AND UNKNOWN, OF USING
00060  *       THIS SOFTWARE.  The DEVELOPER EXPRESSLY DISCLAIMS, and the
00061  *       RECIPIENT WAIVES, ANY and ALL PERFORMANCE OR RESULTS YOU MAY
00062  *       OBTAIN BY USING THIS SOFTWARE OR DOCUMENTATION.  THERE IS
00063  *       NO WARRANTY, EXPRESS OR, IMPLIED, AS TO NON-INFRINGEMENT OF
00064  *       THIRD PARTY RIGHTS, MERCHANTABILITY, OR FITNESS FOR ANY
00065  *       PARTICULAR PURPOSE.  IN NO EVENT WILL THE DEVELOPER, THE
00066  *       UNITED STATES GOVERNMENT OR ANYONE ELSE ASSOCIATED WITH THE
00067  *       DEVELOPMENT OF THIS SOFTWARE BE HELD LIABLE FOR ANY CONSEQUENTIAL,
00068  *       INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS
00069  *       OR LOST SAVINGS WHATSOEVER.
00070  */
00071 
00072 // SRM_OTHERS_GOES_HERE
00073 
00074 // $Id: Direction.h,v 1.13 2009/10/14 21:38:46 worleym Exp $
00075 
00076 #ifndef _Direction_h
00077 #define _Direction_h
00078 
00079 #include "BaseSRF.h" 
00080 #include "Exception.h"
00081 
00082 namespace srm
00083 {
00084 
00089 class EXPORT_SRM_CPP_DLL Direction
00090 {
00091 public:
00092 
00096     BaseSRF *getSRF() const
00097     {
00098         return _srf;
00099     }
00100 
00104     void getRefCoord( Coord3D &coord ) const;
00105 
00108     const SRM_Long_Float *getRefCoord() const;
00109 
00112     void getDir( SRM_Vector_3D &vec ) const;
00113 
00116     SRM_Long_Float getVectorComp1() const;
00117 
00120     SRM_Long_Float getVectorComp2() const;
00121 
00124     SRM_Long_Float getVectorComp3() const;
00125 
00130     SRM_Long_Float getVectorComp( SRM_Integer index ) const;
00131 
00134     void setVectorComp( const SRM_Long_Float comp1,
00135                         const SRM_Long_Float comp2,
00136                         const SRM_Long_Float comp3 );
00137 
00142     void setVectorComp( const SRM_Integer    index,
00143                         const SRM_Long_Float comp );
00144 
00147     void setVector( const SRM_Vector_3D &vec );
00148 
00151     bool isEqual( const Direction &dir ) const;
00152 
00155     Direction* makeCopy() const;
00156 
00157 protected:
00158     friend class BaseSRF_3D;
00159 
00163     Direction(      BaseSRF        *srf,
00164               const SRM_Long_Float  ref_coord[3],
00165               const SRM_Vector_3D  &vec);
00166 
00169     virtual ~Direction()
00170     {
00171         _srf->release();
00172     }
00173 
00174     Direction &operator =( const Direction & )
00175     { return *this; } 
00176 
00178     BaseSRF        *_srf;
00180     SRM_Long_Float  _ref_coord[3];
00182     SRM_Vector_3D  _vec;
00183 };
00184 
00185 } // namespace srm
00186 
00187 #endif // _Direction_h

Spatial Reference Model C++ API Version 4.4 - December 7, 2009
Copyright © 2009 SEDRIS Docs by Doxygen 1.3.2