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;
86 virtual bool isCreating()
const;
89 virtual void tacticalGraphicsVertexSelected(
93 virtual void tacticalGraphicsVertexDeselected(
97 virtual void slot_onCurrentSelectionChanged(
105 virtual std::vector<makVrv::DtUniqueID> uniqueIdsForTypesThatMatch(
const DtEntityType&)
const;
123 const std::vector<DtVector>& localPoints,
126 int modelSet = -1,
bool keepName =
false,
int dictionaryToUse = -1);
133 int dictionaryToUse = -1);
145 int modelSet = -1,
bool keepName =
false,
int dictionaryToUse = -1);
167 virtual bool isEditable(
makVrv::DtUniqueID id,
const std::string& keywords =
"noedit")
const;
170 virtual bool isMemberOfLayer(
makVrv::DtUniqueID id,
const std::string& layername)
const;
176 virtual void deleteAll(std::vector<DtEntityType> except = std::vector<DtEntityType>());
179 virtual void deleteAllFromLayer(
const std::string& layername);
185 virtual void update(
makVrv::DtElementID id,
const std::string* name = 0,
const std::vector<DtVector>& points = std::vector<DtVector>(),
186 int* force = 0,
const std::string* overlay = 0,
const std::string* userData = 0,
187 const std::map<std::string, std::string>* extendedData = 0,
const std::map<int, DtString>* extendedLabels = 0,
188 double* newHeading = 0,
int* color = 0,
int* appearance = 0,
const std::string* label = 0,
189 float* physicalLineHeight = 0,
float* physicalLineWidth = 0,
bool forceUpdate =
true);
196 virtual void create(
const DtEntityType& t,
int force);
199 virtual bool allSelectionIsLocal()
const;
202 virtual void setCanCreateLocalObjects(
bool);
205 virtual bool canCreateLocalObjects()
const;
208 virtual void save(
const std::string&);
211 virtual std::string toStringBuffer();
214 virtual bool fromStringBuffer(
const std::string&,
bool removeAll =
true);
217 virtual bool load(
const std::string&,
bool removeAll =
true);
220 virtual int numberOfLocalObjects()
const;
226 const std::vector<makVrv::DtUniqueID>& ignore = std::vector<makVrv::DtUniqueID>(),
makVrv::DtUniqueID* hitId = 0)
const;
233 bool useHighestLOD =
false,
bool ignoreDynamicOcean =
false, ClampFlag useHighestPolygon = Closest,
240 bool useHighestLOD =
false,
bool ignoreDynamicOcean =
false, ClampFlag useHighestPolygon = Closest,
makVrv::DtUniqueID* hitId = 0)
const;
242 virtual std::string generateUniqueName(
const std::string& base,
bool addNumberToBegin =
false)
const;
245 virtual void ignoreFromArchive(
const DtEntityType&);
246 virtual void removeIgnoreFromArchive(
const DtEntityType&);
250 virtual void slot_elementAttributeChangeRequested(
253 virtual void handleElementAttributeChanged(
268 virtual void slot_stoppedObjectCreation();
294 friend class boost::serialization::access;
299 template<
class Archive>
300 void serialize(Archive & ar,
const unsigned int version)
302 if (Archive::is_loading::value)
304 read(*(boost::archive::xml_iarchive*)&ar);
308 write(*(boost::archive::xml_oarchive*)&ar);
312 virtual void write(boost::archive::xml_oarchive& out);
313 virtual void read(boost::archive::xml_iarchive& in);
321 typedef std::map<makVrv::DtUniqueID, DtVrfObjectFacadeInterface*>
LocalObjects;
325 typedef std::map<makVrv::DtUniqueID, makVrv::DtVrlinkSimulatedBaseState*>
LocalStateData;
335 : myProps(makVrv::DtIntersector::IntersectProperties(0))
336 , myUseHighestLOD(false)
337 , myIgnoreDynamicOcean(false)
338 , myUseHighestPolygon(Closest)
344 bool useHighestLOD,
bool ignoreDynamicOcean,
ClampFlag useHighestPolygon)
347 , myUseHighestLOD(useHighestLOD)
348 , myIgnoreDynamicOcean(ignoreDynamicOcean)
349 , myUseHighestPolygon(useHighestPolygon)
406 friend class boost::serialization::access;
411 template<
class Archive>
412 void serialize(Archive & ar,
const unsigned int version)
414 double x = myRep[0], y = myRep[1], z = myRep[2];
416 ar & BOOST_SERIALIZATION_NVP(x);
417 ar & BOOST_SERIALIZATION_NVP(y);
418 ar & BOOST_SERIALIZATION_NVP(z);
420 if (Archive::is_loading::value)
448 friend class boost::serialization::access;
453 template<
class Archive>
454 void serialize(Archive & ar,
const unsigned int version)
456 ar & BOOST_SERIALIZATION_NVP(myPsi);
457 ar & BOOST_SERIALIZATION_NVP(myTheta);
458 ar & BOOST_SERIALIZATION_NVP(myPhi);
460 if (Archive::is_loading::value && mySource)
470 template <
typename _Type,
typename _SrcType>
480 typename std::vector<_SrcType>::const_iterator srcIter = src.begin();
481 typename std::vector<_Type>::iterator tgtIter =
myValues.begin();
483 while (srcIter != src.end())
497 template<
class Archive>
498 void serialize(Archive & ar,
const unsigned int version)
500 ar & BOOST_SERIALIZATION_NVP(
myValues);
502 if (Archive::is_loading::value &&
mySource)
507 typename std::vector<_Type>::const_iterator src =
myValues.begin();
508 typename std::vector<_SrcType>::iterator tgt =
mySource->begin();
529 makVrv::DtVrlinkSimulatedEntityState(orig)
534 friend class boost::serialization::access;
539 template<
class Archive>
540 void serialize(Archive & ar,
const unsigned int version)
542 ar & BOOST_SERIALIZATION_NVP(myGlobalId);
543 ar & BOOST_SERIALIZATION_NVP(myEntityId);
544 ar & BOOST_SERIALIZATION_NVP(myMarkingText);
545 ar & BOOST_SERIALIZATION_NVP(myEntityType);
546 ar & BOOST_SERIALIZATION_NVP(myAttachedToId);
547 ar & BOOST_SERIALIZATION_NVP(myForce);
556 ar & BOOST_SERIALIZATION_NVP(loc);
557 ar & BOOST_SERIALIZATION_NVP(vel);
558 ar & BOOST_SERIALIZATION_NVP(relVel);
559 ar & BOOST_SERIALIZATION_NVP(acc);
560 ar & BOOST_SERIALIZATION_NVP(ori);
561 ar & BOOST_SERIALIZATION_NVP(rotVel);
563 ar & BOOST_SERIALIZATION_NVP(myAppearance);
564 ar & BOOST_SERIALIZATION_NVP(myCapabilities);
565 ar & BOOST_SERIALIZATION_NVP(myDIGuyAppearance);
566 ar & BOOST_SERIALIZATION_NVP(myDIGuyCharacterType);
567 ar & BOOST_SERIALIZATION_NVP(myGuise);
568 ar & BOOST_SERIALIZATION_NVP(myDRAlgorithm);
582 friend class boost::serialization::access;
587 template<
class Archive>
588 void serialize(Archive & ar,
const unsigned int version)
590 ar & BOOST_SERIALIZATION_NVP(myGlobalId);
591 ar & BOOST_SERIALIZATION_NVP(myEntityId);
592 ar & BOOST_SERIALIZATION_NVP(myMarkingText);
593 ar & BOOST_SERIALIZATION_NVP(myEntityType);
594 ar & BOOST_SERIALIZATION_NVP(myAttachedToId);
595 ar & BOOST_SERIALIZATION_NVP(myForce);
599 ar & BOOST_SERIALIZATION_NVP(pts);
601 ar & BOOST_SERIALIZATION_NVP(myUserData);
602 ar & BOOST_SERIALIZATION_NVP(myPenStyle);
603 ar & BOOST_SERIALIZATION_NVP(myFillStyle);
604 ar & BOOST_SERIALIZATION_NVP(myLineWidth);
605 ar & BOOST_SERIALIZATION_NVP(myColor);
606 ar & BOOST_SERIALIZATION_NVP(myLabel);
607 ar & BOOST_SERIALIZATION_NVP(myClosedFigure);
608 ar & BOOST_SERIALIZATION_NVP(myProjected);
609 ar & BOOST_SERIALIZATION_NVP(myAttributes);
610 ar & BOOST_SERIALIZATION_NVP(myOverlayParent);
614 ar & BOOST_SERIALIZATION_NVP(myPhysicalLineHeight);
615 ar & BOOST_SERIALIZATION_NVP(myPhysicalLineWidth);