| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <math/seadBoundBox.h> |
| 4 | #include <math/seadQuat.h> |
| 5 | #include <math/seadVector.h> |
| 6 | |
| 7 | namespace al { |
| 8 | class RollingCubePose; |
| 9 | struct ActorInitInfo; |
| 10 | |
| 11 | class RollingCubePoseKeeper { |
| 12 | public: |
| 13 | RollingCubePoseKeeper(); |
| 14 | |
| 15 | void setCubeSize(const sead::BoundBox3f& cubeSize); |
| 16 | bool isMoveTypeTurn() const; |
| 17 | bool isMoveTypeLoop() const; |
| 18 | void init(const ActorInitInfo& initInfo); |
| 19 | bool nextKey(); |
| 20 | void setStart(); |
| 21 | void setKeyIndex(s32 index); |
| 22 | const RollingCubePose& getCurrentPose() const; |
| 23 | const RollingCubePose& getPose(s32 index) const; |
| 24 | void calcBoundingBoxCenter(sead::Vector3f* center, const sead::Quatf& quat, |
| 25 | const sead::Vector3f& trans) const; |
| 26 | |
| 27 | s32 getPoseCount() const { return mPoseCount; } |
| 28 | |
| 29 | s32 getCurrentKeyIndex() const { return mCurrentKeyIndex; } |
| 30 | |
| 31 | const sead::BoundBox3f& getCubeSize() const { return mCubeSize; } |
| 32 | |
| 33 | private: |
| 34 | enum class MoveType : s32 { None, Loop, Turn, All }; |
| 35 | |
| 36 | RollingCubePose* mRollingCubePoses = nullptr; |
| 37 | s32 mPoseCount = 0; |
| 38 | s32 mCurrentKeyIndex = 0; |
| 39 | sead::BoundBox3f mCubeSize; |
| 40 | MoveType mMoveType = MoveType::Loop; |
| 41 | }; |
| 42 | |
| 43 | } // namespace al |
| 44 |