- BUILD_RTI conditional compilation für RTI Connext DDS dependencies - Namespace fixes in core_dtc.h (Core:: → DDS::Core::) - CMakeLists.txt: BUILD_RTI option und conditional dependencies - Handler minelayer: namespace closing mit BUILD_RTI guard - Build erfolgreich mit BUILD_RTI=OFF validiert Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
45 lines
1.4 KiB
C++
Executable File
45 lines
1.4 KiB
C++
Executable File
/**
|
|
* Handler for player data
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by hjl, SLSE, 2017-02-20
|
|
*/
|
|
|
|
#include "handler_pdm_data.h"
|
|
|
|
|
|
namespace EffectShowManagement
|
|
{
|
|
|
|
//=============================================================================
|
|
|
|
HandlerPdmData::HandlerPdmData(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
QObject *parent) : QObject(parent)
|
|
, m_ddsHandler(ddsHandler),
|
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
|
} // end of ctor()
|
|
//=============================================================================
|
|
|
|
bool HandlerPdmData::isSmoke(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
|
{
|
|
return m_ddsHandler->dtcPdm()->isSmoke(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
|
} // end of isSmoke()
|
|
|
|
int HandlerPdmData::effectShowCount(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
|
{
|
|
return m_ddsHandler->dtcPdm()->maxEffectShows(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
|
}
|
|
|
|
int HandlerPdmData::getCadence(const int chargeId) const
|
|
{
|
|
const auto &gearTypeIds = m_ddsHandler->dtcPdm()->gearTypeIdFromChargeTypeId(chargeId);
|
|
int cadence = 35000;
|
|
if (gearTypeIds.size())
|
|
cadence = m_ddsHandler->dtcPdm()->cadence(gearTypeIds.at(0));
|
|
|
|
return cadence;
|
|
}
|
|
|
|
} // namespace EffectShowManagement
|