| 1 | #pragma once |
| 2 | |
| 3 | #include <math/seadMatrix.h> |
| 4 | #include <math/seadVector.h> |
| 5 | |
| 6 | namespace al { |
| 7 | class AreaObj; |
| 8 | class AreaObjFilterBase; |
| 9 | class AreaObjFindCallBack; |
| 10 | class AreaObjGroup; |
| 11 | class IUseAreaObj; |
| 12 | |
| 13 | class AreaObjFilterBase { |
| 14 | public: |
| 15 | virtual bool isValidArea(AreaObj* areaObj) const = 0; |
| 16 | }; |
| 17 | |
| 18 | class AreaObjFindCallBack { |
| 19 | public: |
| 20 | virtual void findArea(const AreaObj* areaObj) = 0; |
| 21 | }; |
| 22 | |
| 23 | AreaObj* tryFindAreaObj(const IUseAreaObj* areaUser, const char* name, |
| 24 | const sead::Vector3f& position); |
| 25 | AreaObj* tryFindAreaObjWithFilter(const IUseAreaObj* areaUser, const char* name, |
| 26 | const sead::Vector3f& position, AreaObjFilterBase* filter); |
| 27 | bool tryFindAreaObjAll(const IUseAreaObj* areaUser, const char* name, |
| 28 | const sead::Vector3f& position, AreaObjFindCallBack* callBack); |
| 29 | AreaObjGroup* tryFindAreaObjGroup(const IUseAreaObj* areaUser, const char* name); |
| 30 | bool isInAreaObj(const AreaObjGroup* group, const sead::Vector3f& position); |
| 31 | AreaObj* tryGetAreaObj(const AreaObjGroup* group, const sead::Vector3f& position); |
| 32 | bool isInAreaPos(const AreaObj* areaObj, const sead::Vector3f& position); |
| 33 | bool isInAreaObj(const IUseAreaObj* areaUser, const char* name, const sead::Vector3f& position); |
| 34 | bool isExistAreaObj(const IUseAreaObj* areaUser, const char* name); |
| 35 | bool isInDeathArea(const IUseAreaObj* areaUser, const sead::Vector3f& position); |
| 36 | bool isInWaterArea(const IUseAreaObj* areaUser, const sead::Vector3f& position); |
| 37 | bool isInPlayerControlOffArea(const IUseAreaObj* areaUser, const sead::Vector3f& position); |
| 38 | s32 calcAreaObjNum(const IUseAreaObj* areaUser, const char* name); |
| 39 | f32 calcWaterSinkDepth(const IUseAreaObj* areaUser, const sead::Vector3f& position); |
| 40 | bool tryGetAreaObjArg(s32* outArg, const AreaObj* areaObj, const char* key); |
| 41 | bool tryGetAreaObjArg(f32* outArg, const AreaObj* areaObj, const char* key); |
| 42 | bool tryGetAreaObjArg(bool* outArg, const AreaObj* areaObj, const char* key); |
| 43 | bool tryGetAreaObjStringArg(const char** outArg, const AreaObj* areaObj, const char* key); |
| 44 | const sead::Matrix34f& getAreaObjBaseMtx(const AreaObj* areaObj); |
| 45 | const sead::Vector3f& getAreaObjScale(const AreaObj* areaObj); |
| 46 | void getAreaObjDirFront(sead::Vector3f* outFrontDir, const AreaObj* areaObj); |
| 47 | void getAreaObjDirUp(sead::Vector3f* outUpDir, const AreaObj* areaObj); |
| 48 | void getAreaObjDirSide(sead::Vector3f* outSideDir, const AreaObj* areaObj); |
| 49 | void calcNearestAreaObjEdgePos(sead::Vector3f* outNearestEdgePos, const AreaObj* areaObj, |
| 50 | const sead::Vector3f& position); |
| 51 | void calcNearestAreaObjEdgePosTopY(sead::Vector3f* outNearestEdgePosTopY, const AreaObj* areaObj, |
| 52 | const sead::Vector3f& position); |
| 53 | f32 calcNearestAreaObjEdgeRateTopY(const AreaObj* areaObj, const sead::Vector3f& position); |
| 54 | void calcAreaObjCenterPos(sead::Vector3f* outCenterPosition, const AreaObj* areaObj); |
| 55 | bool checkAreaObjCollisionByArrow(sead::Vector3f* outHitPosition, sead::Vector3f* outNormal, |
| 56 | const AreaObj* areaObj, const sead::Vector3f& position1, |
| 57 | const sead::Vector3f& position2); |
| 58 | bool calcFindAreaSurface(const IUseAreaObj* areaUser, const char* name, |
| 59 | sead::Vector3f* outHitPosition, sead::Vector3f* outNormal, |
| 60 | const sead::Vector3f& position1, const sead::Vector3f& position2); |
| 61 | bool calcFindAreaSurface(const IUseAreaObj* areaUser, const char* name, |
| 62 | sead::Vector3f* outHitPosition, sead::Vector3f* outNormal, |
| 63 | const sead::Vector3f& position, const sead::Vector3f& direction, |
| 64 | f32 distance); |
| 65 | } // namespace al |
| 66 | |