LeviLamina
Loading...
Searching...
No Matches
SimpleBlockVolume.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/BlockPos.h"
7#include "mc/world/level/block/BlockVolumeBase.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
13class BoundingBox;
14class ChunkPos;
15class Vec3;
16namespace cereal { struct ReflectionCtx; }
17// clang-format on
18
20public:
21 // SimpleBlockVolume inner types define
22 enum class CornerIndex : uchar {
23 FrontBottomLeft = 0,
24 BackBottomLeft = 1,
25 FrontTopLeft = 2,
26 BackTopLeft = 3,
27 FrontBottomRight = 4,
28 BackBottomRight = 5,
29 FrontTopRight = 6,
30 BackTopRight = 7,
31 };
32
33 enum class IntersectionResult : int {
34 Disjoint = 0,
35 Contains = 1,
36 Intersects = 2,
37 };
38
39 using CornerHandle = uchar;
40
41public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<4, 12, ::BlockPos> mFrom;
45 ::ll::TypedStorage<4, 12, ::BlockPos> mTo;
46 // NOLINTEND
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual ::BlockPos getMin() const /*override*/;
52
53 virtual ::BlockPos getMax() const /*override*/;
54
55 virtual ::BoundingBox getBoundingBox() const /*override*/;
56
57 virtual ::glm::ivec3 getSpan() const /*override*/;
58
59 virtual int getCapacity() const /*override*/;
60
61 virtual bool isInside(::BlockPos const& pos) const /*override*/;
62
63 virtual void translate(::BlockPos const& delta) /*override*/;
64
65 virtual void forEach(::std::function<bool(::BlockPos const&)> callback) const /*override*/;
66
67 virtual ::std::set<::ChunkPos> getChunks() const /*override*/;
68
69 virtual ::std::unordered_set<::BlockPos> getFlattenedBlockPositions() const /*override*/;
70
71 virtual ::std::unique_ptr<::BaseBlockLocationIterator> getIterator() const /*override*/;
72
73 virtual ~SimpleBlockVolume() /*override*/;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCAPI bool doesAreaTouchFaces(::BlockPos const& min, ::BlockPos const& max) const;
80
81 MCAPI_C uchar getCornerHandle(::SimpleBlockVolume::CornerIndex cornerIndex) const;
82
83 MCAPI_C ::BlockPos getCornerPosition(uchar cornerHandle) const;
84
85 MCAPI_C ::AABB getWorldAABB() const;
86
87 MCAPI ::SimpleBlockVolume::IntersectionResult intersects(::SimpleBlockVolume const& other) const;
88
89 MCAPI_C ::SimpleBlockVolume& setCornerPosition(uchar cornerHandle, ::BlockPos const& pos);
90
91 MCAPI_C ::SimpleBlockVolume& translateCorner(uchar cornerHandle, ::glm::ivec3 const& delta);
92 // NOLINTEND
93
94public:
95 // static functions
96 // NOLINTBEGIN
97 MCAPI static void cerealBindTypes(::cereal::ReflectionCtx& ctx);
98 // NOLINTEND
99
100public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCAPI_C void* $ctor(::SimpleBlockVolume const& volume);
104
105 MCAPI_C void* $ctor(::BlockPos const& from, ::Vec3 const& size);
106
107 MCAPI_C void* $ctor(::BlockPos const& from, ::BlockPos const& to);
108 // NOLINTEND
109
110public:
111 // destructor thunk
112 // NOLINTBEGIN
113 MCFOLD void $dtor();
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCAPI ::BlockPos $getMin() const;
120
121 MCAPI ::BlockPos $getMax() const;
122
123 MCAPI ::BoundingBox $getBoundingBox() const;
124
125 MCAPI ::glm::ivec3 $getSpan() const;
126
127 MCAPI int $getCapacity() const;
128
129 MCAPI bool $isInside(::BlockPos const& pos) const;
130
131 MCAPI void $translate(::BlockPos const& delta);
132
133 MCAPI void $forEach(::std::function<bool(::BlockPos const&)> callback) const;
134
135 MCAPI ::std::set<::ChunkPos> $getChunks() const;
136
137 MCAPI ::std::unordered_set<::BlockPos> $getFlattenedBlockPositions() const;
138
139 MCAPI ::std::unique_ptr<::BaseBlockLocationIterator> $getIterator() const;
140
141
142 // NOLINTEND
143
144public:
145 // vftables
146 // NOLINTBEGIN
147 MCAPI static void** $vftable();
148 // NOLINTEND
149};
Definition AABB.h:18
Definition BaseBlockLocationIterator.h:8
Definition BlockPos.h:19
Definition BlockVolumeBase.h:13
Definition BoundingBox.h:13
Definition ChunkPos.h:11
Definition SimpleBlockVolume.h:19
Definition Vec3.h:10
Definition ReflectionCtx.h:11
Definition ctx.h:5