2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-08-08 22:12:14 +00:00
|
|
|
|
2019-09-23 19:00:23 +00:00
|
|
|
#include <optional>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Runtime/RetroTypes.hpp"
|
|
|
|
#include "Runtime/World/CActor.hpp"
|
|
|
|
|
|
|
|
#include <zeus/CAABox.hpp>
|
2017-08-08 22:12:14 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
|
|
|
class CScriptSpiderBallWaypoint : public CActor {
|
|
|
|
enum class ECheckActiveWaypoint { Check, SkipCheck };
|
|
|
|
u32 xe8_;
|
|
|
|
std::vector<TUniqueId> xec_waypoints;
|
2019-06-12 02:05:17 +00:00
|
|
|
std::optional<zeus::CAABox> xfc_aabox;
|
2018-12-08 05:30:43 +00:00
|
|
|
|
2017-08-08 22:12:14 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CScriptSpiderBallWaypoint(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, u32);
|
2019-08-09 12:45:18 +00:00
|
|
|
void Accept(IVisitor&) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
|
|
|
|
void Render(const CStateManager& mgr) const override { CActor::Render(mgr); }
|
|
|
|
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) const override {}
|
|
|
|
std::optional<zeus::CAABox> GetTouchBounds() const override { return xfc_aabox; }
|
2018-12-08 05:30:43 +00:00
|
|
|
void AccumulateBounds(const zeus::CVector3f& v);
|
|
|
|
void BuildWaypointListAndBounds(CStateManager& mgr);
|
|
|
|
void AddPreviousWaypoint(TUniqueId uid);
|
|
|
|
TUniqueId PreviousWaypoint(const CStateManager& mgr, ECheckActiveWaypoint checkActive) const;
|
|
|
|
TUniqueId NextWaypoint(const CStateManager& mgr, ECheckActiveWaypoint checkActive) const;
|
|
|
|
void GetClosestPointAlongWaypoints(CStateManager& mgr, const zeus::CVector3f& ballPos, float maxPointToBallDist,
|
|
|
|
const CScriptSpiderBallWaypoint*& closestWaypoint, zeus::CVector3f& closestPoint,
|
|
|
|
zeus::CVector3f& deltaBetweenPoints, float deltaBetweenInterpDist,
|
|
|
|
zeus::CVector3f& interpDeltaBetweenPoints) const;
|
2017-08-08 22:12:14 +00:00
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|