![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2009 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: globalEnvironmentObjSR.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00012 #ifndef globalEnvironmentObjSR_h 00013 #define globalEnvironmentObjSR_h 00014 00015 #include <vrfExtObjects/vrfExtObjectsDefines.h> 00016 #include <vl/envProcessSR.h> 00017 00019 class DT_DLL_vrfExtObjects DtGlobalEnvironmentObjectRepository : public DtEnvironmentProcessRepository 00020 { 00021 public: 00022 DtGlobalEnvironmentObjectRepository(); 00023 static DtEnvironmentProcessRepository* create(); 00024 00025 // Utility to compare this repository against a remote estimate 00026 // Returns True is an update should be sent; False otherwise 00027 virtual bool sendNeeded(const DtEnvironmentProcessRepository& asSeenByRemote); 00028 00029 void setClock(DtClock* clock); 00030 DtClock* clock() const; 00031 00032 double lastUpdateTime() const; 00033 void setLastUpdateTime(DtTime t); 00034 00035 protected: 00036 00037 virtual bool sendRecordsNeeded(const DtEnvironmentProcessRepository& asSeenByRemote); 00038 virtual bool sendWeatherRecNeeded(DtTime dt, DtNetEnvironmentalRecord* rec, DtNetEnvironmentalRecord* recRemote); 00039 virtual bool sendNetRecNeeded(DtNetEnvironmentalRecord* rec1, DtNetEnvironmentalRecord* rec2); 00040 00041 protected: 00042 // Helpers for send-side dead reckoning (used to limit #updates sent) 00043 DtClock* myClock; 00044 DtTime myLastUpdateTime; 00045 }; 00046 00047 #endif