1#include "Game/Util/ParabolicPath.hpp"
2#include "Game/Util.hpp"
4ParabolicPath::ParabolicPath() : mPosition(0, 0, 0), mAxisY(0, 1, 0), mAxisZ(0, 0, 1) {
10void ParabolicPath::initFromUpVectorAddHeight(
const TVec3f &a1,
const TVec3f &a2,
const TVec3f &a3, f32 a4) {
11 f32 dot = a3.dot(a2 - a1);
17 initFromUpVector(a1, a2, a3, a4 + dot);
32void ParabolicPath::calcDirection(TVec3f *pOutDirection, f32 a2, f32 a3)
const {
51 calcPosition(&stack_20, f0);
53 calcPosition(&stack_14, f31);
54 pOutDirection->set(stack_14 - stack_20);
55 MR::normalizeOrZero(pOutDirection);
58f32 ParabolicPath::getTotalLength(s32 a1)
const {
59 return getLength(0.0f, 1.0f, a1);
62f32 ParabolicPath::calcPathSpeedFromAverageSpeed(f32 speed)
const {
63 return speed / getLength(0.0f, 1.0f, 10);