![]() |
VR-Link API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 00009 #ifndef hEntityPub_H_ 00010 #define hEntityPub_H_ 00011 00012 #if DtHLA 00013 00014 #include "hObjPub.h" 00015 #include <vlpi/thresholder.h> 00016 #include <vlpi/disEnums.h> 00017 00018 00019 class DtEntityStateRepository; 00020 class DtGeodeticRegion; 00021 00027 class DT_DLL_VL DtEntityPublisher : public DtObjectPublisher 00028 { 00029 public: 00030 00035 static const DtEntityType& guiseSameAsType(); 00036 00037 public: 00038 00040 typedef DtEntityStateRepository* (*DtStateRepCreator)(); 00041 00042 public: 00043 00045 DtEntityPublisher( 00046 DtEntityStateRepository* stateRepToUse, 00047 DtExerciseConn* conn, 00048 const char* name = 0, 00049 const DtDDMRegionSet* regionSetToUse = 0); 00050 00052 DtEntityPublisher( 00053 RTI::ObjectClassHandle h, 00054 DtExerciseConn* conn, 00055 const char* name = 0, 00056 const DtDDMRegionSet* regionSetToUse = 0); 00057 00059 DtEntityPublisher( 00060 const DtEntityType& type, 00061 DtExerciseConn* conn, 00062 const char* name = 0, 00063 const DtDDMRegionSet* regionSetToUse = 0); 00064 00066 DtEntityPublisher( 00067 const DtEntityType& type, 00068 DtExerciseConn* conn, 00069 DtDeadReckonTypes algorithm, 00070 DtForceType forceId, 00071 const DtEntityType& guise = guiseSameAsType(), 00072 const char* name = 0, 00073 const DtDDMRegionSet* regionSetToUse = 0); 00074 00080 DtEntityPublisher(DtHlaObjectWithStateRep* obj, DtExerciseConn* conn); 00081 00083 virtual ~DtEntityPublisher(); 00084 00087 virtual DtEntityStateRepository* entityStateRep(); 00088 00090 virtual DtEntityStateRepository* esr(); 00091 00093 virtual void tick(); 00094 00095 public: 00096 00098 static DtStateRepCreator setStateRepCreator(DtStateRepCreator creator); 00099 00100 public: 00101 00103 00104 static void setDfltRotationThreshold(double r); 00105 static double dfltRotationThreshold(); 00106 static void setDfltTranslationThreshold(double t); 00107 static double dfltTranslationThreshold(); 00109 00110 00111 protected: 00112 00114 void init(); 00115 00119 void createGeographicRegion(DtExerciseConn* conn); 00120 00122 DtEntityPublisher(const DtEntityPublisher& orig); 00123 00125 DtEntityPublisher& operator=(const DtEntityPublisher& orig); 00126 00130 const char* objectClassNameFromType(const DtEntityType& type); 00131 00132 protected: 00133 00134 static DtStateRepCreator theStateRepCreator; 00135 00136 DtBoost::shared_ptr<DtGeodeticRegion> myGeodeticPublishingRegion; 00137 }; 00138 00139 inline DtEntityStateRepository* DtEntityPublisher::entityStateRep() 00140 { 00141 return (DtEntityStateRepository*) myStateRep; 00142 } 00143 00144 inline DtEntityStateRepository* DtEntityPublisher::esr() 00145 { 00146 return (DtEntityStateRepository*) myStateRep; 00147 } 00148 00149 #if DT_CANT_USE_STATIC_MEMBER_FCN_AS_DFLT_ARG 00150 inline const DtEntityType& gGuiseSameAsType() 00151 { 00152 return DtEntityPublisher::guiseSameAsType(); 00153 } 00154 #else 00155 #undef gGuiseSameAsType 00156 #endif 00157 00158 #endif 00159 #endif 00160