| 1 | #pragma once |
| 2 | |
| 3 | #include <math/seadVector.h> |
| 4 | |
| 5 | #include "Library/Area/AreaObj.h" |
| 6 | |
| 7 | class MoveArea2D : public al::AreaObj { |
| 8 | public: |
| 9 | enum class ShapeType { Cube = 1, Cylinder, CylinderCenter, Disk }; |
| 10 | |
| 11 | MoveArea2D(const char* name); |
| 12 | |
| 13 | void init(const al::AreaInitInfo& areaInitInfo) override; |
| 14 | |
| 15 | bool calcGravityCylinderCenterAxis(sead::Vector3f*, f32*, const sead::Vector3f&, bool) const; |
| 16 | bool calcGravityDir(sead::Vector3f*, f32*, const sead::Vector3f&) const; |
| 17 | bool calcGravityYDir(sead::Vector3f*, f32*) const; |
| 18 | |
| 19 | bool calcSnapPower(sead::Vector3f*, f32*, const sead::Vector3f&, f32); |
| 20 | bool calcSnapPowerCube(sead::Vector3f*, f32*, const sead::Vector3f&, f32); |
| 21 | bool calcSnapPowerCylinder(sead::Vector3f*, f32*, const sead::Vector3f&, f32); |
| 22 | bool calcSnapPowerDisk(sead::Vector3f*, f32*, const sead::Vector3f&, f32); |
| 23 | |
| 24 | private: |
| 25 | ShapeType mShapeType; |
| 26 | f32 mSurfaceDistance; |
| 27 | f32 mGravityOffset; |
| 28 | }; |
| 29 | |