10 #ifndef lgrHlaEntityPublisher_H_
11 #define lgrHlaEntityPublisher_H_
18 #include <vl/rtiCompatibility.h>
19 #include <vl/entityPublisherHLA.h>
21 class DtBaseEntityStateRepository;
27 class DtLgrHlaSimulationManager;
31 class DT_DLL_LGRSIM DtLgrHlaEntityPublisher :
public DtEntityPublisher,
public DtLgrPublisherInterface
39 (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
40 const char* objName,
const DtDDMRegionSet* regionSetToUse,
41 double hbtime,
bool waitForRegionData,
bool stat),
42 (DtLgrHlaSimulationManager& simMgr, RTI::ObjectClassHandle classHandle,
43 const char* objName,
const DtDDMRegionSet* regionSetToUse,
44 double hbtime=0.0,
bool waitForRegionData=
false,
bool stat=
true))
47 virtual ~DtLgrHlaEntityPublisher();
49 virtual
void update(const DtStateMsg& msg,
double scaling,
bool isStatic);
51 virtual DtObjectPublisher* objPublisher();
54 virtual
void tick(
double scale,
bool isStatic);
58 virtual
void sendUpdateAtScaleChangePoint(
double oldScale,
double newScale,
bool wasStatic,
bool isStatic);
61 bool sendAllNextTick();
65 void setSendAllNextTick(
bool yesNo = true);
67 virtual
void setRegion(const DtDDMRegionSet& region);
70 virtual const DtDDMRegionSet& publishingRegions() const;
72 virtual
bool publishingToRegion( DtDDMRegionSP region );
74 virtual
void setPauseUpdateAttributes(
double &scale);
79 virtual
void sendRequestedAttrs(
double scale,
bool isStatic);
81 virtual
void sendTheseAttrs(const RTI::AttributeHandleSet& attrs,
double scale,
bool isStatic);
83 virtual
void send(DtStateMsg& msg);
86 DtLgrHlaEntityPublisher(const DtLgrHlaEntityPublisher &other);
89 DtLgrHlaEntityPublisher &operator=(const DtLgrHlaEntityPublisher &other);
94 DtLgrHlaSimulationManager& mySimMgr;
97 bool mySendAllNextTick;
100 RTI::AttributeHandleSet* myAttrsToSend;
103 DtBaseEntityStateRepository* mySeenByAttrs;
104 DtDeadReckoner* myDeadReckoner;
106 double myLastScaling;
108 double myHeartbeatInterval;
109 double myLastHeartbeatTime;
111 DtVector32 myOrigVelocity;
112 DtVector32 myOrigAcceleration;
113 DtVector32 myOrigRotVel;
114 DtTaitBryan myOrigOrientation;
115 DtVector myOrigLocation;
120 bool myFrozenBeforePause;
122 bool mySendingPauseUpdate;
124 DtDeadReckoner* myOldDeadReckoner;
125 DtDeadReckonTypes myOldDRType;
126 bool myDRTypeChanged;