A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjColMgr.hh
1#pragma once
2
3#include "game/field/KColData.hh"
4
5namespace Field {
6
9class ObjColMgr {
10public:
11 ObjColMgr(const void *file);
12 ~ObjColMgr();
13
14 void narrScLocal(f32 radius, const EGG::Vector3f &pos, KCLTypeMask flags);
15
16 [[nodiscard]] EGG::Vector3f kclLowWorld() const;
17 [[nodiscard]] EGG::Vector3f kclHighWorld() const;
18
19 [[nodiscard]] bool checkPointPartial(const EGG::Vector3f &pos, const EGG::Vector3f &prevPos,
20 KCLTypeMask flags, CollisionInfoPartial *infoOut, KCLTypeMask *typeMaskOut);
21 [[nodiscard]] bool checkPointPartialPush(const EGG::Vector3f &pos, const EGG::Vector3f &prevPos,
22 KCLTypeMask flags, CollisionInfoPartial *info, KCLTypeMask *typeMaskOut);
23 [[nodiscard]] bool checkPointFull(const EGG::Vector3f &pos, const EGG::Vector3f &prevPos,
24 KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *typeMaskOut);
25 [[nodiscard]] bool checkPointFullPush(const EGG::Vector3f &pos, const EGG::Vector3f &prevPos,
26 KCLTypeMask flags, CollisionInfo *pInfo, KCLTypeMask *typeMaskOut);
27
28 [[nodiscard]] bool checkSpherePartial(f32 radius, const EGG::Vector3f &pos,
29 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfoPartial *info,
30 KCLTypeMask *typeMaskOut);
31 [[nodiscard]] bool checkSpherePartialPush(f32 radius, const EGG::Vector3f &pos,
32 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfoPartial *info,
33 KCLTypeMask *typeMaskOut);
34 [[nodiscard]] bool checkSphereFull(f32 radius, const EGG::Vector3f &pos,
35 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfo *info,
36 KCLTypeMask *typeMaskOut);
37 [[nodiscard]] bool checkSphereFullPush(f32 radius, const EGG::Vector3f &pos,
38 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfo *info,
39 KCLTypeMask *typeMaskOut);
40
41 [[nodiscard]] bool checkPointCachedPartial(const EGG::Vector3f &pos,
42 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfoPartial *info,
43 KCLTypeMask *typeMaskOut);
44 [[nodiscard]] bool checkPointCachedPartialPush(const EGG::Vector3f &pos,
45 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfoPartial *info,
46 KCLTypeMask *typeMaskOut);
47 [[nodiscard]] bool checkPointCachedFull(const EGG::Vector3f &pos, const EGG::Vector3f &prevPos,
48 KCLTypeMask mask, CollisionInfo *pInfo, KCLTypeMask *typeMaskOut);
49 [[nodiscard]] bool checkPointCachedFullPush(const EGG::Vector3f &pos,
50 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfo *pInfo,
51 KCLTypeMask *typeMaskOut);
52
53 [[nodiscard]] bool checkSphereCachedPartial(f32 radius, const EGG::Vector3f &pos,
54 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfoPartial *info,
55 KCLTypeMask *typeMaskOut);
56 [[nodiscard]] bool checkSphereCachedPartialPush(f32 radius, const EGG::Vector3f &pos,
57 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfoPartial *info,
58 KCLTypeMask *typeMaskOut);
59 [[nodiscard]] bool checkSphereCachedFull(f32 radius, const EGG::Vector3f &pos,
60 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfo *pInfo,
61 KCLTypeMask *typeMaskOut);
62 [[nodiscard]] bool checkSphereCachedFullPush(f32 radius, const EGG::Vector3f &pos,
63 const EGG::Vector3f &prevPos, KCLTypeMask flags, CollisionInfo *pInfo,
64 KCLTypeMask *typeMaskOut);
65
67 void setMtx(const EGG::Matrix34f &mtx) {
68 m_mtx = mtx;
69 }
70
71 void setInvMtx(const EGG::Matrix34f &mtx) {
72 m_mtxInv = mtx;
73 }
74
75 void setScale(f32 val) {
76 m_kclScale = val;
77 }
79
80private:
81 KColData *m_data;
82 EGG::Matrix34f m_mtx;
83 EGG::Matrix34f m_mtxInv;
84 f32 m_kclScale;
85};
86
87} // namespace Field
A 3 x 4 matrix.
Definition Matrix.hh:8
Performs lookups for KCL triangles.
Definition KColData.hh:57
Manager for an object's KCL interactions.
Definition ObjColMgr.hh:9
Pertains to collision.
A 3D float vector.
Definition Vector.hh:83