2017-08-08 22:12:14 +00:00
|
|
|
#ifndef __URDE_CSCRIPTSPIDERBALLWAYPOINT_HPP__
|
|
|
|
#define __URDE_CSCRIPTSPIDERBALLWAYPOINT_HPP__
|
|
|
|
|
|
|
|
#include "CActor.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CScriptSpiderBallWaypoint : public CActor
|
|
|
|
{
|
|
|
|
enum class ECheckActiveWaypoint
|
|
|
|
{
|
2017-09-18 03:02:48 +00:00
|
|
|
Check,
|
|
|
|
SkipCheck
|
2017-08-08 22:12:14 +00:00
|
|
|
};
|
|
|
|
u32 xe8_;
|
|
|
|
std::vector<TUniqueId> xec_waypoints;
|
|
|
|
std::experimental::optional<zeus::CAABox> xfc_aabox;
|
|
|
|
public:
|
2017-11-13 06:19:18 +00:00
|
|
|
CScriptSpiderBallWaypoint(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, u32);
|
2017-08-08 22:12:14 +00:00
|
|
|
void Accept(IVisitor&);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&);
|
|
|
|
void Render(const CStateManager& mgr) const { CActor::Render(mgr); }
|
|
|
|
void AddToRenderer(const zeus::CFrustum&, const CStateManager&) {}
|
|
|
|
std::experimental::optional<zeus::CAABox> GetTouchBounds() const { return xfc_aabox; }
|
2017-09-18 03:02:48 +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
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CSCRIPTSPIDERBALLWAYPOINT_HPP__
|