00001
00040 #define _EXPORT_CCL_
00041
00042
00043 #include "CigiBaseSymbolSurfaceDef.h"
00044 #include "CigiExceptions.h"
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 CigiBaseSymbolSurfaceDef::CigiBaseSymbolSurfaceDef(void)
00056 {
00057 }
00058
00059
00060
00061
00062 CigiBaseSymbolSurfaceDef::~CigiBaseSymbolSurfaceDef(void)
00063 {
00064 }
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 int CigiBaseSymbolSurfaceDef::GetCnvt(CigiVersionID &CnvtVersion,
00076 CigiCnvtInfoType::Type &CnvtInfo)
00077 {
00078 if(CnvtVersion.GetCombinedCigiVersion() < 0x303)
00079 {
00080 CnvtInfo.ProcID = CigiProcessType::ProcNone;
00081 CnvtInfo.CnvtPacketID = 0;
00082 }
00083 else
00084 {
00085 CnvtInfo.ProcID = CigiProcessType::ProcStd;
00086 CnvtInfo.CnvtPacketID = CIGI_SYMBOL_SURFACE_DEF_PACKET_ID_V3_3;
00087 }
00088
00089 return(CIGI_SUCCESS);
00090 }
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 int CigiBaseSymbolSurfaceDef::SetSurfaceState(
00101 const StateGrp SurfaceStateIn, bool bndchk)
00102 {
00103
00104 #ifndef CIGI_NO_BND_CHK
00105 if(bndchk && ((SurfaceStateIn < Active)||(SurfaceStateIn > Destroyed)))
00106 {
00107 #ifndef CIGI_NO_EXCEPT
00108 throw CigiValueOutOfRangeException("Surface State",
00109 (int)SurfaceStateIn,0,1);
00110 #endif
00111 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00112 }
00113 #endif
00114
00115 SurfaceState = SurfaceStateIn;
00116
00117 return(CIGI_SUCCESS);
00118
00119 }
00120
00121
00122
00123
00124 int CigiBaseSymbolSurfaceDef::SetAttached(
00125 const AttachStateGrp AttachedIn, bool bndchk)
00126 {
00127
00128 #ifndef CIGI_NO_BND_CHK
00129 if(bndchk && ((AttachedIn < EntityAttached) ||
00130 (AttachedIn > ViewAttached)))
00131 {
00132 #ifndef CIGI_NO_EXCEPT
00133 throw CigiValueOutOfRangeException("Attached State",
00134 (int)AttachedIn,0,1);
00135 #endif
00136 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00137 }
00138 #endif
00139
00140 Attached = AttachedIn;
00141
00142 return(CIGI_SUCCESS);
00143
00144 }
00145
00146
00147
00148
00149 int CigiBaseSymbolSurfaceDef::SetBillboardState(
00150 const BillboardStateGrp BillboardStateIn, bool bndchk)
00151 {
00152
00153 #ifndef CIGI_NO_BND_CHK
00154 if(bndchk && ((BillboardStateIn < NotBillboard) ||
00155 (BillboardStateIn > Billboard)))
00156 {
00157 #ifndef CIGI_NO_EXCEPT
00158 throw CigiValueOutOfRangeException("Billboard State",
00159 (int)BillboardStateIn,0,1);
00160 #endif
00161 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00162 }
00163 #endif
00164
00165 BillboardState = BillboardStateIn;
00166
00167 return(CIGI_SUCCESS);
00168
00169 }
00170
00171
00172
00173
00174 int CigiBaseSymbolSurfaceDef::SetPerspectiveGrowth(
00175 const PerspectiveGrowthStateGrp PerspectiveGrowthIn, bool bndchk)
00176 {
00177
00178 #ifndef CIGI_NO_BND_CHK
00179 if(bndchk && ((PerspectiveGrowthIn < Disable) ||
00180 (PerspectiveGrowthIn > Enable)))
00181 {
00182 #ifndef CIGI_NO_EXCEPT
00183 throw CigiValueOutOfRangeException("Perspective Growth",
00184 (int)PerspectiveGrowthIn,0,1);
00185 #endif
00186 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00187 }
00188 #endif
00189
00190 PerspectiveGrowth = PerspectiveGrowthIn;
00191
00192 return(CIGI_SUCCESS);
00193
00194 }
00195
00196
00197
00198
00199 int CigiBaseSymbolSurfaceDef::SetYaw(const float YawIn, bool bndchk)
00200 {
00201
00202 #ifndef CIGI_NO_BND_CHK
00203 if(bndchk && ((YawIn < 0.0) ||
00204 (YawIn > 360.0)))
00205 {
00206 #ifndef CIGI_NO_EXCEPT
00207 throw CigiValueOutOfRangeException("Yaw",
00208 (float)YawIn,0.0,360.0);
00209 #endif
00210 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00211 }
00212 #endif
00213
00214 YawBottom = YawIn;
00215
00216 return(CIGI_SUCCESS);
00217
00218 }
00219
00220
00221
00222
00223 int CigiBaseSymbolSurfaceDef::SetPitch(const float PitchIn, bool bndchk)
00224 {
00225
00226 #ifndef CIGI_NO_BND_CHK
00227 if(bndchk && ((PitchIn < -90.0) ||
00228 (PitchIn > 90.0)))
00229 {
00230 #ifndef CIGI_NO_EXCEPT
00231 throw CigiValueOutOfRangeException("Pitch",
00232 (float)PitchIn,-90.0,90.0);
00233 #endif
00234 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00235 }
00236 #endif
00237
00238 Pitch = PitchIn;
00239
00240 return(CIGI_SUCCESS);
00241
00242 }
00243
00244
00245
00246
00247 int CigiBaseSymbolSurfaceDef::SetRoll(const float RollIn, bool bndchk)
00248 {
00249
00250 #ifndef CIGI_NO_BND_CHK
00251 if(bndchk && ((RollIn < -180.0) ||
00252 (RollIn > 180.0)))
00253 {
00254 #ifndef CIGI_NO_EXCEPT
00255 throw CigiValueOutOfRangeException("Roll",
00256 (float)RollIn,-180.0,180.0);
00257 #endif
00258 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00259 }
00260 #endif
00261
00262 Roll = RollIn;
00263
00264 return(CIGI_SUCCESS);
00265
00266 }
00267
00268
00269
00270
00271 int CigiBaseSymbolSurfaceDef::SetLeftEdgePosition(
00272 const float LeftEdgePosition, bool bndchk)
00273 {
00274
00275 #ifndef CIGI_NO_BND_CHK
00276 if(bndchk && ((LeftEdgePosition < 0.0) ||
00277 (LeftEdgePosition > 1.0)))
00278 {
00279 #ifndef CIGI_NO_EXCEPT
00280 throw CigiValueOutOfRangeException("Left Edge Position",
00281 (float)LeftEdgePosition,0.0,1.0);
00282 #endif
00283 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00284 }
00285 #endif
00286
00287 XLeft = LeftEdgePosition;
00288
00289 return(CIGI_SUCCESS);
00290
00291 }
00292
00293
00294
00295
00296 int CigiBaseSymbolSurfaceDef::SetRightEdgePosition(
00297 const float RightEdgePosition, bool bndchk)
00298 {
00299
00300 #ifndef CIGI_NO_BND_CHK
00301 if(bndchk && ((RightEdgePosition < 0.0) ||
00302 (RightEdgePosition > 1.0)))
00303 {
00304 #ifndef CIGI_NO_EXCEPT
00305 throw CigiValueOutOfRangeException("Right Edge Position",
00306 (float)RightEdgePosition,0.0,1.0);
00307 #endif
00308 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00309 }
00310 #endif
00311
00312 YRight = RightEdgePosition;
00313
00314 return(CIGI_SUCCESS);
00315
00316 }
00317
00318
00319
00320
00321 int CigiBaseSymbolSurfaceDef::SetTopEdgePosition(
00322 const float TopEdgePosition, bool bndchk)
00323 {
00324
00325 #ifndef CIGI_NO_BND_CHK
00326 if(bndchk && ((TopEdgePosition < 0.0) ||
00327 (TopEdgePosition > 1.0)))
00328 {
00329 #ifndef CIGI_NO_EXCEPT
00330 throw CigiValueOutOfRangeException("Top Edge Position",
00331 (float)TopEdgePosition,0.0,1.0);
00332 #endif
00333 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00334 }
00335 #endif
00336
00337 ZTop = TopEdgePosition;
00338
00339 return(CIGI_SUCCESS);
00340
00341 }
00342
00343
00344
00345
00346 int CigiBaseSymbolSurfaceDef::SetBottomEdgePosition(
00347 const float BottomEdgePosition, bool bndchk)
00348 {
00349
00350 #ifndef CIGI_NO_BND_CHK
00351 if(bndchk && ((BottomEdgePosition < 0.0) ||
00352 (BottomEdgePosition > 1.0)))
00353 {
00354 #ifndef CIGI_NO_EXCEPT
00355 throw CigiValueOutOfRangeException("Bottom Edge Position",
00356 (float)BottomEdgePosition,0.0,1.0);
00357 #endif
00358 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00359 }
00360 #endif
00361
00362 YawBottom = BottomEdgePosition;
00363
00364 return(CIGI_SUCCESS);
00365
00366 }
00367
00368
00369
00370