initial commit

This commit is contained in:
Orange
2023-11-23 05:03:54 +03:00
committed by Vladislav Alpatov
commit 7c533861a7
15 changed files with 954 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
//
// Created by vlad on 11/6/23.
//
#pragma once
#include <optional>
namespace uml
{
class Vector3;
}
namespace uml::prediction
{
class ProjectilePredictor
{
public:
[[nodiscard]]
static std::optional<Vector3> CalculateViewAngles(const Vector3& origin,
const Vector3& target,
const Vector3& targetVelocity,
float gravity,
float bulletSpeed,
float bulletGravity,
bool inAir);
private:
[[nodiscard]]
static std::optional<float> CalculateAimPitch(const Vector3& origin,
const Vector3& target,
float bulletSpeed,
float bulletGravity);
[[nodiscard]] static float ProjectileTravelTime(float distance, float angle, float speed);
};
};