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