DDM Listen is exactly like Listen , but adds HLA DDM to the mix.
int keybrdTick()
{
if (keyPtr && (*keyPtr == 'q' || *keyPtr == 'Q'))
return -1;
else
return 0;
}
int main(int argc, char* argv[])
{
appInit.setExecName("VR-LinkDDM");
#if !DtHLA_1516
appInit.setFedFileName("VR-LinkDDM.fed");
#else
#if DtHLA_1516_EVOLVED
appInit.setFedFileName("VR-LinkDDM_evolved.xml");
#else
appInit.setFedFileName("VR-LinkDDM.xml");
#endif
#endif
appInit.parseCmdLine();
try
{
exConn.rtiAmb()->enableAttributeScopeAdvisorySwitch();
}
catch( ... )
{
DtWarn <<
"Caught an exception attempting to enable the Attribute Scope Advisory Switch.";
DtWarn <<
" Please make sure Force Full Compliance is turned on." << std::endl;
return 0;
}
try
{
firstRegionSet.insert(firstRegion);
regions.insert(firstRegion);
regions.insert(secondRegion);
}
{
DtWarn <<
"Cannot create region: " << except << std::endl;
}
if( firstRegion == NULL || secondRegion == NULL )
{
DtWarn <<
"Exception occurred: regions were not created, exiting." << std::endl;
return 0;
}
int forever = 1;
while (forever)
{
if (keybrdTick() == -1)
break;
exConn.drainInput();
if (firstEntity)
{
}
if (firstEmitter)
{
DtInfo <<
"Emitter in scope. Emitter number: "
<< std::endl;
}
}
delete reflEntList;
delete reflEmitList;
return 0;
}