/*
 * Copyright (C) 2012-2026 MotionSystems
 *
 * This file is part of ForceSeatMI SDK.
 *
 * www.motionsystems.eu
 *
 */

#pragma once

#include "IForceSeatMIPlane_ControllerCore.h"
#include "ForceSeatMI_TelemetryACE.h"

class APawn;
class UWorld;
class IForceSeatMI_API;

class ForceSeatMIPlane_ControllerCore : public IForceSeatMIPlane_ControllerCore
{
	explicit ForceSeatMIPlane_ControllerCore(const ForceSeatMIPlane_ControllerCore& other) = delete;
	explicit ForceSeatMIPlane_ControllerCore(const ForceSeatMIPlane_ControllerCore&& other) = delete;

	ForceSeatMIPlane_ControllerCore& operator=(const ForceSeatMIPlane_ControllerCore& other) = delete;
	ForceSeatMIPlane_ControllerCore& operator=(const ForceSeatMIPlane_ControllerCore&& other) = delete;

public:
	explicit ForceSeatMIPlane_ControllerCore(APawn* plane);
	virtual ~ForceSeatMIPlane_ControllerCore();

public:
	virtual void Begin() override;
	virtual void End() override;
	virtual void Update(float deltaTime) override;
	virtual void Pause(bool paused) override;
	virtual void AddExtraTransformation(const ExtraTransformation& transformation) override;
	virtual void SetAdditionalProperties(float sideSlip, float roadHarshness, float g) override;
	virtual void SetUserAux(float aux1, float aux2, float aux3, float aux4, float aux5, float aux6, float aux7, float aux8) override;

private:
	APawn*            m_plane;
	UWorld*           m_world;
	IForceSeatMI_API* m_api;
	bool              m_firstCall;
	FSMI_TelemetryACE m_telemetry;
	FTransform        m_prevTransform;
	FVector           m_prevLocation;
	float             m_prevForwardSpeed;
	float             m_prevRightSpeed;
	float             m_prevUpSpeed;
};
