![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2009 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: DtLosResponder.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 *********************************************************************/ 00008 00012 00013 #ifndef DtLosResponder_H_ 00014 #define DtLosResponder_H_ 00015 00016 #include <vrvCigi/vrvCigi.h> 00017 #include <vrvCore/DtUniqueID.h> 00018 00019 #include <matrix/geodCoord.h> 00020 00021 #include <boost/signal.hpp> 00022 00023 class CigiLosSegReqV3_2; 00024 class CigiLosVectReqV3_2; 00025 00026 namespace makVrv 00027 { 00028 class DtCigiConnection; 00029 00034 class DT_DLL_VRVCIGI DtLosResponder 00035 { 00036 public: 00037 struct LosData 00038 { 00039 int numberOfFramesBeforeSending; 00040 int lastFrameSent; 00041 DtUniqueID sourceEntity; 00042 DtVector sourcePoint; 00043 DtUniqueID destEntity; 00044 DtVector destPoint; 00045 }; 00046 00048 DtLosResponder(DtCigiConnection& connection); 00049 00051 virtual ~DtLosResponder(); 00052 00054 virtual void generateLosResponse(int losId, DtUniqueID entityId, 00055 bool visible, double range, int responseCount, int hostFrame); 00056 00059 virtual void processLosRequests(); 00060 00062 boost::signal<void (DtUniqueID, const DtVector&, DtUniqueID, const DtVector&, int, int)> 00063 signal_losSegRequested; 00064 00065 protected: 00067 virtual void processLosSegmentRequest(const CigiLosSegReqV3_2& losSegReq); 00068 00070 virtual void processLosVectorRequest(CigiLosVectReqV3_2& losVecReq); 00071 00073 virtual void setDatabaseCoordinateFromGeodetic(const DtGeodeticCoord& from, 00074 DtVector& to); 00075 00077 virtual void addPeriodicLosRequest(DtUniqueID sourceEntityId, const DtVector& sourcePoint, 00078 DtUniqueID destEntityId, const DtVector& destPoint, unsigned int updatePeriod, 00079 int losId); 00080 00082 virtual void sendLosRequest(DtUniqueID sourceId, const DtVector& sourcePoint, 00083 DtUniqueID destId, const DtVector& destPoint, int losId); 00084 00085 00086 protected: 00087 DtCigiConnection& myConnection; 00088 std::map<int, LosData> myLosIdToDataMap; 00089 }; 00090 } 00091 00092 #endif