Toast Engine
Loading...
Searching...
No Matches
voxel_bucket.hpp
Go to the documentation of this file.
1
7
8#pragma once
9#include "voxel.hpp"
10
11#include <cstdint>
12
13namespace toast {
14
19class [[ToastNode, Icon("Bucket"), Color("Magenta")]] TOAST_API VoxelBucket : public Voxel {
20public:
22 [[nodiscard, Reflect]]
23 auto getId() const noexcept -> int {
24 return id;
25 }
26
28 [[Reflect]]
29 void setId(int value) noexcept {
30 id = value;
31 }
32
34 [[nodiscard, Reflect]]
35 auto getShape() -> Box<Node>;
36
37 // Backend
38
39 [[nodiscard]]
40 auto colorId() const noexcept -> uint8_t;
41
42protected:
43 void updateInspectorMessages() override;
44
46 [[Reflect, Name("Color")]]
47 int id = 1;
48};
49
50}
Intrusive reference-counted handle to a Node.
Definition box.hpp:35
Definition reflect.hpp:244
Definition voxel_bucket.hpp:19
int id
Definition voxel_bucket.hpp:47
void setId(int value) noexcept
Definition voxel_bucket.hpp:29
auto getId() const noexcept -> int
Definition voxel_bucket.hpp:23
Definition voxel.hpp:14
Common base of every voxel node.