16 void init()
override {
23 [[nodiscard]] u32 loadFlags()
const override {
28 void createCollision()
override {}
31 void calcCollisionTransform()
override {}
34 [[nodiscard]] f32 getCollisionRadius()
const override {
43 KCLTypeMask flags,
CollisionInfo *pInfo, KCLTypeMask *pFlagsOut)
override;
45 KCLTypeMask flags,
CollisionInfo *pInfo, KCLTypeMask *pFlagsOut)
override;
46 [[nodiscard]]
bool checkSpherePartial(f32 radius,
const EGG::Vector3f &v0,
48 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
49 [[nodiscard]]
bool checkSpherePartialPush(f32 radius,
const EGG::Vector3f &v0,
51 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
53 KCLTypeMask flags,
CollisionInfo *pInfo, KCLTypeMask *pFlagsOut,
54 u32 timeOffset)
override;
55 [[nodiscard]]
bool checkSphereFullPush(f32 radius,
const EGG::Vector3f &v0,
57 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
63 KCLTypeMask flags,
CollisionInfo *pInfo, KCLTypeMask *pFlagsOut)
override;
65 KCLTypeMask flags,
CollisionInfo *pInfo, KCLTypeMask *pFlagsOut)
override;
66 [[nodiscard]]
bool checkSphereCachedPartial(f32 radius,
const EGG::Vector3f &v0,
68 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
69 [[nodiscard]]
bool checkSphereCachedPartialPush(f32 radius,
const EGG::Vector3f &v0,
71 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
72 [[nodiscard]]
bool checkSphereCachedFull(f32 radius,
const EGG::Vector3f &v0,
74 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
75 [[nodiscard]]
bool checkSphereCachedFullPush(f32 radius,
const EGG::Vector3f &v0,
77 KCLTypeMask *pFlagsOut, u32 timeOffset)
override;
80 [[nodiscard]]
bool checkSpherePartialImpl(f32 radius,
const EGG::Vector3f &v0,
82 KCLTypeMask *pFlagsOut, u32 timeOffset);
83 [[nodiscard]]
bool checkSpherePartialPushImpl(f32 radius,
const EGG::Vector3f &v0,
85 KCLTypeMask *pFlagsOut, u32 timeOffset);
86 [[nodiscard]]
bool checkSphereFullImpl(f32 radius,
const EGG::Vector3f &v0,
88 KCLTypeMask *pFlagsOut, u32 timeOffset);
89 [[nodiscard]]
bool checkSphereFullPushImpl(f32 radius,
const EGG::Vector3f &v0,
91 KCLTypeMask *pFlagsOut, u32 timeOffset);
94 requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
96 KCLTypeMask flags, T *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset,
bool push);
99 requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
100 [[nodiscard]]
bool checkWallCollision(f32 angle, f32 radius, u32 t,
const EGG::Vector3f &relPos,
101 T *pInfo, KCLTypeMask *pFlagsOut,
bool push);
103 template <
typename T>
104 requires std::is_same_v<T, CollisionInfo> || std::is_same_v<T, CollisionInfoPartial>
105 [[nodiscard]]
bool checkFloorCollision(f32 angle, f32 radius,
const EGG::Vector3f &relPos,
106 T *pInfo, KCLTypeMask *pFlagsOut,
bool push);
108 [[nodiscard]]
bool checkPoleCollision(f32 radius, f32 angle,
const EGG::Vector3f &relPos,
111 [[nodiscard]] f32 calcWave(f32 zPercent, u32 t);
116 static constexpr f32 WIDTH = 2000.0f;
bool checkSphereImpl(f32 radius, const EGG::Vector3f &v0, const EGG::Vector3f &v1, KCLTypeMask flags, T *pInfo, KCLTypeMask *pFlagsOut, u32 timeOffset, bool push)
Helper function which contains frequently re-used code. Behavior branches depending on whether it is ...