LeviLamina
Loading...
Searching...
No Matches
RelativeVolumeListBlockVolume.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/block/BlockVolumeBase.h"
8
9// auto generated forward declare list
10// clang-format off
12class BlockPos;
13class BoundingBox;
14class ChunkPos;
16class Vec3;
17namespace Editor { class BlockAdjacencyItem; }
18namespace Editor { class BlockAdjacencyMap; }
19namespace cereal { struct ReflectionCtx; }
20// clang-format on
21
22namespace Editor {
23
24class RelativeVolumeListBlockVolume : public ::BlockVolumeBase {
25public:
26 // member variables
27 // NOLINTBEGIN
38 // NOLINTEND
39
40public:
41 // prevent constructor by default
42 RelativeVolumeListBlockVolume();
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual ::BoundingBox getBoundingBox() const /*override*/;
48
49 virtual ::BlockPos getMin() const /*override*/;
50
51 virtual ::BlockPos getMax() const /*override*/;
52
53 virtual ::glm::ivec3 getSpan() const /*override*/;
54
55 virtual int getCapacity() const /*override*/;
56
57 virtual bool isInside(::BlockPos const& pos) const /*override*/;
58
59 virtual void translate(::BlockPos const& delta) /*override*/;
60
61 virtual void forEach(::brstd::function_ref<bool(::BlockPos const&)> callback) const /*override*/;
62
63 virtual ::std::set<::ChunkPos> getChunks() const /*override*/;
64
65 virtual ::std::unordered_set<::BlockPos> getFlattenedBlockPositions() const /*override*/;
66
67 virtual ::std::unique_ptr<::BaseBlockLocationIterator> getIterator() const /*override*/;
68
69 virtual ~RelativeVolumeListBlockVolume() /*override*/;
70 // NOLINTEND
71
72public:
73 // member functions
74 // NOLINTBEGIN
76
78
79 MCNAPI void _addVolumesBulkViaGrid(::std::vector<::SimpleBlockVolume> const& volumes);
80
81 MCNAPI void add(::SimpleBlockVolume const& _relativeVolume);
82
83 MCNAPI ::std::vector<::SimpleBlockVolume>
85
86#ifdef LL_PLAT_C
87 MCNAPI void clear();
88#endif
89
90 MCNAPI void compact();
91
92 MCNAPI void enableAdjacencyMap() const;
93
94#ifdef LL_PLAT_C
95 MCNAPI ::Editor::BlockAdjacencyItem getAdjacencyBits(::BlockPos const& pos) const;
96#endif
97
98 MCNAPI ::std::vector<::BlockPos> getBlockPositionList(bool relative) const;
99
100 MCNAPI ::std::vector<::Vec3> getVec3PositionList(bool relative) const;
101
102 MCNAPI bool hasAdjacent(::BlockPos const& pos, ::BlockPos const& offset) const;
103
104 MCNAPI void moveTo(::BlockPos const& pos);
105
106 MCNAPI ::Editor::RelativeVolumeListBlockVolume& operator=(::std::vector<::Vec3> const& locations);
107
108 MCNAPI ::Editor::RelativeVolumeListBlockVolume& operator=(::Editor::RelativeVolumeListBlockVolume&& rhs);
109
110 MCNAPI ::Editor::RelativeVolumeListBlockVolume& operator=(::Editor::RelativeVolumeListBlockVolume const& rhs);
111
112 MCNAPI ::Editor::RelativeVolumeListBlockVolume& operator=(::SimpleBlockVolume const& volume);
113
115
116 MCNAPI void remove(::SimpleBlockVolume const& relativeVolume);
117 // NOLINTEND
118
119public:
120 // static functions
121 // NOLINTBEGIN
122 MCNAPI static ::std::vector<::SimpleBlockVolume>
123 _greedyBoxCoverFromGrid(::Editor::BlockAdjacencyMap& remaining, ::std::vector<::BlockPos>& voxels);
124
126
127 MCNAPI static ::Editor::RelativeVolumeListBlockVolume fromValidatedDisjointVolumes(
128 ::std::vector<::SimpleBlockVolume> volumes,
129 int capacity,
130 ::std::optional<::BlockPos> const& origin
131 );
132 // NOLINTEND
133
134public:
135 // constructor thunks
136 // NOLINTBEGIN
138
140 // NOLINTEND
141
142public:
143 // destructor thunk
144 // NOLINTBEGIN
145 MCNAPI void $dtor();
146 // NOLINTEND
147
148public:
149 // virtual function thunks
150 // NOLINTBEGIN
151 MCNAPI ::BoundingBox $getBoundingBox() const;
152
153 MCNAPI ::BlockPos $getMin() const;
154
155 MCNAPI ::BlockPos $getMax() const;
156
157 MCNAPI ::glm::ivec3 $getSpan() const;
158
159 MCNAPI int $getCapacity() const;
160
161 MCNAPI bool $isInside(::BlockPos const& pos) const;
162
163 MCNAPI void $translate(::BlockPos const& delta);
164
165 MCNAPI void $forEach(::brstd::function_ref<bool(::BlockPos const&)> callback) const;
166
167 MCNAPI ::std::set<::ChunkPos> $getChunks() const;
168
169 MCNAPI ::std::unordered_set<::BlockPos> $getFlattenedBlockPositions() const;
170
171 MCNAPI ::std::unique_ptr<::BaseBlockLocationIterator> $getIterator() const;
172
173
174 // NOLINTEND
175
176public:
177 // vftables
178 // NOLINTBEGIN
179 MCNAPI static void** $vftable();
180 // NOLINTEND
181};
182
183} // namespace Editor
Definition BaseBlockLocationIterator.h:8
Definition BlockPos.h:17
Definition BlockVolumeBase.h:16
Definition BoundingBox.h:13
Definition ChunkPos.h:13
Definition BlockAdjacencyItem.h:7
Definition BlockAdjacencyMap.h:13
Definition RelativeVolumeListBlockVolume.h:24
MCAPI::BoundingBox $getBoundingBox() const
MCAPI::Editor::RelativeVolumeListBlockVolume & operator=(::SimpleBlockVolume const &volume)
MCAPI::BlockPos $getMax() const
MCAPI void remove(::SimpleBlockVolume const &relativeVolume)
MCAPI void * $ctor(::Editor::RelativeVolumeListBlockVolume &&rhs)
MCAPI void moveTo(::BlockPos const &pos)
MCAPI ::std::unique_ptr<::BaseBlockLocationIterator > $getIterator() const
MCAPI::Editor::RelativeVolumeListBlockVolume & operator=(::Editor::RelativeVolumeListBlockVolume const &rhs)
MCAPI ::std::unordered_set<::BlockPos > $getFlattenedBlockPositions() const
MCAPI bool hasAdjacent(::BlockPos const &pos, ::BlockPos const &offset) const
static MCAPI ::std::vector<::SimpleBlockVolume > _greedyBoxCoverFromGrid(::Editor::BlockAdjacencyMap &remaining, ::std::vector<::BlockPos > &voxels)
static MCAPI void bindType(::cereal::ReflectionCtx &ctx)
MCAPI RelativeVolumeListBlockVolume(::Editor::RelativeVolumeListBlockVolume const &rhs)
MCAPI ::std::vector<::BlockPos > getBlockPositionList(bool relative) const
MCAPI void * $ctor(::Editor::RelativeVolumeListBlockVolume const &rhs)
MCAPI void $translate(::BlockPos const &delta)
MCAPI bool operator==(::Editor::RelativeVolumeListBlockVolume const &rhs) const
MCAPI::Editor::RelativeVolumeListBlockVolume & operator=(::std::vector<::Vec3 > const &locations)
MCAPI::BlockPos $getMin() const
MCAPI ::std::set<::ChunkPos > $getChunks() const
MCAPI::glm::ivec3 $getSpan() const
MCAPI void add(::SimpleBlockVolume const &_relativeVolume)
MCAPI void $forEach(::brstd::function_ref< bool(::BlockPos const &)> callback) const
MCAPI RelativeVolumeListBlockVolume(::Editor::RelativeVolumeListBlockVolume &&rhs)
MCAPI bool $isInside(::BlockPos const &pos) const
MCAPI void _addVolumesBulkViaGrid(::std::vector<::SimpleBlockVolume > const &volumes)
MCAPI ::std::vector<::Vec3 > getVec3PositionList(bool relative) const
static MCAPI ::Editor::RelativeVolumeListBlockVolume fromValidatedDisjointVolumes(::std::vector<::SimpleBlockVolume > volumes, int capacity, ::std::optional<::BlockPos > const &origin)
MCAPI::Editor::RelativeVolumeListBlockVolume & operator=(::Editor::RelativeVolumeListBlockVolume &&rhs)
MCAPI ::std::vector<::SimpleBlockVolume > calculateVolumetricDifference(::SimpleBlockVolume const &volA, ::SimpleBlockVolume const &volB)
Definition SimpleBlockVolume.h:18
Definition Vec3.h:10
Definition function_ref.h:60
Definition ReflectionCtx.h:11
Definition ctx.h:5
Definition Alias.h:14