LeviLamina
Loading...
Searching...
No Matches
RopeSystem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class AABB;
8class BlockSource;
9class Vec3;
10struct AABBBucket;
11struct AABBPred;
12struct ActorUniqueID;
13struct RopeNode;
14struct RopeParams;
15struct RopePoints;
16struct RopeWave;
17namespace Bedrock::Threading { class Mutex; }
18// clang-format on
19
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<1, 1, bool> mWaveApplied;
25 ::ll::TypedStorage<8, 32, ::RopePoints> mQueuedRenderPoints;
26 ::ll::TypedStorage<8, 32, ::RopePoints> mRenderPoints;
27 ::ll::TypedStorage<8, 24, ::std::vector<::RopeNode>> mNodes;
28 ::ll::TypedStorage<8, 24, ::std::vector<::AABBBucket>> mColliderBuckets;
29 ::ll::TypedStorage<8, 24, ::std::vector<::RopeWave>> mWaves;
30 ::ll::TypedStorage<8, 88, ::RopeParams> mParams;
31 ::ll::TypedStorage<8, 16, ::std::set<::AABB, ::AABBPred>> mDenyListedColliders;
32 ::ll::TypedStorage<4, 12, ::Vec3> mPrevStartPin;
33 ::ll::TypedStorage<4, 12, ::Vec3> mPrevEndPin;
34 ::ll::TypedStorage<8, 8, uint64> mCutNode;
35 ::ll::TypedStorage<8, 8, uint64> mCutRenderNode;
36 ::ll::TypedStorage<8, 8, uint64> mMinNodes;
37 ::ll::TypedStorage<8, 8, uint64> mCutTicks;
38 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mEndPinEntity;
39 ::ll::TypedStorage<4, 4, ::std::atomic_flag> mTicking;
40 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mRenderMutex;
41 ::ll::TypedStorage<1, 1, bool> mAbandonCollision;
42 ::ll::TypedStorage<4, 12, ::Vec3> mStartPin;
43 ::ll::TypedStorage<4, 12, ::Vec3> mEndPin;
44 ::ll::TypedStorage<8, 8, uint64> mToCutNode;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI RopeSystem();
51
52 MCAPI bool _cacheColliders(::BlockSource& region);
53
54 MCAPI void _finalizeBucket(::AABBBucket& bucket);
55
56 MCAPI void _initializePins();
57
58 MCAPI void _integrate();
59
60 MCAPI void _prepareAABBBuckets();
61
62 MCAPI void _pruneDenyList();
63
64 MCAPI void _pushRange(uint64 begin, uint64 end);
65
66 MCAPI void _resizeRope();
67
68 MCAPI float _solveCollisions(bool checkDenyList);
69
70 MCAPI float _solveDistanceConstraint(::Vec3& a, ::Vec3& b, float targetDist);
71
72 MCAPI float _solveDistanceConstraintBlock(::Vec3& a, ::Vec3& b, ::Vec3& c, ::Vec3& d, float targetDist);
73
74 MCAPI float _solveDistanceConstraints1();
75
76 MCAPI float _solveDistanceConstraints3();
77
78 MCAPI void _tick();
79
80 MCAPI void _tickWaves();
81
82 MCAPI void _updateRenderPoints();
83
84 MCAPI void queueTick(::BlockSource& region, ::std::shared_ptr<::RopeSystem>& self);
85
86 MCAPI ~RopeSystem();
87 // NOLINTEND
88
89public:
90 // static variables
91 // NOLINTBEGIN
92 MCAPI static bool& sEnabled();
93 // NOLINTEND
94
95public:
96 // constructor thunks
97 // NOLINTBEGIN
98 MCAPI void* $ctor();
99 // NOLINTEND
100
101public:
102 // destructor thunk
103 // NOLINTBEGIN
104 MCAPI void $dtor();
105 // NOLINTEND
106};
Definition AABB.h:16
Definition BlockSource.h:67
Definition RopeSystem.h:20
Definition Vec3.h:10
Definition AABBBucket.h:11
Definition AABBPred.h:5
Definition ActorUniqueID.h:5
Definition RopeNode.h:10
Definition RopeParams.h:10
Definition RopePoints.h:10
Definition RopeWave.h:10