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;
85 virtual bool isCreating()
const;
88 virtual void tacticalGraphicsVertexSelected(
92 virtual void tacticalGraphicsVertexDeselected(
96 virtual void slot_onCurrentSelectionChanged(
119 const std::vector<DtVector>& localPoints,
122 int modelSet = -1,
bool keepName =
false,
int dictionaryToUse = -1);
129 int dictionaryToUse = -1);
141 int modelSet = -1,
bool keepName =
false,
int dictionaryToUse = -1);
166 virtual bool isMemberOfLayer(
makVrv::DtUniqueID id,
const std::string& layername)
const;
172 virtual void deleteAll(std::vector<DtEntityType> except = std::vector<DtEntityType>());
175 virtual void deleteAllFromLayer(
const std::string& layername);
181 virtual void update(
makVrv::DtElementID id,
const std::string* name = 0,
const std::vector<DtVector>& points = std::vector<DtVector>(),
182 int* force = 0,
const std::string* overlay = 0,
const std::string* userData = 0,
183 const std::map<std::string, std::string>* extendedData = 0,
const std::map<int, DtString>* extendedLabels = 0,
184 double* newHeading = 0,
int* color = 0,
int* appearance = 0,
const std::string* label = 0,
185 float* physicalLineHeight = 0,
float* physicalLineWidth = 0,
bool forceUpdate =
true);
192 virtual void create(
const DtEntityType& t,
int force);
195 virtual bool allSelectionIsLocal()
const;
198 virtual void setCanCreateLocalObjects(
bool);
201 virtual bool canCreateLocalObjects()
const;
204 virtual void save(
const std::string&);
207 virtual std::string toStringBuffer();
210 virtual bool fromStringBuffer(
const std::string&,
bool removeAll =
true);
213 virtual bool load(
const std::string&,
bool removeAll =
true);
216 virtual int numberOfLocalObjects()
const;
222 const std::vector<makVrv::DtUniqueID>& ignore = std::vector<makVrv::DtUniqueID>(),
makVrv::DtUniqueID* hitId = 0)
const;
229 bool useHighestLOD =
false,
bool ignoreDynamicOcean =
false, ClampFlag useHighestPolygon = Closest,
236 bool useHighestLOD =
false,
bool ignoreDynamicOcean =
false, ClampFlag useHighestPolygon = Closest,
makVrv::DtUniqueID* hitId = 0)
const;
238 virtual std::string generateUniqueName(
const std::string& base,
bool addNumberToBegin =
false)
const;
241 virtual void ignoreFromArchive(
const DtEntityType&);
242 virtual void removeIgnoreFromArchive(
const DtEntityType&);
246 virtual void slot_elementAttributeChangeRequested(
249 virtual void handleElementAttributeChanged(
264 virtual void slot_stoppedObjectCreation();
290 friend class boost::serialization::access;
295 template<
class Archive>
296 void serialize(Archive & ar,
const unsigned int version)
298 if (Archive::is_loading::value)
300 read(*(boost::archive::xml_iarchive*)&ar);
304 write(*(boost::archive::xml_oarchive*)&ar);
308 virtual void write(boost::archive::xml_oarchive& out);
309 virtual void read(boost::archive::xml_iarchive& in);
317 typedef std::map<makVrv::DtUniqueID, DtVrfObjectFacadeInterface*>
LocalObjects;
321 typedef std::map<makVrv::DtUniqueID, makVrv::DtVrlinkSimulatedBaseState*>
LocalStateData;
331 : myProps(makVrv::DtIntersector::IntersectProperties(0))
332 , myUseHighestLOD(false)
333 , myIgnoreDynamicOcean(false)
334 , myUseHighestPolygon(Closest)
340 bool useHighestLOD,
bool ignoreDynamicOcean,
ClampFlag useHighestPolygon)
343 , myUseHighestLOD(useHighestLOD)
344 , myIgnoreDynamicOcean(ignoreDynamicOcean)
345 , myUseHighestPolygon(useHighestPolygon)
402 friend class boost::serialization::access;
407 template<
class Archive>
408 void serialize(Archive & ar,
const unsigned int version)
410 double x = myRep[0], y = myRep[1], z = myRep[2];
412 ar & BOOST_SERIALIZATION_NVP(x);
413 ar & BOOST_SERIALIZATION_NVP(y);
414 ar & BOOST_SERIALIZATION_NVP(z);
416 if (Archive::is_loading::value)
444 friend class boost::serialization::access;
449 template<
class Archive>
450 void serialize(Archive & ar,
const unsigned int version)
452 ar & BOOST_SERIALIZATION_NVP(myPsi);
453 ar & BOOST_SERIALIZATION_NVP(myTheta);
454 ar & BOOST_SERIALIZATION_NVP(myPhi);
456 if (Archive::is_loading::value && mySource)
466 template <
typename _Type,
typename _SrcType>
476 typename std::vector<_SrcType>::const_iterator srcIter = src.begin();
477 typename std::vector<_Type>::iterator tgtIter =
myValues.begin();
479 while (srcIter != src.end())
493 template<
class Archive>
494 void serialize(Archive & ar,
const unsigned int version)
496 ar & BOOST_SERIALIZATION_NVP(
myValues);
498 if (Archive::is_loading::value &&
mySource)
503 typename std::vector<_Type>::const_iterator src =
myValues.begin();
504 typename std::vector<_SrcType>::iterator tgt =
mySource->begin();
525 makVrv::DtVrlinkSimulatedEntityState(orig)
530 friend class boost::serialization::access;
535 template<
class Archive>
536 void serialize(Archive & ar,
const unsigned int version)
538 ar & BOOST_SERIALIZATION_NVP(myGlobalId);
539 ar & BOOST_SERIALIZATION_NVP(myEntityId);
540 ar & BOOST_SERIALIZATION_NVP(myMarkingText);
541 ar & BOOST_SERIALIZATION_NVP(myEntityType);
542 ar & BOOST_SERIALIZATION_NVP(myAttachedToId);
543 ar & BOOST_SERIALIZATION_NVP(myForce);
552 ar & BOOST_SERIALIZATION_NVP(loc);
553 ar & BOOST_SERIALIZATION_NVP(vel);
554 ar & BOOST_SERIALIZATION_NVP(relVel);
555 ar & BOOST_SERIALIZATION_NVP(acc);
556 ar & BOOST_SERIALIZATION_NVP(ori);
557 ar & BOOST_SERIALIZATION_NVP(rotVel);
559 ar & BOOST_SERIALIZATION_NVP(myAppearance);
560 ar & BOOST_SERIALIZATION_NVP(myCapabilities);
561 ar & BOOST_SERIALIZATION_NVP(myDIGuyAppearance);
562 ar & BOOST_SERIALIZATION_NVP(myDIGuyCharacterType);
563 ar & BOOST_SERIALIZATION_NVP(myGuise);
564 ar & BOOST_SERIALIZATION_NVP(myDRAlgorithm);
578 friend class boost::serialization::access;
583 template<
class Archive>
584 void serialize(Archive & ar,
const unsigned int version)
586 ar & BOOST_SERIALIZATION_NVP(myGlobalId);
587 ar & BOOST_SERIALIZATION_NVP(myEntityId);
588 ar & BOOST_SERIALIZATION_NVP(myMarkingText);
589 ar & BOOST_SERIALIZATION_NVP(myEntityType);
590 ar & BOOST_SERIALIZATION_NVP(myAttachedToId);
591 ar & BOOST_SERIALIZATION_NVP(myForce);
595 ar & BOOST_SERIALIZATION_NVP(pts);
597 ar & BOOST_SERIALIZATION_NVP(myUserData);
598 ar & BOOST_SERIALIZATION_NVP(myPenStyle);
599 ar & BOOST_SERIALIZATION_NVP(myFillStyle);
600 ar & BOOST_SERIALIZATION_NVP(myLineWidth);
601 ar & BOOST_SERIALIZATION_NVP(myColor);
602 ar & BOOST_SERIALIZATION_NVP(myLabel);
603 ar & BOOST_SERIALIZATION_NVP(myClosedFigure);
604 ar & BOOST_SERIALIZATION_NVP(myProjected);
605 ar & BOOST_SERIALIZATION_NVP(myAttributes);
606 ar & BOOST_SERIALIZATION_NVP(myOverlayParent);
610 ar & BOOST_SERIALIZATION_NVP(myPhysicalLineHeight);
611 ar & BOOST_SERIALIZATION_NVP(myPhysicalLineWidth);