00001
00045 #define _EXPORT_CCL_
00046
00047 #include "CigiBaseConfClampEntityCtrl.h"
00048 #include "CigiBaseEntityCtrl.h"
00049 #include "CigiSwapping.h"
00050 #include "CigiExceptions.h"
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 CigiBaseConfClampEntityCtrl::CigiBaseConfClampEntityCtrl()
00062 {
00063
00064 }
00065
00066
00067
00068
00069
00070
00071 CigiBaseConfClampEntityCtrl::~CigiBaseConfClampEntityCtrl()
00072 {
00073
00074 }
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 int CigiBaseConfClampEntityCtrl::GetCnvt(CigiVersionID &CnvtVersion,
00086 CigiCnvtInfoType::Type &CnvtInfo)
00087 {
00088 if(CnvtVersion.CigiMajorVersion < 3)
00089 {
00090 CnvtInfo.ProcID = CigiProcessType::ProcNone;
00091 CnvtInfo.CnvtPacketID = 0;
00092 }
00093 else
00094 {
00095 CnvtInfo.ProcID = CigiProcessType::ProcStd;
00096 CnvtInfo.CnvtPacketID = CIGI_CONF_CLAMP_ENTITY_CTRL_PACKET_ID_V3;
00097 }
00098
00099 return(CIGI_SUCCESS);
00100 }
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 int CigiBaseConfClampEntityCtrl::SetYaw(const float YawIn, bool bndchk)
00112 {
00113
00114 #ifndef CIGI_NO_BND_CHK
00115 if(bndchk && ((YawIn < 0.0)||(YawIn > 360.0)))
00116 {
00117 #ifndef CIGI_NO_EXCEPT
00118 throw CigiValueOutOfRangeException("Yaw",(float)YawIn,0.0,360.0);
00119 #endif
00120 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00121 }
00122 #endif
00123
00124 Yaw = YawIn;
00125 return(CIGI_SUCCESS);
00126
00127 }
00128
00129
00130
00131
00132
00133 int CigiBaseConfClampEntityCtrl::SetLat(const double LatIn, bool bndchk)
00134 {
00135
00136 #ifndef CIGI_NO_BND_CHK
00137 if(bndchk && ((LatIn < -90.0)||(LatIn > 90.0)))
00138 {
00139 #ifndef CIGI_NO_EXCEPT
00140 throw CigiValueOutOfRangeException("Lat",(double)LatIn,-90.0,90.0);
00141 #endif
00142 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00143 }
00144 #endif
00145
00146 Lat = LatIn;
00147 return(CIGI_SUCCESS);
00148
00149 }
00150
00151
00152
00153
00154
00155 int CigiBaseConfClampEntityCtrl::SetLon(const double LonIn, bool bndchk)
00156 {
00157
00158 #ifndef CIGI_NO_BND_CHK
00159 if(bndchk && ((LonIn < -180.0)||(LonIn > 180.0)))
00160 {
00161 #ifndef CIGI_NO_EXCEPT
00162 throw CigiValueOutOfRangeException("Lon",(double)LonIn,-180.0,180.0);
00163 #endif
00164 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00165 }
00166 #endif
00167
00168 Lon = LonIn;
00169 return(CIGI_SUCCESS);
00170
00171 }
00172
00173