00001
00002
00003
00004
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 #include <stdlib.h>
00040 #include <stdio.h>
00041
00042 #include "OSGConfig.h"
00043
00044 OSG_BEGIN_NAMESPACE
00045
00046 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00047
00048
00049
00050 template<> inline
00051 Pnt3f GeoProperty<GeoPositions2sPropertyDesc>::getValue(const UInt32 index)
00052 {
00053 return Pnt3f(_field[index][0], _field[index][1], 0);
00054 }
00055
00056 template<> inline
00057 Pnt3f GeoProperty<GeoPositions2sPropertyDesc>::getValue(
00058 const UInt32 index) const
00059 {
00060 return Pnt3f(_field[index][0], _field[index][1], 0);
00061 }
00062
00063 template<> inline
00064 void GeoProperty<GeoPositions2sPropertyDesc>::getValue(
00065 Pnt3f &res,
00066 const UInt32 index)
00067 {
00068 res.setValues(_field[index][0], _field[index][1], 0);
00069 }
00070
00071 template<> inline
00072 void GeoProperty<GeoPositions2sPropertyDesc>::getValue(
00073 Pnt3f &res,
00074 const UInt32 index) const
00075 {
00076 res.setValues(_field[index][0], _field[index][1], 0);
00077 }
00078
00079 template<> inline
00080 void GeoProperty<GeoPositions2sPropertyDesc>::setValue(const Pnt3f &val,
00081 const UInt32 index)
00082 {
00083 _field[index].setValues(Int16(val[0]), Int16(val[1]));
00084 }
00085
00086 template<>
00087 inline
00088 void GeoProperty<GeoPositions2sPropertyDesc>::addValue(const Pnt3f &val)
00089 {
00090 _field.push_back(Pnt2s(Int16(val[0]), Int16(val[1])));
00091 }
00092
00093 template <> inline
00094 bool GeoProperty<GeoPositions2sPropertyDesc>::insertValue(const Pnt3f &val,
00095 const UInt32 index)
00096 {
00097 if(_field.size() < index)
00098 {
00099 return false;
00100 }
00101 else if(_field.size() == index)
00102 {
00103 addValue(val);
00104 return true;
00105 }
00106 else
00107 {
00108 _field.insert(_field.begin() + index, Pnt2s(Int16(val[0]),
00109 Int16(val[1])));
00110 return true;
00111 }
00112 }
00113
00114
00115
00116 template<> inline
00117 Pnt3f GeoProperty<GeoPositions3sPropertyDesc>::getValue(const UInt32 index)
00118 {
00119 return Pnt3f(_field[index][0], _field[index][1], _field[index][2]);
00120 }
00121
00122 template<> inline
00123 Pnt3f GeoProperty<GeoPositions3sPropertyDesc>::getValue(
00124 const UInt32 index) const
00125 {
00126 return Pnt3f(_field[index][0], _field[index][1], _field[index][2]);
00127 }
00128
00129 template<> inline
00130 void GeoProperty<GeoPositions3sPropertyDesc>::getValue(
00131 Pnt3f &res,
00132 const UInt32 index)
00133 {
00134 res.setValues(_field[index][0], _field[index][1], _field[index][2]);
00135 }
00136
00137 template<> inline
00138 void GeoProperty<GeoPositions3sPropertyDesc>::getValue(
00139 Pnt3f &res,
00140 const UInt32 index) const
00141 {
00142 res.setValues(Int16(_field[index][0]),
00143 Int16(_field[index][1]),
00144 Int16(_field[index][2]));
00145 }
00146
00147 template<> inline
00148 void GeoProperty<GeoPositions3sPropertyDesc>::setValue(const Pnt3f &val,
00149 const UInt32 index)
00150 {
00151 _field[index].setValues(Int16(val[0]), Int16(val[1]), Int16(val[2]));
00152 }
00153
00154 template<>
00155 inline
00156 void GeoProperty<GeoPositions3sPropertyDesc>::addValue(const Pnt3f &val)
00157 {
00158 _field.push_back(Pnt3s(Int16(val[0]), Int16(val[1]), Int16(val[2])));
00159 }
00160
00161 template <> inline
00162 bool GeoProperty<GeoPositions3sPropertyDesc>::insertValue(const Pnt3f &val,
00163 const UInt32 index)
00164 {
00165 if(_field.size() < index)
00166 {
00167 return false;
00168 }
00169 else if(_field.size() == index)
00170 {
00171 addValue(val);
00172 return true;
00173 }
00174 else
00175 {
00176 _field.insert(_field.begin() + index,
00177 Pnt3s(Int16(val[0]), Int16(val[1]), Int16(val[2])));
00178 return true;
00179 }
00180 }
00181
00182
00183
00184 template<> inline
00185 Pnt3f GeoProperty<GeoPositions4sPropertyDesc>::getValue(const UInt32 index)
00186 {
00187 return Pnt3f(_field[index][0], _field[index][1], _field[index][2]);
00188 }
00189
00190 template<> inline
00191 Pnt3f GeoProperty<GeoPositions4sPropertyDesc>::getValue(
00192 const UInt32 index) const
00193 {
00194 return Pnt3f(_field[index][0], _field[index][1], _field[index][2]);
00195 }
00196
00197 template<> inline
00198 void GeoProperty<GeoPositions4sPropertyDesc>::getValue(
00199 Pnt3f &res,
00200 const UInt32 index)
00201 {
00202 res.setValues(_field[index][0], _field[index][1], _field[index][2]);
00203 }
00204
00205 template<> inline
00206 void GeoProperty<GeoPositions4sPropertyDesc>::getValue(
00207 Pnt3f &res,
00208 const UInt32 index) const
00209 {
00210 res.setValues(_field[index][0], _field[index][1], _field[index][2]);
00211 }
00212
00213 template<> inline
00214 void GeoProperty<GeoPositions4sPropertyDesc>::setValue(const Pnt3f &val,
00215 const UInt32 index)
00216 {
00217 _field[index].setValues(Int16(val[0]), Int16(val[1]), Int16(val[2]), 1);
00218 }
00219
00220 template<>
00221 inline
00222 void GeoProperty<GeoPositions4sPropertyDesc>::addValue(const Pnt3f &val)
00223 {
00224 _field.push_back(Pnt4s(Int16(val[0]), Int16(val[1]), Int16(val[2]), 1));
00225 }
00226
00227 template <> inline
00228 bool GeoProperty<GeoPositions4sPropertyDesc>::insertValue(const Pnt3f &val,
00229 const UInt32 index)
00230 {
00231 if(_field.size() < index)
00232 {
00233 return false;
00234 }
00235 else if(_field.size() == index)
00236 {
00237 addValue(val);
00238 return true;
00239 }
00240 else
00241 {
00242 _field.insert(_field.begin() + index,
00243 Pnt4s(Int16(val[0]), Int16(val[1]), Int16(val[2]) ,1));
00244 return true;
00245 }
00246 }
00247
00248
00249
00250
00251
00252 template<> inline
00253 Pnt3f GeoProperty<GeoPositions2fPropertyDesc>::getValue(const UInt32 index)
00254 {
00255 return Pnt3f(_field[index][0], _field[index][1], 0);
00256 }
00257
00258 template<> inline
00259 Pnt3f GeoProperty<GeoPositions2fPropertyDesc>::getValue(
00260 const UInt32 index) const
00261 {
00262 return Pnt3f(_field[index][0], _field[index][1], 0);
00263 }
00264
00265 template<> inline
00266 void GeoProperty<GeoPositions2fPropertyDesc>::getValue(
00267 Pnt3f &res,
00268 const UInt32 index)
00269 {
00270 res.setValues(_field[index][0], _field[index][1], 0);
00271 }
00272
00273 template<> inline
00274 void GeoProperty<GeoPositions2fPropertyDesc>::getValue(
00275 Pnt3f &res,
00276 const UInt32 index) const
00277 {
00278 res.setValues(_field[index][0], _field[index][1], 0);
00279 }
00280
00281 template<> inline
00282 void GeoProperty<GeoPositions2fPropertyDesc>::setValue(const Pnt3f &val,
00283 const UInt32 index)
00284 {
00285 _field[index].setValues(val[0], val[1]);
00286 }
00287
00288 template<>
00289 inline
00290 void GeoProperty<GeoPositions2fPropertyDesc>::addValue(const Pnt3f &val)
00291 {
00292 _field.push_back(Pnt2f( val[0], val[1]));
00293 }
00294
00295 template <> inline
00296 bool GeoProperty<GeoPositions2fPropertyDesc>::insertValue(const Pnt3f &val,
00297 const UInt32 index)
00298 {
00299 if(_field.size() < index)
00300 {
00301 return false;
00302 }
00303 else if(_field.size() == index)
00304 {
00305 addValue(val);
00306 return true;
00307 }
00308 else
00309 {
00310 _field.insert(_field.begin() + index, Pnt2f(val[0], val[1]));
00311 return true;
00312 }
00313 }
00314
00315
00316
00317 template<> inline
00318 Pnt3f GeoProperty<GeoPositions4fPropertyDesc>::getValue(const UInt32 index)
00319 {
00320 return Pnt3f(_field[index][0], _field[index][1], _field[index][2]);
00321 }
00322
00323 template<> inline
00324 Pnt3f GeoProperty<GeoPositions4fPropertyDesc>::getValue(
00325 const UInt32 index) const
00326 {
00327 return Pnt3f(_field[index][0], _field[index][1], _field[index][2]);
00328 }
00329
00330 template<> inline
00331 void GeoProperty<GeoPositions4fPropertyDesc>::getValue(
00332 Pnt3f &res,
00333 const UInt32 index)
00334 {
00335 res.setValues(_field[index][0], _field[index][1], _field[index][2]);
00336 }
00337
00338 template<> inline
00339 void GeoProperty<GeoPositions4fPropertyDesc>::getValue(
00340 Pnt3f &res,
00341 const UInt32 index) const
00342 {
00343 res.setValues(_field[index][0], _field[index][1], _field[index][2]);
00344 }
00345
00346 template<> inline
00347 void GeoProperty<GeoPositions4fPropertyDesc>::setValue(const Pnt3f &val,
00348 const UInt32 index)
00349 {
00350 _field[index].setValues(val[0], val[1], val[2], 1);
00351 }
00352
00353 template<>
00354 inline
00355 void GeoProperty<GeoPositions4fPropertyDesc>::addValue(const Pnt3f &val)
00356 {
00357 _field.push_back(Pnt4f( val[0], val[1], val[2], 1));
00358 }
00359
00360 template <> inline
00361 bool GeoProperty<GeoPositions4fPropertyDesc>::insertValue(const Pnt3f &val,
00362 const UInt32 index)
00363 {
00364 if(_field.size() < index)
00365 {
00366 return false;
00367 }
00368 else if(_field.size() == index)
00369 {
00370 addValue(val);
00371 return true;
00372 }
00373 else
00374 {
00375 _field.insert(_field.begin() + index, Pnt4f(val[0],val[1],val[2],1));
00376 return true;
00377 }
00378 }
00379
00380
00381
00382
00383
00384 template<> inline
00385 Pnt3f GeoProperty<GeoPositions2dPropertyDesc>::getValue(const UInt32 index)
00386 {
00387 return Pnt3f(Real32(_field[index][0]),
00388 Real32(_field[index][1]),
00389 0.f);
00390 }
00391
00392 template<> inline
00393 Pnt3f GeoProperty<GeoPositions2dPropertyDesc>::getValue(
00394 const UInt32 index) const
00395 {
00396 return Pnt3f(Real32(_field[index][0]),
00397 Real32(_field[index][1]),
00398 0.f);
00399 }
00400
00401 template<> inline
00402 void GeoProperty<GeoPositions2dPropertyDesc>::getValue(
00403 Pnt3f &res,
00404 const UInt32 index)
00405 {
00406 res.setValues(Real32(_field[index][0]),
00407 Real32(_field[index][1]),
00408 0.f);
00409 }
00410
00411 template<> inline
00412 void GeoProperty<GeoPositions2dPropertyDesc>::getValue(
00413 Pnt3f &res,
00414 const UInt32 index) const
00415 {
00416 res.setValues(Real32(_field[index][0]),
00417 Real32(_field[index][1]),
00418 0.f);
00419 }
00420
00421 template<> inline
00422 void GeoProperty<GeoPositions2dPropertyDesc>::setValue(const Pnt3f &val,
00423 const UInt32 index)
00424 {
00425 _field[index].setValues(val[0], val[1]);
00426 }
00427
00428 template<>
00429 inline
00430 void GeoProperty<GeoPositions2dPropertyDesc>::addValue(const Pnt3f &val)
00431 {
00432 _field.push_back(Pnt2d( val[0], val[1]));
00433 }
00434
00435 template <> inline
00436 bool GeoProperty<GeoPositions2dPropertyDesc>::insertValue(const Pnt3f &val,
00437 const UInt32 index)
00438 {
00439 if(_field.size() < index)
00440 {
00441 return false;
00442 }
00443 else if(_field.size() == index)
00444 {
00445 addValue(val);
00446 return true;
00447 }
00448 else
00449 {
00450 _field.insert(_field.begin() + index, Pnt2d(val[0], val[1]));
00451 return true;
00452 }
00453 }
00454
00455
00456
00457 template<> inline
00458 Pnt3f GeoProperty<GeoPositions3dPropertyDesc>::getValue(const UInt32 index)
00459 {
00460 return Pnt3f(Real32(_field[index][0]),
00461 Real32(_field[index][1]),
00462 Real32(_field[index][2]));
00463 }
00464
00465 template<> inline
00466 Pnt3f GeoProperty<GeoPositions3dPropertyDesc>::getValue(
00467 const UInt32 index) const
00468 {
00469 return Pnt3f(Real32(_field[index][0]),
00470 Real32(_field[index][1]),
00471 Real32(_field[index][2]));
00472 }
00473
00474 template<> inline
00475 void GeoProperty<GeoPositions3dPropertyDesc>::getValue(
00476 Pnt3f &res,
00477 const UInt32 index)
00478 {
00479 res.setValues(Real32(_field[index][0]),
00480 Real32(_field[index][1]),
00481 Real32(_field[index][2]));
00482 }
00483
00484 template<> inline
00485 void GeoProperty<GeoPositions3dPropertyDesc>::getValue(
00486 Pnt3f &res,
00487 const UInt32 index) const
00488 {
00489 res.setValues(Real32(_field[index][0]),
00490 Real32(_field[index][1]),
00491 Real32(_field[index][2]));
00492 }
00493
00494 template<> inline
00495 void GeoProperty<GeoPositions3dPropertyDesc>::setValue(const Pnt3f &val,
00496 const UInt32 index)
00497 {
00498 _field[index].setValues(val[0], val[1], val[2]);
00499 }
00500
00501 template<>
00502 inline
00503 void GeoProperty<GeoPositions3dPropertyDesc>::addValue(const Pnt3f &val)
00504 {
00505 _field.push_back(Pnt3d( val[0], val[1], val[2]));
00506 }
00507
00508 template <> inline
00509 bool GeoProperty<GeoPositions3dPropertyDesc>::insertValue(const Pnt3f &val,
00510 const UInt32 index)
00511 {
00512 if(_field.size() < index)
00513 {
00514 return false;
00515 }
00516 else if(_field.size() == index)
00517 {
00518 addValue(val);
00519 return true;
00520 }
00521 else
00522 {
00523 _field.insert(_field.begin() + index, Pnt3d(val[0], val[1], val[2]));
00524 return true;
00525 }
00526 }
00527
00528
00529
00530 template<> inline
00531 Pnt3f GeoProperty<GeoPositions4dPropertyDesc>::getValue(const UInt32 index)
00532 {
00533 return Pnt3f(Real32(_field[index][0]),
00534 Real32(_field[index][1]),
00535 Real32(_field[index][2]));
00536 }
00537
00538 template<> inline
00539 Pnt3f GeoProperty<GeoPositions4dPropertyDesc>::getValue(
00540 const UInt32 index) const
00541 {
00542 return Pnt3f(Real32(_field[index][0]),
00543 Real32(_field[index][1]),
00544 Real32(_field[index][2]));
00545 }
00546
00547 template<> inline
00548 void GeoProperty<GeoPositions4dPropertyDesc>::getValue(
00549 Pnt3f &res,
00550 const UInt32 index)
00551 {
00552 res.setValues(Real32(_field[index][0]),
00553 Real32(_field[index][1]),
00554 Real32(_field[index][2]));
00555 }
00556
00557 template<> inline
00558 void GeoProperty<GeoPositions4dPropertyDesc>::getValue(
00559 Pnt3f &res,
00560 const UInt32 index) const
00561 {
00562 res.setValues(Real32(_field[index][0]),
00563 Real32(_field[index][1]),
00564 Real32(_field[index][2]));
00565 }
00566
00567 template<> inline
00568 void GeoProperty<GeoPositions4dPropertyDesc>::setValue(const Pnt3f &val,
00569 const UInt32 index)
00570 {
00571 _field[index].setValues(val[0], val[1], val[2], 1);
00572 }
00573
00574 template<>
00575 inline
00576 void GeoProperty<GeoPositions4dPropertyDesc>::addValue(const Pnt3f &val)
00577 {
00578 _field.push_back(Pnt4d( val[0], val[1], val[2], 1));
00579 }
00580
00581 template <> inline
00582 bool GeoProperty<GeoPositions4dPropertyDesc>::insertValue(const Pnt3f &val,
00583 const UInt32 index)
00584 {
00585 if(_field.size() < index)
00586 {
00587 return false;
00588 }
00589 else if(_field.size() == index)
00590 {
00591 addValue(val);
00592 return true;
00593 }
00594 else
00595 {
00596 _field.insert(_field.begin() + index, Pnt4d(val[0],val[1],val[2],1));
00597 return true;
00598 }
00599 }
00600
00601
00602
00603 #endif
00604
00605 OSG_END_NAMESPACE
00606
00607