24 #include <vlutil/vlSmartPointers.h>
25 #include <boost/shared_ptr.hpp>
27 #include <boost/archive/xml_iarchive.hpp>
28 #include <boost/archive/xml_oarchive.hpp>
29 #include <boost/serialization/access.hpp>
30 #include <boost/serialization/nvp.hpp>
31 #include <boost/serialization/list.hpp>
32 #include <boost/serialization/map.hpp>
33 #include <boost/serialization/vector.hpp>
34 #include <boost/serialization/string.hpp>
38 #include <matrix/vlVector.h>
45 class DtTacticalGraphicOverlay;
46 struct DtVrlinkSimulatedBaseState;
47 struct DtVrlinkSimulatedEntityState;
54 class DtVrfObjectFacadeInterface;
55 class DtEnvironmentalFacadeCollection;
56 class DtEntityFacadeCollection;
57 struct DtVrlinkSimulatedEnvironmentProcess;
78 virtual bool isCreating()
const;
81 virtual void tacticalGraphicsVertexSelected(
85 virtual void tacticalGraphicsVertexDeselected(
89 virtual void slot_onCurrentSelectionChanged(
108 const std::vector<DtVector>& localPoints,
111 int modelSet = -1,
bool keepName =
false);
125 int modelSet = -1,
bool keepName =
false);
150 virtual bool isMemberOfLayer(
makVrv::DtUniqueID id,
const std::string& layername)
const;
156 virtual void deleteAll(std::vector<DtEntityType> except = std::vector<DtEntityType>());
159 virtual void deleteAllFromLayer(
const std::string& layername);
165 virtual void update(
makVrv::DtElementID id,
const std::string* name = 0,
const std::vector<DtVector>& points = std::vector<DtVector>(),
166 int* force = 0,
const std::string* overlay = 0,
const std::string* userData = 0,
167 const std::map<std::string, std::string>* extendedData = 0,
const std::map<int, DtString>* extendedLabels = 0,
168 double* newHeading = 0,
int* color = 0,
int* appearance = 0,
const std::string* label = 0,
169 float* physicalLineHeight = 0,
float* physicalLineWidth = 0,
bool forceUpdate =
true);
176 virtual void create(
const DtEntityType& t,
int force);
179 virtual bool allSelectionIsLocal()
const;
182 virtual void setCanCreateLocalObjects(
bool);
185 virtual bool canCreateLocalObjects()
const;
188 virtual void save(
const std::string&);
191 virtual bool load(
const std::string&,
bool removeAll =
true);
194 virtual int numberOfLocalObjects()
const;
200 const std::vector<makVrv::DtUniqueID>& ignore = std::vector<makVrv::DtUniqueID>(),
makVrv::DtUniqueID* hitId = 0)
const;
207 bool useHighestLOD =
false,
bool ignoreDynamicOcean =
false,
bool useHighestPolygon =
false,
214 bool useHighestLOD =
false,
bool ignoreDynamicOcean =
false,
bool useHighestPolygon =
false,
makVrv::DtUniqueID* hitId = 0)
const;
216 virtual std::string generateUniqueName(
const std::string& base,
bool addNumberToBegin =
false)
const;
219 virtual void ignoreFromArchive(
const DtEntityType&);
220 virtual void removeIgnoreFromArchive(
const DtEntityType&);
224 virtual void slot_elementAttributeChangeRequested(
227 virtual void handleElementAttributeChanged(
242 virtual void slot_stoppedObjectCreation();
268 friend class boost::serialization::access;
273 template<
class Archive>
274 void serialize(Archive & ar,
const unsigned int version)
276 if (Archive::is_loading::value)
278 read(*(boost::archive::xml_iarchive*)&ar);
282 write(*(boost::archive::xml_oarchive*)&ar);
286 virtual void write(boost::archive::xml_oarchive& out);
287 virtual void read(boost::archive::xml_iarchive& in);
295 typedef std::map<makVrv::DtUniqueID, DtVrfObjectFacadeInterface*>
LocalObjects;
299 typedef std::map<makVrv::DtUniqueID, makVrv::DtVrlinkSimulatedBaseState*>
LocalStateData;
309 : myProps(makVrv::DtIntersector::IntersectProperties(0))
310 , myUseHighestLOD(false)
311 , myIgnoreDynamicOcean(false)
312 , myUseHighestPolygon(false)
318 bool useHighestLOD,
bool ignoreDynamicOcean,
bool useHighestPolygon)
321 , myUseHighestLOD(useHighestLOD)
322 , myIgnoreDynamicOcean(ignoreDynamicOcean)
323 , myUseHighestPolygon(useHighestPolygon)
380 friend class boost::serialization::access;
385 template<
class Archive>
386 void serialize(Archive & ar,
const unsigned int version)
388 double x = myRep[0], y = myRep[1], z = myRep[2];
390 ar & BOOST_SERIALIZATION_NVP(x);
391 ar & BOOST_SERIALIZATION_NVP(y);
392 ar & BOOST_SERIALIZATION_NVP(z);
394 if (Archive::is_loading::value)
422 friend class boost::serialization::access;
427 template<
class Archive>
428 void serialize(Archive & ar,
const unsigned int version)
430 ar & BOOST_SERIALIZATION_NVP(myPsi);
431 ar & BOOST_SERIALIZATION_NVP(myTheta);
432 ar & BOOST_SERIALIZATION_NVP(myPhi);
434 if (Archive::is_loading::value && mySource)
444 template <
typename _Type,
typename _SrcType>
454 typename std::vector<_SrcType>::const_iterator srcIter = src.begin();
455 typename std::vector<_Type>::iterator tgtIter =
myValues.begin();
457 while (srcIter != src.end())
471 template<
class Archive>
472 void serialize(Archive & ar,
const unsigned int version)
474 ar & BOOST_SERIALIZATION_NVP(
myValues);
476 if (Archive::is_loading::value &&
mySource)
481 typename std::vector<_Type>::const_iterator src =
myValues.begin();
482 typename std::vector<_SrcType>::iterator tgt =
mySource->begin();
503 makVrv::DtVrlinkSimulatedEntityState(orig)
508 friend class boost::serialization::access;
513 template<
class Archive>
514 void serialize(Archive & ar,
const unsigned int version)
516 ar & BOOST_SERIALIZATION_NVP(myGlobalId);
517 ar & BOOST_SERIALIZATION_NVP(myEntityId);
518 ar & BOOST_SERIALIZATION_NVP(myMarkingText);
519 ar & BOOST_SERIALIZATION_NVP(myEntityType);
520 ar & BOOST_SERIALIZATION_NVP(myAttachedToId);
521 ar & BOOST_SERIALIZATION_NVP(myForce);
530 ar & BOOST_SERIALIZATION_NVP(loc);
531 ar & BOOST_SERIALIZATION_NVP(vel);
532 ar & BOOST_SERIALIZATION_NVP(relVel);
533 ar & BOOST_SERIALIZATION_NVP(acc);
534 ar & BOOST_SERIALIZATION_NVP(ori);
535 ar & BOOST_SERIALIZATION_NVP(rotVel);
537 ar & BOOST_SERIALIZATION_NVP(myAppearance);
538 ar & BOOST_SERIALIZATION_NVP(myCapabilities);
539 ar & BOOST_SERIALIZATION_NVP(myDIGuyAppearance);
540 ar & BOOST_SERIALIZATION_NVP(myDIGuyCharacterType);
541 ar & BOOST_SERIALIZATION_NVP(myGuise);
542 ar & BOOST_SERIALIZATION_NVP(myDRAlgorithm);
556 friend class boost::serialization::access;
561 template<
class Archive>
562 void serialize(Archive & ar,
const unsigned int version)
564 ar & BOOST_SERIALIZATION_NVP(myGlobalId);
565 ar & BOOST_SERIALIZATION_NVP(myEntityId);
566 ar & BOOST_SERIALIZATION_NVP(myMarkingText);
567 ar & BOOST_SERIALIZATION_NVP(myEntityType);
568 ar & BOOST_SERIALIZATION_NVP(myAttachedToId);
569 ar & BOOST_SERIALIZATION_NVP(myForce);
573 ar & BOOST_SERIALIZATION_NVP(pts);
575 ar & BOOST_SERIALIZATION_NVP(myUserData);
576 ar & BOOST_SERIALIZATION_NVP(myPenStyle);
577 ar & BOOST_SERIALIZATION_NVP(myFillStyle);
578 ar & BOOST_SERIALIZATION_NVP(myLineWidth);
579 ar & BOOST_SERIALIZATION_NVP(myColor);
580 ar & BOOST_SERIALIZATION_NVP(myLabel);
581 ar & BOOST_SERIALIZATION_NVP(myClosedFigure);
582 ar & BOOST_SERIALIZATION_NVP(myProjected);
583 ar & BOOST_SERIALIZATION_NVP(myAttributes);
584 ar & BOOST_SERIALIZATION_NVP(myOverlayParent);
588 ar & BOOST_SERIALIZATION_NVP(myPhysicalLineHeight);
589 ar & BOOST_SERIALIZATION_NVP(myPhysicalLineWidth);