48 lines
1.2 KiB
C++
Executable File
48 lines
1.2 KiB
C++
Executable File
/**
|
|
* Default Effector Firing Strategy (RRohr)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hannes Fritsche, ESZS, 2026-05-11
|
|
*/
|
|
|
|
#include "default_firing_strategy.h"
|
|
#include "object_effector.h"
|
|
|
|
|
|
namespace AreaEffectSimulation
|
|
{
|
|
|
|
DefaultFiringStrategy::DefaultFiringStrategy(ObjectEffector *effector)
|
|
: BaseClass(effector)
|
|
{
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
|
|
|
DEBUG_LOG(m_logger) << "using DefaultFiringStrategy";
|
|
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
|
}
|
|
|
|
DefaultFiringStrategy::~DefaultFiringStrategy()
|
|
{
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
|
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
|
}
|
|
|
|
void DefaultFiringStrategy::doFiring()
|
|
{
|
|
calculateDispersionTrajectory();
|
|
|
|
const qint64 trajectoryStartTime = getStartTime();
|
|
|
|
const auto &geometry = buildTrajectoryGeometry(m_transformedTrajectory);
|
|
const auto &trajTimeAware = buildTrajectoryTimeAware(geometry, trajectoryStartTime);
|
|
|
|
const int chargeEffectId = sendChargeEffect(trajTimeAware);
|
|
|
|
emit signalFired(m_effector->participantId(), m_effector->aesItemId(), {chargeEffectId});
|
|
DEBUG_LOG(m_logger) << "created ChargeEffectId: " << chargeEffectId;
|
|
}
|
|
|
|
} //namespace AreaEffectSimulation
|