SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
ParallelGravity.hpp
1#pragma once
2
3#include "Game/Gravity/PlanetGravity.hpp"
4
6public:
7 enum RANGE_TYPE {
8 RangeType_Sphere = 0,
9 RangeType_Box = 1,
10 RangeType_Cylinder = 2
11 };
12
13 enum DISTANCE_CALC_TYPE {
14 DistanceCalcType_Default = -1,
15 DistanceCalcType_X = 0,
16 DistanceCalcType_Y = 1,
17 DistanceCalcType_Z = 2
18 };
19
21
22 virtual void updateMtx(const TPos3f &rMtx);
23 virtual bool calcOwnGravityVector(TVec3f *pDest, f32 *pScalar, const TVec3f &rPosition) const;
24
25 void setPlane(const TVec3f &rPlaneUp, const TVec3f &rPlanePos);
26 void setRangeBox(const TPos3f &);
27 void setRangeCylinder(f32 radius, f32 height);
28 void setRangeType(RANGE_TYPE rangeType);
29 void setBaseDistance(f32 val);
30 void setDistanceCalcType(DISTANCE_CALC_TYPE distanceCalcType);
31 bool isInSphereRange(const TVec3f &rPosition, f32 *pScalar) const;
32 bool isInBoxRange(const TVec3f &rPosition, f32 *pScalar) const;
33 bool isInCylinderRange(const TVec3f &rPosition, f32 *pScalar) const;
34 bool isInRange(const TVec3f &rPosition, f32 *pScalar) const;
35
36 TPos3f mLocalMtx; // _28
37 TPos3f mWorldMtx; // _58
38 f32 mExtentX; // _88
39 f32 mExtentY; // _8C
40 f32 mExtentZ; // _90
41 TVec3f mPlanePosition; // _94
42 TVec3f mPlaneUpVec; // _A0
43 TVec3f mWorldPlanePosition; // _AC
44 TVec3f mWorldPlaneUpVec; // _B8
45 f32 mCylinderHeight; // _C4
46 f32 mCylinderRadius; // _C8
47 f32 mBaseDistance; // _CC
48 RANGE_TYPE mRangeType; // _D0
49 DISTANCE_CALC_TYPE mDistanceCalcType; // _D4
50};